2018-10-01 05:32:22 -05:00
|
|
|
language: generic
|
|
|
|
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:
|
2019-04-04 04:38:49 -05:00
|
|
|
- $HOME/.cargo
|
|
|
|
- $HOME/.rustup
|
2017-07-19 08:06:21 -05:00
|
|
|
|
|
|
|
os:
|
|
|
|
- linux
|
2018-08-14 10:21:02 -05:00
|
|
|
- osx
|
2018-12-10 03:19:44 -06:00
|
|
|
dist: xenial
|
2017-07-19 08:06:21 -05:00
|
|
|
|
2019-06-21 13:51:05 -05:00
|
|
|
# Run in PRs and for bors, but not on master.
|
2019-06-22 04:13:35 -05:00
|
|
|
if: branch = auto OR branch = try OR type = pull_request OR type = cron
|
2019-06-21 13:51:05 -05:00
|
|
|
|
2019-04-18 07:58:30 -05:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- RUST_TEST_NOCAPTURE=1
|
|
|
|
- RUST_BACKTRACE=1
|
|
|
|
|
2016-04-13 17:10:31 -05:00
|
|
|
before_script:
|
2018-12-12 12:15:57 -06:00
|
|
|
# Linux: install extra stuff for cross-compilation
|
2018-12-10 03:19:44 -06:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == linux ]]; then sudo apt update && sudo apt install gcc-multilib; fi
|
2018-10-01 05:32:22 -05:00
|
|
|
# Compute the rust version we use. We do not use "language: rust" to have more control here.
|
|
|
|
- |
|
2018-12-10 03:19:44 -06:00
|
|
|
if [[ "$TRAVIS_EVENT_TYPE" == cron ]]; then
|
2019-04-04 04:19:18 -05:00
|
|
|
RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
|
2018-10-01 05:32:22 -05:00
|
|
|
else
|
2019-04-04 04:19:18 -05:00
|
|
|
RUSTC_HASH=$(cat rust-version)
|
2018-10-01 05:32:22 -05:00
|
|
|
fi
|
2019-04-04 04:38:49 -05:00
|
|
|
# Install Rust ("stable" toolchain for better caching, it is just used to build rustup-toolchain-install-master)
|
2019-04-04 04:19:18 -05:00
|
|
|
- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain stable
|
2018-10-01 05:32:22 -05:00
|
|
|
- export PATH=$HOME/.cargo/bin:$PATH
|
2019-09-27 09:54:39 -05:00
|
|
|
- rustup default stable
|
|
|
|
- rustup uninstall beta
|
2019-08-15 15:30:38 -05:00
|
|
|
- rustup update
|
2019-04-04 04:38:49 -05:00
|
|
|
# Install "master" toolchain
|
2019-04-04 04:19:18 -05:00
|
|
|
- cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed"
|
2019-07-26 03:21:31 -05:00
|
|
|
- travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c rust-src
|
2019-04-04 04:19:18 -05:00
|
|
|
- rustup default master
|
2018-10-01 05:32:22 -05:00
|
|
|
- rustc --version
|
2019-09-27 09:23:26 -05:00
|
|
|
- cargo --version
|
2018-08-14 10:21:02 -05:00
|
|
|
|
2016-04-13 17:10:31 -05:00
|
|
|
script:
|
2018-12-12 12:15:57 -06:00
|
|
|
- ./travis.sh
|
2018-08-14 10:21:02 -05:00
|
|
|
|
2019-04-04 04:38:49 -05:00
|
|
|
before_cache:
|
|
|
|
# Don't cache "master" toolchain, it's a waste
|
|
|
|
- rustup default stable
|
2019-04-04 04:19:18 -05:00
|
|
|
- rustup toolchain uninstall master
|
|
|
|
|
2016-04-13 17:10:31 -05:00
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
on_success: never
|
2019-01-30 06:21:43 -06:00
|
|
|
recipients:
|
|
|
|
- post+travis@ralfj.de
|
|
|
|
- travis-miri@oli-obk.de
|
2017-09-09 04:28:24 -05:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
2019-06-21 13:51:05 -05:00
|
|
|
- auto
|
|
|
|
- try
|