3 # Cache the global cargo directory, but NOT the local `target` directory which
4 # we cannot reuse anyway when the nightly changes (and it grows quite large
15 # Run in PRs and for bors, but not on master.
16 if: branch = auto OR branch = try OR type = pull_request OR type = cron
20 - RUST_TEST_NOCAPTURE=1
25 # Compute the rust version we use. We do not use "language: rust" to have more control here.
27 if [[ "$TRAVIS_EVENT_TYPE" == cron ]]; then
28 RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
30 RUSTC_HASH=$(cat rust-version)
32 # Install Rust ("stable" toolchain for better caching, it is just used to build rustup-toolchain-install-master)
33 - curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain stable --profile minimal
34 - export PATH=$HOME/.cargo/bin:$PATH
35 - rustup default stable
36 - rustup toolchain uninstall beta
38 # Install "master" toolchain
39 - cargo install rustup-toolchain-install-master
40 - travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c rust-src -c rustc-dev
41 - rustup default master
49 # Don't cache "master" toolchain, it's a waste
50 - rustup default stable
51 - rustup toolchain uninstall master
57 - post+travis@ralfj.de
58 - travis-miri@oli-obk.de