rust/.travis.yml

70 lines
2.0 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:
- /home/travis/.cargo
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
2016-04-13 17:10:31 -05:00
before_script:
2018-12-10 03:19:44 -06:00
# install extra stuff for cross-compilation
- if [[ "$TRAVIS_OS_NAME" == linux ]]; then sudo apt update && sudo apt install gcc-multilib; fi
2018-11-25 10:30:50 -06:00
# macOS weirdness (https://github.com/travis-ci/travis-ci/issues/6307, https://github.com/travis-ci/travis-ci/issues/10165)
2018-10-30 09:07:40 -05:00
- if [[ "$TRAVIS_OS_NAME" == osx ]]; then rvm get stable; 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
RUST_TOOLCHAIN=nightly
else
RUST_TOOLCHAIN=$(cat rust-version)
fi
- |
if [ "$TRAVIS_OS_NAME" == osx ]; then
export MIRI_SYSROOT_BASE=~/Library/Caches/miri.miri.miri/
else
2018-12-10 03:19:44 -06:00
export MIRI_SYSROOT_BASE=~/.cache/miri/
fi
- |
if [[ "$TRAVIS_OS_NAME" == osx ]]; then
FOREIGN_TARGET=i686-apple-darwin
else
FOREIGN_TARGET=i686-unknown-linux-gnu
fi
# install Rust
- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN"
- export PATH=$HOME/.cargo/bin:$PATH
- rustc --version
2016-04-13 17:10:31 -05:00
script:
2017-08-18 04:42:00 -05:00
- set -e
2017-06-21 01:55:32 -05:00
- |
# Build and install miri
2018-11-17 06:57:45 -06:00
cargo build --release --all-features --all-targets &&
cargo install --all-features --force --path .
- |
2018-12-10 03:19:44 -06:00
# Get ourselves a MIR-full libstd for the host and a foreign architecture
2018-11-25 10:17:21 -06:00
cargo miri setup &&
cargo miri setup --target "$FOREIGN_TARGET"
2018-10-30 05:26:53 -05:00
- |
# Test miri with full MIR, on the host and other architectures
MIRI_SYSROOT=$MIRI_SYSROOT_BASE/HOST cargo test --release --all-features &&
MIRI_SYSROOT=$MIRI_SYSROOT_BASE MIRI_TARGET=$FOREIGN_TARGET cargo test --release --all-features
- |
# Test cargo integration
(cd test-cargo-miri && MIRI_SYSROOT=$MIRI_SYSROOT_BASE/HOST ./run-test.py)
2016-04-13 17:10:31 -05:00
notifications:
email:
on_success: never
2017-09-09 04:28:24 -05:00
branches:
only:
- master
2016-04-15 09:50:36 -05:00
env:
global:
- RUST_TEST_NOCAPTURE=1