Skip to content

Commit 081837e

Browse files
committed
fix Travis and adjust AppVeyor
1 parent 31bc435 commit 081837e

File tree

2 files changed

+28
-16
lines changed

2 files changed

+28
-16
lines changed

.appveyor.yml

+20-10
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,31 @@ environment:
33
PROJECT_NAME: miri
44
matrix:
55
- TARGET: x86_64-pc-windows-msvc
6-
MSYS2_BITS: 64
7-
- TARGET: i686-pc-windows-msvc
8-
MSYS2_BITS: 32
6+
#- TARGET: i686-pc-windows-msvc
97

108
# branches to build
119
branches:
1210
# whitelist
1311
only:
1412
- master
1513

14+
cache:
15+
- '%USERPROFILE%\.cargo'
16+
- '%USERPROFILE%\.rustup'
17+
1618
install:
17-
# Install Rust.
18-
- set PATH=C:\Program Files\Git\mingw64\bin;C:\msys64\mingw%MSYS2_BITS%\bin;%PATH%
19-
- set /p RUST_TOOLCHAIN=<rust-version
19+
# Install Rust
2020
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
21-
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_TOOLCHAIN%
21+
- rustup-init.exe -y --default-host %TARGET% --default-toolchain stable
2222
- set PATH=%USERPROFILE%\.cargo\bin;%PATH%
23+
# Install "master" toolchain
24+
- cargo install rustup-toolchain-install-master
25+
- set /p RUSTC_HASH=<rust-version
26+
- rustup-toolchain-install-master -f -n master %RUSTC_HASH% -c cargo -c rust-src
27+
- rustup default master
2328
- rustc --version
2429

25-
build: false
26-
27-
test_script:
30+
build_script:
2831
- set RUST_TEST_NOCAPTURE=1
2932
- set RUST_BACKTRACE=1
3033
# Build and install miri
@@ -33,12 +36,19 @@ test_script:
3336
# Get ourselves a MIR-full libstd, and use it henceforth
3437
- cargo miri setup
3538
- set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\miri\miri\cache\HOST
39+
40+
test_script:
3641
# Test miri
3742
- cargo test --release --all-features
3843
# Test cargo integration
3944
- cd test-cargo-miri
4045
- python3 run-test.py
4146

47+
after_test:
48+
# Don't cache "master" toolchain, it's a waste
49+
- rustup default stable
50+
- rustup toolchain uninstall master
51+
4252
notifications:
4353
- provider: Email
4454
on_build_success: false

.travis.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ cache:
44
# we cannot reuse anyway when the nightly changes (and it grows quite large
55
# over time).
66
directories:
7-
- /home/travis/.cargo
8-
- /home/travis/.rustup
7+
- $HOME/.cargo
8+
- $HOME/.rustup
99

1010
os:
1111
- linux
@@ -22,19 +22,21 @@ before_script:
2222
else
2323
RUSTC_HASH=$(cat rust-version)
2424
fi
25-
# install Rust
25+
# Install Rust ("stable" toolchain for better caching, it is just used to build rustup-toolchain-install-master)
2626
- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain stable
2727
- export PATH=$HOME/.cargo/bin:$PATH
28+
# Install "master" toolchain
2829
- cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed"
29-
- rustup-toolchain-install-master -f -n master $RUSTC_HASH
30+
- travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c cargo -c rust-src
3031
- rustup default master
3132
- rustc --version
3233

3334
script:
3435
- ./travis.sh
3536

36-
after_script:
37-
# Don't cache this, it's a waste
37+
before_cache:
38+
# Don't cache "master" toolchain, it's a waste
39+
- rustup default stable
3840
- rustup toolchain uninstall master
3941

4042
notifications:

0 commit comments

Comments
 (0)