Skip to content

Commit 96eeafa

Browse files
author
Geobert Quach
committed
fixes #180 : Enable syntax highlight to all platform
apply code review comments syntax-highlight enabled by default add VS setup in appveyor Try to fix appveyor try to fix appveyor test Fix appveyor test Fix appveyor test Fix appveyor test add back --target typo disabling travis and set RUST_BACKTRACE set RUST_BACKTRACE to full Test to fix appveyor Try a definitive solution to cli tests Syntax error Syntax error Syntax error Restore travis, all targets (but gnu), remove RUST_BACKTRACE try to fix travis try to fix travis Restore all targets Restore appveyor Try a solution without copying files around try build instead of check Restore all targets change to CHANNEL instead of RUST_VERSION in installation of toolchain Remove dead code Add --no-default-features restore travis and add --no-default-features
1 parent ba70b62 commit 96eeafa

File tree

5 files changed

+37
-23
lines changed

5 files changed

+37
-23
lines changed

.travis.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ matrix:
2828
- if [[ `cargo +nightly-2017-10-09 clippy -- --version` != $CLIPPY_VERS* ]] ; then travis_wait cargo +nightly-2017-10-09 install clippy --vers "$CLIPPY_VERS" --force; fi
2929
- export PATH=$HOME/.cargo/bin:$PATH
3030
script:
31-
- cargo +nightly-2017-10-09 clippy --features "syntax-highlight,sass" -- -D warnings
31+
- cargo +nightly-2017-10-09 clippy --features "sass" -- -D warnings
3232
- rust: stable
3333
env: RUSTFMT=0.8.6
3434
install:
@@ -46,10 +46,12 @@ install:
4646
script:
4747
- rustc -Vv
4848
- cargo -V
49-
- cargo check --verbose
50-
- cargo check --verbose --features "syntax-highlight,sass"
49+
- cargo build --verbose
5150
- cargo test --verbose
52-
- cargo test --verbose --features "syntax-highlight,sass"
51+
- cargo build --no-default-features --verbose
52+
- cargo test --no-default-features --verbose
53+
- cargo build --verbose --features "sass"
54+
- cargo test --verbose --features "sass"
5355

5456
before_deploy:
5557
- sh ci/before_deploy.sh

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@ serde_json = "1.0"
4545
toml = "0.4.0"
4646

4747
[dependencies.sass-rs]
48-
version = "0.2.0"
48+
version = "0.2"
4949
optional = true
5050

5151
[dependencies.hyper]
5252
version = "0.10"
5353
default-features = false
5454

5555
[dependencies.syntect]
56-
version = "1.8.0"
56+
version = "1.8"
5757
optional = true
5858
default-features = false
5959
features = ["parsing", "assets", "html", "static-onig", "dump-load"]
@@ -64,7 +64,7 @@ difference = "1.0"
6464
tempdir = "0.3"
6565

6666
[features]
67-
default = []
67+
default = ["syntax-highlight"]
6868
unstable = []
6969
dev = []
7070

appveyor.yml

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,49 @@
11
# Based on the "trust" template v0.1.1
22
# https://github.com/japaric/trust/tree/v0.1.1
33

4+
os: Visual Studio 2015
5+
46
environment:
57
global:
6-
RUST_VERSION: stable
78
CRATE_NAME: cobalt
89
APPVEYOR_CACHE_SKIP_RESTORE: true
910

1011
matrix:
1112
# Stable channel
12-
- TARGET: x86_64-pc-windows-gnu
13-
CHANNEL: stable
14-
- TARGET: i686-pc-windows-msvc
15-
CHANNEL: stable
13+
#- TARGET: x86_64-pc-windows-gnu
14+
# CHANNEL: stable
15+
1616
- TARGET: x86_64-pc-windows-msvc
1717
CHANNEL: stable
18+
TOOLCHAIN: msvc
19+
PLATFORM: x86_64
20+
#- TARGET: i686-pc-windows-msvc
21+
# CHANNEL: stable
22+
# TOOLCHAIN: msvc
23+
# PLATFORM: i686
1824
# Beta channel
19-
- TARGET: x86_64-pc-windows-msvc
20-
CHANNEL: beta
25+
#- TARGET: x86_64-pc-windows-msvc
26+
# CHANNEL: beta
27+
# TOOLCHAIN: msvc
28+
# PLATFORM: x86_64
2129

2230
install:
23-
- ps: >-
24-
$Env:PATH += ';C:\msys64\usr\bin'
31+
- if "%TOOLCHAIN%" == "msvc" if "%PLATFORM%" == "i686" call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat"
32+
- if "%TOOLCHAIN%" == "msvc" if "%PLATFORM%" == "x86_64" "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
33+
- if "%TOOLCHAIN%" == "msvc" if "%PLATFORM%" == "x86_64" call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
34+
- if "%TOOLCHAIN%" == "msys" set PATH=C:\msys64\mingw%MSYS_BITS%\bin;C:\msys64\usr\bin;%PATH%
2535
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
26-
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_VERSION%
36+
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %CHANNEL%
2737
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
28-
29-
test_script:
3038
- rustc -Vv
3139
- cargo -V
40+
41+
test_script:
3242
# we don't run the "test phase" when doing deploys
33-
- if [%APPVEYOR_REPO_TAG%]==[false] ( cargo check --verbose )
34-
- if [%APPVEYOR_REPO_TAG%]==[false] ( cargo test --verbose )
43+
- if [%APPVEYOR_REPO_TAG%]==[false] ( cargo +%CHANNEL%-%TARGET% build --verbose )
44+
- if [%APPVEYOR_REPO_TAG%]==[false] ( cargo +%CHANNEL%-%TARGET% test --verbose )
45+
- if [%APPVEYOR_REPO_TAG%]==[false] ( cargo +%CHANNEL%-%TARGET% build --no-default-features --verbose )
46+
- if [%APPVEYOR_REPO_TAG%]==[false] ( cargo +%CHANNEL%-%TARGET% test --no-default-features --verbose )
3547

3648
before_deploy:
3749
- cargo rustc --target %TARGET% --release --bin cobalt -- -C lto

ci/before_deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ main() {
1313
;;
1414
esac
1515

16-
cargo rustc --target $TARGET --release --bin cobalt --features="syntax-highlight" -- -C lto
16+
cargo rustc --target $TARGET --release --bin cobalt -- -C lto
1717

1818
cp target/$TARGET/release/cobalt $stage/
1919

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ extern crate sass_rs;
6767

6868
extern crate itertools;
6969

70-
#[cfg(all(feature = "syntax-highlight", not(windows)))]
70+
#[cfg(all(feature = "syntax-highlight"))]
7171
extern crate syntect;
7272

7373
#[macro_use]

0 commit comments

Comments
 (0)