rust/.travis.yml

65 lines
1.8 KiB
YAML
Raw Normal View History

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
- osx
2018-12-10 03:19:44 -06:00
dist: xenial
2017-07-19 08:06:21 -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-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:
# 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
# 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
RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
else
RUSTC_HASH=$(cat rust-version)
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-10-16 03:02:31 -05:00
- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain stable --profile minimal
- export PATH=$HOME/.cargo/bin:$PATH
- rustup default stable
- rustup toolchain uninstall beta
2019-08-15 15:30:38 -05:00
- rustup update
2019-04-04 04:38:49 -05:00
# Install "master" toolchain
2020-01-31 04:38:07 -06:00
- cargo install rustup-toolchain-install-master
- travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH -c rust-src -c rustc-dev
- rustup default master
- rustc --version
2019-09-27 09:23:26 -05:00
- cargo --version
2016-04-13 17:10:31 -05:00
script:
- ./travis.sh
2019-04-04 04:38:49 -05:00
before_cache:
# Don't cache "master" toolchain, it's a waste
- rustup default stable
- 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
- auto
- try