Skip to content

Commit 1cbb344

Browse files
committed
build: Some minor improvements to appveyor
* Add cache support * Finish all build jobs if one failed
1 parent 8e0ee84 commit 1cbb344

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

appveyor.yml

+28-14
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
image: Visual Studio 2017
2-
environment:
3-
RUSTFLAGS: -Ctarget-feature=+crt-static
4-
RUST_BACKTRACE: 1
5-
matrix:
6-
- TARGET: x86_64-pc-windows-msvc
7-
NO_ADD: 1
8-
ALLOW_PR: 1
9-
- TARGET: i686-pc-windows-msvc
10-
access_token:
11-
secure: q8Wqx0brgfpOYFQqWauvucE2h0o1WYb41a3gKaCKV9QiE4eTz6qLNlqyC3mdsp4Q
2+
3+
# branches to build
124
branches:
5+
# whitelist
136
only:
147
- master
158
- stable
169
- auto
10+
cache:
11+
- '%USERPROFILE%\.cargo\registry'
12+
- target
13+
14+
environment:
15+
global:
16+
RUSTFLAGS: -Ctarget-feature=+crt-static
17+
RUST_BACKTRACE: 1
18+
matrix:
19+
- TARGET: x86_64-pc-windows-msvc
20+
NO_ADD: 1
21+
ALLOW_PR: 1
22+
- TARGET: i686-pc-windows-msvc
23+
access_token:
24+
secure: q8Wqx0brgfpOYFQqWauvucE2h0o1WYb41a3gKaCKV9QiE4eTz6qLNlqyC3mdsp4Q
25+
26+
matrix:
27+
fast_finish: true # set this flag to immediately finish build once one of the jobs fails.
1728

1829
install:
1930
# If this is a PR and we're not allowed to test PRs, skip the whole build.
@@ -25,22 +36,25 @@ install:
2536
# Install rust, x86_64-pc-windows-msvc host
2637
- appveyor-retry appveyor DownloadFile https://win.rustup.rs/ -FileName rustup-init.exe
2738
- rustup-init.exe -y --default-host=x86_64-pc-windows-msvc
28-
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
39+
- set PATH=%PATH%;%USERPROFILE%\.cargo\bin
2940
- del rustup-init.exe
3041

3142
# Install the target we're compiling for
3243
- if NOT defined NO_ADD rustup target add %TARGET%
3344

3445
# let's see what we got
35-
- where gcc rustc cargo
46+
- where rustc cargo
3647
- rustc -vV
37-
- cargo -vV
48+
- cargo -V
3849

50+
# Build settings, not to be confused with "before_build" and "after_build".
3951
build: false
4052

41-
test_script:
53+
build_script:
4254
- cargo build --release --target %TARGET% --locked
4355
- cargo run --release --target %TARGET% --locked -- --dump-testament
56+
57+
test_script:
4458
- cargo test --release --target %TARGET%
4559

4660
after_test:

0 commit comments

Comments
 (0)