]> git.lizzy.rs Git - rust.git/blob - .appveyor.yml
Follow-up to reviews from RalfJung
[rust.git] / .appveyor.yml
1 environment:
2     global:
3         PROJECT_NAME: miri
4     matrix:
5         - TARGET: i686-pc-windows-msvc
6
7 # branches to build
8 branches:
9   # whitelist
10   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'
20
21 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
45
46 test_script:
47     - set RUST_TEST_NOCAPTURE=1
48     - set RUST_BACKTRACE=1
49     # Test host miri: 32bit Windows
50     - cargo miri setup
51     - set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\rust-lang\miri\cache\HOST
52     - cargo test --release --all-features --locked
53     - cd test-cargo-miri
54     - '"C:\msys64\mingw64\bin\python3.exe" run-test.py'
55     - cd ..
56     - ps: $env:MIRI_SYSROOT = ""
57     # Test foreign miri: 64bit Linux
58     - cargo miri setup --target x86_64-unknown-linux-gnu
59     - set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\rust-lang\miri\cache
60     - set MIRI_TEST_TARGET=x86_64-unknown-linux-gnu
61     - cargo test --release --all-features --locked
62     - cd test-cargo-miri
63     - '"C:\msys64\mingw64\bin\python3.exe" run-test.py'
64     - cd ..
65     - ps: $env:MIRI_SYSROOT = ""
66     # Test foreign miri: 64bit macOS
67     - cargo miri setup --target x86_64-apple-darwin
68     - set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\rust-lang\miri\cache
69     - set MIRI_TEST_TARGET=x86_64-apple-darwin
70     - cargo test --release --all-features --locked
71     - cd test-cargo-miri
72     - '"C:\msys64\mingw64\bin\python3.exe" run-test.py'
73     - cd ..
74     - ps: $env:MIRI_SYSROOT = ""
75
76 after_test:
77     # Don't cache "master" toolchain, it's a waste
78     - rustup default stable
79     - rustup toolchain uninstall master
80
81 notifications:
82     - provider: Email
83       on_build_success: false