|
| 1 | +build: off # No Visual Studio auto-build. |
1 | 2 | environment: |
2 | | - global: |
3 | | - PROJECT_NAME: miri |
4 | | - matrix: |
5 | | - - TARGET: i686-pc-windows-msvc |
| 3 | + global: |
| 4 | + PROJECT_NAME: miri |
| 5 | + matrix: |
| 6 | + - TARGET: i686-pc-windows-msvc |
| 7 | +matrix: |
| 8 | + fast_finish: true # Immediately finish build once one of the jobs fails. |
| 9 | +cache: |
| 10 | +- '%USERPROFILE%\.cargo' |
| 11 | +- '%USERPROFILE%\.rustup' |
6 | 12 |
|
7 | 13 | # branches to build |
8 | 14 | branches: |
9 | 15 | # whitelist |
10 | 16 | only: |
11 | | - - auto |
12 | | - - try |
13 | | - |
14 | | -matrix: |
15 | | - fast_finish: true # set this flag to immediately finish build once one of the jobs fails. |
16 | | - |
17 | | -cache: |
18 | | - - '%USERPROFILE%\.cargo' |
19 | | - - '%USERPROFILE%\.rustup' |
| 17 | + - auto |
| 18 | + - try |
20 | 19 |
|
21 | 20 | install: |
22 | | - # Compute the rust version we use |
23 | | - - set /p RUSTC_HASH=<rust-version |
24 | | - # Install Rust |
25 | | - - curl -sSf --retry 3 -o rustup-init.exe https://win.rustup.rs/ |
26 | | - - rustup-init.exe -y --default-host %TARGET% --default-toolchain stable --profile minimal |
27 | | - - set PATH=%USERPROFILE%\.cargo\bin;%PATH% |
28 | | - - rustup default stable |
29 | | - - rustup toolchain uninstall beta |
30 | | - - rustup update |
31 | | - # Install "master" toolchain |
32 | | - - cargo install rustup-toolchain-install-master |
33 | | - # We need to install cargo here as well or else the DLL search path inside `cargo run` |
34 | | - # will be for the wrong toolchain. (On Unix, `./miri` takes care of this, but not here.) |
35 | | - - rustup-toolchain-install-master -f -n master %RUSTC_HASH% -c rust-src -c rustc-dev -c cargo |
36 | | - - rustup default master |
37 | | - - rustc --version |
38 | | - - cargo --version |
39 | | - |
40 | | -build_script: |
41 | | - - set RUSTFLAGS=-C debug-assertions |
42 | | - # Build and install miri |
43 | | - - cargo build --release --all-features --all-targets --locked |
44 | | - - cargo install --all-features --force --path . --locked --offline |
| 21 | +# Compute the Rust version we use. |
| 22 | +- set /p RUSTC_HASH=<rust-version |
| 23 | +# Install Rust. We use the "stable" toolchain for better caching, it is just used to build `rustup-toolchain-install-master`. |
| 24 | +# But we also need to take into account that the build cache might have a different, outdated default. |
| 25 | +- curl -sSf --retry 3 -o rustup-init.exe https://win.rustup.rs/ |
| 26 | +- rustup-init.exe -y --default-host %TARGET% --default-toolchain none --profile minimal |
| 27 | +- set PATH=%USERPROFILE%\.cargo\bin;%PATH% |
| 28 | +- rustup default stable |
| 29 | +- rustup toolchain uninstall beta nightly |
| 30 | +- rustup update |
| 31 | +# Install "master" toolchain. |
| 32 | +- cargo install rustup-toolchain-install-master |
| 33 | +- rustup-toolchain-install-master -f -n master %RUSTC_HASH% -c rust-src -c rustc-dev |
| 34 | +- rustup default master |
| 35 | +- rustc --version |
| 36 | +- cargo --version |
45 | 37 |
|
46 | 38 | test_script: |
47 | | - - set RUST_TEST_NOCAPTURE=1 |
48 | | - - set RUST_BACKTRACE=1 |
49 | | - - set CARGO_INCREMENTAL=0 |
50 | | - # Test host miri: 32bit Windows |
51 | | - - cargo miri setup |
52 | | - - set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\rust-lang\miri\cache\HOST |
53 | | - - cargo test --release --all-features --locked |
54 | | - - cd test-cargo-miri |
55 | | - - '"C:\msys64\mingw64\bin\python3.exe" run-test.py' |
56 | | - - cd .. |
57 | | - - ps: $env:MIRI_SYSROOT = "" |
58 | | - # Test foreign miri: 64bit Linux |
59 | | - - cargo miri setup --target x86_64-unknown-linux-gnu |
60 | | - - set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\rust-lang\miri\cache |
61 | | - - set MIRI_TEST_TARGET=x86_64-unknown-linux-gnu |
62 | | - - cargo test --release --all-features --locked |
63 | | - - cd test-cargo-miri |
64 | | - - '"C:\msys64\mingw64\bin\python3.exe" run-test.py' |
65 | | - - cd .. |
66 | | - - ps: $env:MIRI_SYSROOT = "" |
67 | | - # Test foreign miri: 64bit macOS |
68 | | - - cargo miri setup --target x86_64-apple-darwin |
69 | | - - set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\rust-lang\miri\cache |
70 | | - - set MIRI_TEST_TARGET=x86_64-apple-darwin |
71 | | - - cargo test --release --all-features --locked |
72 | | - - cd test-cargo-miri |
73 | | - - '"C:\msys64\mingw64\bin\python3.exe" run-test.py' |
74 | | - - cd .. |
75 | | - - ps: $env:MIRI_SYSROOT = "" |
| 39 | +- set PYTHON=C:\msys64\mingw64\bin\python3.exe |
| 40 | +- bash ci.sh |
76 | 41 |
|
77 | 42 | after_test: |
78 | | - # Don't cache "master" toolchain, it's a waste |
79 | | - - rustup default stable |
80 | | - - rustup toolchain uninstall master |
| 43 | +# Don't cache "master" toolchain, it's a waste. |
| 44 | +- rustup default stable |
| 45 | +- rustup toolchain uninstall master |
81 | 46 |
|
82 | 47 | notifications: |
83 | | - - provider: Email |
84 | | - on_build_success: false |
| 48 | +- provider: Email |
| 49 | + on_build_success: false |
0 commit comments