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
24 # Linux: install extra stuff for cross-compilation
25 - if [[ "$TRAVIS_OS_NAME" == linux ]]; then sudo apt update && sudo apt install gcc-multilib; fi
26 # Compute the rust version we use. We do not use "language: rust" to have more control here.
28 if [[ "$TRAVIS_EVENT_TYPE" == cron ]]; then
29 RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
31 RUSTC_HASH=$(cat rust-version)
33 # Install Rust ("stable" toolchain for better caching, it is just used to build rustup-toolchain-install-master)
34 - curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain stable --profile minimal
35 - export PATH=$HOME/.cargo/bin:$PATH
36 - rustup default stable
37 - rustup toolchain uninstall beta
39 # Install "master" toolchain
40 - cargo install rustup-toolchain-install-master
41 - travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c rust-src -c rustc-dev
42 - rustup default master
50 # Don't cache "master" toolchain, it's a waste
51 - rustup default stable
52 - rustup toolchain uninstall master
58 - post+travis@ralfj.de
59 - travis-miri@oli-obk.de