]> git.lizzy.rs Git - rust.git/blobdiff - .appveyor.yml
Auto merge of #1152 - divergentdave:shim-directory, r=RalfJung
[rust.git] / .appveyor.yml
index a46214a3c45c61b42f71005f5651942a6fcc5590..4281fe0180f05f9d46a2cb8ecd8be57bc86b3260 100644 (file)
@@ -3,41 +3,63 @@ environment:
         PROJECT_NAME: miri
     matrix:
         - TARGET: x86_64-pc-windows-msvc
-          MSYS2_BITS: 64
         - TARGET: i686-pc-windows-msvc
-          MSYS2_BITS: 32
 
 # branches to build
 branches:
   # whitelist
   only:
-    - master
+    - auto
+    - try
+
+matrix:
+  fast_finish: true     # set this flag to immediately finish build once one of the jobs fails.
+
+cache:
+    - '%USERPROFILE%\.cargo'
+    - '%USERPROFILE%\.rustup'
 
 install:
-    # Install Rust.
-    - set PATH=C:\Program Files\Git\mingw64\bin;C:\msys64\mingw%MSYS2_BITS%\bin;%PATH%
-    - set /p RUST_TOOLCHAIN=<rust-version
-    - curl -sSf -o rustup-init.exe https://win.rustup.rs/
-    - rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_TOOLCHAIN%
+    # Compute the rust version we use
+    - set /p RUSTC_HASH=<rust-version
+    # Install Rust
+    - curl -sSf --retry 3 -o rustup-init.exe https://win.rustup.rs/
+    - rustup-init.exe -y --default-host %TARGET% --default-toolchain stable --profile minimal
     - set PATH=%USERPROFILE%\.cargo\bin;%PATH%
+    - rustup default stable
+    - rustup toolchain uninstall beta
+    - rustup update
+    # Install "master" toolchain
+    - cargo install rustup-toolchain-install-master
+    # We need to install cargo here as well or else the DLL search path inside `cargo run`
+    # will be for the wrong toolchain. (On Unix, `./miri` takes care of this, but not here.)
+    - rustup-toolchain-install-master -f -n master %RUSTC_HASH% -c rust-src -c rustc-dev -c cargo
+    - rustup default master
     - rustc --version
+    - cargo --version
 
-build: false
+build_script:
+    - set RUSTFLAGS=-C debug-assertions
+    # Build and install miri
+    - cargo build --release --all-features --all-targets --locked
+    - cargo install --all-features --force --path . --locked --offline
+    # Get ourselves a MIR-full libstd, and use it henceforth
+    - cargo miri setup
+    - set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\rust-lang\miri\cache\HOST
 
 test_script:
     - set RUST_TEST_NOCAPTURE=1
     - set RUST_BACKTRACE=1
-    # Build and install miri
-    - cargo build --release --all-features --all-targets
-    - cargo install --all-features --force --path .
-    # Get ourselves a MIR-full libstd, and use it henceforth
-    - cargo miri setup
-    - set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\miri\miri\cache\HOST
     # Test miri
-    - cargo test --release --all-features
+    - cargo test --release --all-features --locked
     # Test cargo integration
     - cd test-cargo-miri
-    - python3 run-test.py
+    - '"C:\msys64\mingw64\bin\python3.exe" run-test.py'
+
+after_test:
+    # Don't cache "master" toolchain, it's a waste
+    - rustup default stable
+    - rustup toolchain uninstall master
 
 notifications:
     - provider: Email