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 10:38:49 +01:00
- $HOME/.cargo
- $HOME/.rustup
2017-07-19 15:06:21 +02:00
os:
- linux
- osx
2018-12-10 10:19:44 +01:00
dist: xenial
2017-07-19 15:06:21 +02:00
# Run in PRs and for bors, but not on master.
2019-06-22 11:13:35 +02:00
if: branch = auto OR branch = try OR type = pull_request OR type = cron
2019-04-18 14:58:30 +02:00
env:
global:
- RUST_TEST_NOCAPTURE=1
- RUST_BACKTRACE=1
2016-04-14 00:10:31 +02:00
before_script:
# Linux: install extra stuff for cross-compilation
2018-12-10 10:19:44 +01: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 10:19:44 +01: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 10:38:49 +01:00
# Install Rust ("stable" toolchain for better caching, it is just used to build rustup-toolchain-install-master)
2019-10-16 10:02:31 +02: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 uninstall beta
2019-08-15 22:30:38 +02:00
- rustup update
2019-04-04 10:38:49 +01:00
# Install "master" toolchain
- cargo install rustup-toolchain-install-master || echo "rustup-toolchain-install-master already installed"
- 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 10:23:26 -04:00
- cargo --version
2016-04-14 00:10:31 +02:00
script:
- ./travis.sh
2019-04-04 10:38:49 +01:00
before_cache:
# Don't cache "master" toolchain, it's a waste
- rustup default stable
- 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:
- post+travis@ralfj.de
- travis-miri@oli-obk.de
2017-09-09 11:28:24 +02:00
branches:
only:
- master
- auto
- try