5 env: HOST_TARGET=x86_64-unknown-linux-gnu
7 env: HOST_TARGET=x86_64-apple-darwin
10 # Cache the global cargo directory, but NOT the local `target` directory which
11 # we cannot reuse anyway when the nightly changes (and it grows quite large
17 # Run in PRs and for bors, but not on master.
23 if: branch = auto OR branch = try OR type = pull_request OR type = cron
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. We use the "stable" toolchain for better caching, it is just used to build `rustup-toolchain-install-master`.
34 # But we also need to take into account that the build cache might have a different, outdated default.
35 - curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain none --profile minimal
36 - export PATH=$HOME/.cargo/bin:$PATH
37 - rustup default stable
38 - rustup toolchain uninstall beta nightly
40 # Install "master" toolchain.
41 - cargo install rustup-toolchain-install-master
42 - travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c rust-src -c rustc-dev -c llvm-tools
43 - rustup default master
51 # Don't cache "master" toolchain, it's a waste.
52 - rustup default stable
53 - rustup toolchain uninstall master
59 - post+travis@ralfj.de
60 - travis-miri@oli-obk.de