# 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
- osx
+dist: xenial
+
+# Run in PRs and for bors, but not on master.
+if: branch = auto OR branch = try OR type = pull_request OR type = cron
+
+env:
+ global:
+ - RUST_TEST_NOCAPTURE=1
+ - RUST_BACKTRACE=1
+ - CARGO_INCREMENTAL=0
before_script:
-# macOS weirdness (https://github.com/travis-ci/travis-ci/issues/6307)
-- if [[ "$TRAVIS_OS_NAME" == osx ]]; then rvm get stable; fi
# 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
+ if [[ "$TRAVIS_EVENT_TYPE" == cron ]]; then
+ 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 --profile minimal
- export PATH=$HOME/.cargo/bin:$PATH
+- rustup default stable
+- rustup toolchain uninstall beta
+- rustup update
+# Install "master" toolchain
+- cargo install rustup-toolchain-install-master
+- travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c rust-src -c rustc-dev
+- rustup default master
- rustc --version
-# customize installation
-- rustup target add i686-unknown-linux-gnu
-- rustup target add i686-pc-windows-gnu
-- rustup target add i686-pc-windows-msvc
-- rustup component add rust-src
-- cargo install xargo || echo "Skipping xargo install"
+- cargo --version
script:
-- set -e
-- |
- # Test and install plain miri
- cargo build --release --all-features --all-targets &&
- cargo test --release --all-features &&
- cargo install --all-features --force --path .
-- |
- # get ourselves a MIR-full libstd
- xargo/build.sh &&
- export MIRI_SYSROOT=~/.xargo/HOST
-- |
- # run all tests with full mir
- cargo test --release --all-features
-- |
- # Test cargo integration
- (cd cargo-miri-test && ./run-test.py)
+- ./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
+ recipients:
+ - post+travis@ralfj.de
+ - travis-miri@oli-obk.de
branches:
only:
- master
-env:
- global:
- - RUST_TEST_NOCAPTURE=1
+ - auto
+ - try