2018-10-01 12:32:22 +02:00
|
|
|
language: generic
|
2020-05-10 23:49:10 +02:00
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
dist: xenial
|
2018-10-01 12:32:22 +02:00
|
|
|
cache:
|
|
|
|
# Cache the global cargo directory, but NOT the local `target` directory which
|
|
|
|
# we cannot reuse anyway when the nightly changes (and it grows quite large
|
|
|
|
# over time).
|
|
|
|
directories:
|
2020-05-10 23:49:10 +02:00
|
|
|
- $HOME/.cargo
|
|
|
|
- $HOME/.rustup
|
2017-07-19 15:06:21 +02:00
|
|
|
|
2019-06-21 20:51:05 +02:00
|
|
|
# Run in PRs and for bors, but not on master.
|
2020-05-10 23:49:10 +02:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- auto
|
|
|
|
- try
|
2019-06-22 11:13:35 +02:00
|
|
|
if: branch = auto OR branch = try OR type = pull_request OR type = cron
|
2019-06-21 20:51:05 +02:00
|
|
|
|
2016-04-14 00:10:31 +02:00
|
|
|
before_script:
|
2020-05-10 23:49:10 +02:00
|
|
|
# Compute the Rust version we use. We do not use "language: rust" to have more control here.
|
2018-10-01 12:32:22 +02:00
|
|
|
- |
|
2018-12-10 10:19:44 +01:00
|
|
|
if [[ "$TRAVIS_EVENT_TYPE" == cron ]]; then
|
2019-04-04 10:19:18 +01:00
|
|
|
RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
|
2018-10-01 12:32:22 +02:00
|
|
|
else
|
2019-04-04 10:19:18 +01:00
|
|
|
RUSTC_HASH=$(cat rust-version)
|
2018-10-01 12:32:22 +02:00
|
|
|
fi
|
2020-05-10 23:49:10 +02:00
|
|
|
# Install Rust. We use the "stable" toolchain for better caching, it is just used to build `rustup-toolchain-install-master`.
|
|
|
|
# But we also need to take into account that the build cache might have a different, outdated default.
|
|
|
|
- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain none --profile minimal
|
2018-10-01 12:32:22 +02:00
|
|
|
- export PATH=$HOME/.cargo/bin:$PATH
|
2019-09-27 10:54:39 -04:00
|
|
|
- rustup default stable
|
2020-05-10 23:49:10 +02:00
|
|
|
- rustup toolchain uninstall beta nightly
|
2019-08-15 22:30:38 +02:00
|
|
|
- rustup update
|
2020-05-10 23:49:10 +02:00
|
|
|
# Install "master" toolchain.
|
2020-01-31 11:38:07 +01:00
|
|
|
- cargo install rustup-toolchain-install-master
|
2020-05-22 10:29:47 +02:00
|
|
|
- travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c rust-src -c rustc-dev -c llvm-tools
|
2019-04-04 10:19:18 +01:00
|
|
|
- rustup default master
|
2018-10-01 12:32:22 +02:00
|
|
|
- rustc --version
|
2019-09-27 10:23:26 -04:00
|
|
|
- cargo --version
|
2018-08-14 17:21:02 +02:00
|
|
|
|
2016-04-14 00:10:31 +02:00
|
|
|
script:
|
2020-05-10 23:49:10 +02:00
|
|
|
- ./ci.sh
|
2018-08-14 17:21:02 +02:00
|
|
|
|
2019-04-04 10:38:49 +01:00
|
|
|
before_cache:
|
2020-05-10 23:49:10 +02:00
|
|
|
# Don't cache "master" toolchain, it's a waste.
|
2019-04-04 10:38:49 +01:00
|
|
|
- rustup default stable
|
2019-04-04 10:19:18 +01:00
|
|
|
- rustup toolchain uninstall master
|
|
|
|
|
2016-04-14 00:10:31 +02:00
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
on_success: never
|
2019-01-30 13:21:43 +01:00
|
|
|
recipients:
|
2020-05-10 23:49:10 +02:00
|
|
|
- post+travis@ralfj.de
|
|
|
|
- travis-miri@oli-obk.de
|