Merge pull request #673 from RalfJung/travis
use rustup-toolchain-install-master for CI
This commit is contained in:
commit
2a03db9ce4
4 changed files with 42 additions and 17 deletions
|
|
@ -3,9 +3,7 @@ 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:
|
||||
|
|
@ -13,18 +11,23 @@ branches:
|
|||
only:
|
||||
- master
|
||||
|
||||
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
|
||||
# Install Rust
|
||||
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
|
||||
- rustup-init.exe -y --default-host %TARGET% --default-toolchain %RUST_TOOLCHAIN%
|
||||
- rustup-init.exe -y --default-host %TARGET% --default-toolchain stable
|
||||
- set PATH=%USERPROFILE%\.cargo\bin;%PATH%
|
||||
# Install "master" toolchain
|
||||
- cargo install rustup-toolchain-install-master
|
||||
- set /p RUSTC_HASH=<rust-version
|
||||
- rustup-toolchain-install-master -f -n master %RUSTC_HASH% -c cargo -c rust-src
|
||||
- rustup default master
|
||||
- rustc --version
|
||||
|
||||
build: false
|
||||
|
||||
test_script:
|
||||
build_script:
|
||||
- set RUST_TEST_NOCAPTURE=1
|
||||
- set RUST_BACKTRACE=1
|
||||
# Build and install miri
|
||||
|
|
@ -33,11 +36,18 @@ test_script:
|
|||
# Get ourselves a MIR-full libstd, and use it henceforth
|
||||
- cargo miri setup
|
||||
- set MIRI_SYSROOT=%USERPROFILE%\AppData\Local\miri\miri\cache\HOST
|
||||
|
||||
test_script:
|
||||
# Test miri
|
||||
- cargo test --release --all-features
|
||||
# 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
|
||||
|
|
|
|||
20
.travis.yml
20
.travis.yml
|
|
@ -4,7 +4,8 @@ cache:
|
|||
# we cannot reuse anyway when the nightly changes (and it grows quite large
|
||||
# over time).
|
||||
directories:
|
||||
- /home/travis/.cargo
|
||||
- $HOME/.cargo
|
||||
- $HOME/.rustup
|
||||
|
||||
os:
|
||||
- linux
|
||||
|
|
@ -17,18 +18,27 @@ before_script:
|
|||
# Compute the rust version we use. We do not use "language: rust" to have more control here.
|
||||
- |
|
||||
if [[ "$TRAVIS_EVENT_TYPE" == cron ]]; then
|
||||
RUST_TOOLCHAIN=nightly
|
||||
RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
|
||||
else
|
||||
RUST_TOOLCHAIN=$(cat rust-version)
|
||||
RUSTC_HASH=$(cat rust-version)
|
||||
fi
|
||||
# install Rust
|
||||
- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN"
|
||||
# Install Rust ("stable" toolchain for better caching, it is just used to build rustup-toolchain-install-master)
|
||||
- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain stable
|
||||
- export PATH=$HOME/.cargo/bin:$PATH
|
||||
# Install "master" toolchain
|
||||
- cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed"
|
||||
- travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c cargo -c rust-src
|
||||
- rustup default master
|
||||
- rustc --version
|
||||
|
||||
script:
|
||||
- ./travis.sh
|
||||
|
||||
before_cache:
|
||||
# Don't cache "master" toolchain, it's a waste
|
||||
- rustup default stable
|
||||
- rustup toolchain uninstall master
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
|
|
|
|||
|
|
@ -120,13 +120,18 @@ other projects:
|
|||
|
||||
```sh
|
||||
rustup component remove miri # avoid having Miri installed twice
|
||||
cargo +nightly install --path "$DIR" --force # or the nightly in `rust-version`
|
||||
cargo +nightly install --path "$DIR" --force
|
||||
cargo +nightly miri setup
|
||||
```
|
||||
|
||||
(We are giving `+nightly` explicitly here all the time because it is important
|
||||
that all of these commands get executed with the same toolchain.)
|
||||
|
||||
In case this fails, your nightly might be incompatible with Miri master. The
|
||||
`rust-version` file contains the commit hash of rustc that Miri is currently
|
||||
tested against; you can use that to find a nightly that works or you might have
|
||||
to wait for the next nightly to get released.
|
||||
|
||||
If you want to use a different libstd (not the one that comes with the
|
||||
nightly), you can do that by running
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
nightly-2019-04-03
|
||||
f717b58dd70829f105960a071c7992b440720482
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue