Sass works on windows; try to use msvc on appveyor

This commit is contained in:
Vincent Prouillet 2017-07-13 21:20:17 +09:00
parent b3d002f54d
commit e2b09d4d27
4 changed files with 35 additions and 47 deletions

53
Cargo.lock generated
View file

@ -84,7 +84,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -235,8 +235,8 @@ version = "0.1.0"
dependencies = [
"errors 0.1.0",
"rendering 0.1.0",
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -249,7 +249,7 @@ dependencies = [
"front_matter 0.1.0",
"rayon 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rendering 0.1.0",
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)",
@ -340,8 +340,8 @@ dependencies = [
"errors 0.1.0",
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -738,8 +738,8 @@ dependencies = [
"content 0.1.0",
"errors 0.1.0",
"front_matter 0.1.0",
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -771,7 +771,7 @@ dependencies = [
"base64 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"xml-rs 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -877,8 +877,8 @@ dependencies = [
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"syntect 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"templates 0.1.0",
@ -913,7 +913,7 @@ dependencies = [
[[package]]
name = "sass-rs"
version = "0.0.18"
source = "git+https://github.com/compass-rs/sass-rs.git#b2f7205665255a2572794cb638446db2ceb74cf5"
source = "git+https://github.com/compass-rs/sass-rs.git#dd6ce5031d4582f143ce90715f21dff473a780a8"
dependencies = [
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
"sass-sys 0.3.0 (git+https://github.com/compass-rs/sass-rs.git)",
@ -922,9 +922,10 @@ dependencies = [
[[package]]
name = "sass-sys"
version = "0.3.0"
source = "git+https://github.com/compass-rs/sass-rs.git#b2f7205665255a2572794cb638446db2ceb74cf5"
source = "git+https://github.com/compass-rs/sass-rs.git#dd6ce5031d4582f143ce90715f21dff473a780a8"
dependencies = [
"bindgen 0.26.3 (registry+https://github.com/rust-lang/crates.io-index)",
"gcc 0.3.51 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.26 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -941,12 +942,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde"
version = "1.0.9"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde_derive"
version = "1.0.9"
version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
@ -971,7 +972,7 @@ dependencies = [
"dtoa 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -991,8 +992,8 @@ dependencies = [
"pagination 0.1.0",
"rayon 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"sass-rs 0.0.18 (git+https://github.com/compass-rs/sass-rs.git)",
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"taxonomies 0.1.0",
"tempdir 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
"templates 0.1.0",
@ -1066,8 +1067,8 @@ dependencies = [
"onig 1.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"plist 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"yaml-rust 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1123,8 +1124,8 @@ dependencies = [
"content 0.1.0",
"errors 0.1.0",
"front_matter 0.1.0",
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"tera 0.10.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -1162,7 +1163,7 @@ dependencies = [
"lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"pest 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"regex 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"slug 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1229,7 +1230,7 @@ name = "toml"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -1506,8 +1507,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
"checksum sass-sys 0.3.0 (git+https://github.com/compass-rs/sass-rs.git)" = "<none>"
"checksum scopeguard 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c79eb2c3ac4bc2507cda80e7f3ac5b88bd8eae4c0914d5663e6a8933994be918"
"checksum sequence_trie 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c915714ca833b1d4d6b8f6a9d72a3ff632fe45b40a8d184ef79c81bec6327eed"
"checksum serde 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "6a7c6b751a2e8d5df57a5ff71b5b4fc8aaee9ee28ff1341d640dd130bb5f4f7a"
"checksum serde_derive 1.0.9 (registry+https://github.com/rust-lang/crates.io-index)" = "2f6ca58905ebd3c3b285a8a6d4f3ac92b92c0d7951d5649b1bdd212549c06639"
"checksum serde 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "433d7d9f8530d5a939ad5e0e72a6243d2e42a24804f70bf592c679363dcacb2f"
"checksum serde_derive 1.0.10 (registry+https://github.com/rust-lang/crates.io-index)" = "7b707cf0d4cab852084f573058def08879bb467fda89d99052485e7d00edd624"
"checksum serde_derive_internals 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "37aee4e0da52d801acfbc0cc219eb1eda7142112339726e427926a6f6ee65d3a"
"checksum serde_json 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "48b04779552e92037212c3615370f6bd57a40ebba7f20e554ff9f55e41a69a7b"
"checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c"

View file

@ -1,6 +1,8 @@
# Based on the "trust" template v0.1.1
# https://github.com/japaric/trust/tree/v0.1.1
os: Visual Studio 2015
environment:
global:
# TODO This is the Rust channel that build jobs will use by default but can be
@ -13,15 +15,12 @@ environment:
matrix:
# GNU
- channel: stable
target: x86_64-pc-windows-gnu
TOOLCHAIN: msys
MSYS_BITS: 64
target: x86_64-pc-windows-msvc
TOOLCHAIN: msvc
PLATFORM: x86_64
install:
- ps: >-
If ($Env:TARGET -eq 'x86_64-pc-windows-gnu') {
$Env:PATH += ';C:\msys64\mingw64\bin;C:\Program Files\Git\mingw64\bin'
}
- if "%TOOLCHAIN%" == "msvc" if "%PLATFORM%" == "i686" call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat"
- if "%TOOLCHAIN%" == "msvc" if "%PLATFORM%" == "x86_64" "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
- if "%TOOLCHAIN%" == "msvc" if "%PLATFORM%" == "x86_64" call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
- if "%TOOLCHAIN%" == "msys" set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%

View file

@ -11,6 +11,8 @@ rayon = "0.8"
serde = "1.0"
serde_derive = "1.0"
sass-rs = { git = "https://github.com/compass-rs/sass-rs.git" }
errors = { path = "../errors" }
config = { path = "../config" }
utils = { path = "../utils" }
@ -20,9 +22,6 @@ pagination = { path = "../pagination" }
taxonomies = { path = "../taxonomies" }
content = { path = "../content" }
[target.'cfg(not(target_os = "windows"))'.dependencies]
sass-rs = { git = "https://github.com/compass-rs/sass-rs.git" }
[dev-dependencies]
tempdir = "0.3"

View file

@ -5,8 +5,6 @@ extern crate walkdir;
extern crate serde;
#[macro_use]
extern crate serde_derive;
#[cfg(not(target_os = "windows"))]
extern crate sass_rs;
#[macro_use]
@ -30,8 +28,6 @@ use std::path::{Path, PathBuf};
use glob::glob;
use tera::{Tera, Context};
use walkdir::WalkDir;
#[cfg(not(target_os = "windows"))]
use sass_rs::{Options, compile_file};
use errors::{Result, ResultExt};
@ -448,7 +444,6 @@ impl Site {
self.copy_static_directory()
}
#[cfg(not(target_os = "windows"))]
pub fn compile_sass(&self) -> Result<()> {
ensure_directory_exists(&self.output_path)?;
@ -473,12 +468,6 @@ impl Site {
Ok(())
}
#[cfg(target_os = "windows")]
pub fn compile_sass(&self) -> Result<()> {
println!("Sass not supported on Windows yet.");
Ok(())
}
pub fn render_aliases(&self) -> Result<()> {
for page in self.pages.values() {
if let Some(ref aliases) = page.meta.aliases {