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:
|
|
|
|
- /home/travis/.cargo
|
2017-07-19 08:06:21 -05:00
|
|
|
|
|
|
|
os:
|
|
|
|
- linux
|
2018-08-14 10:21:02 -05:00
|
|
|
- osx
|
2017-07-19 08:06:21 -05:00
|
|
|
|
2016-04-13 17:10:31 -05:00
|
|
|
before_script:
|
2017-07-19 08:06:21 -05:00
|
|
|
# mac os weirdness (https://github.com/travis-ci/travis-ci/issues/6307)
|
|
|
|
- rvm get stable
|
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.
|
|
|
|
- |
|
|
|
|
if [ "$TRAVIS_EVENT_TYPE" = cron ]; then
|
|
|
|
RUST_TOOLCHAIN=nightly
|
|
|
|
else
|
2018-10-21 11:46:28 -05:00
|
|
|
RUST_TOOLCHAIN=$(cat rust-version)
|
2018-10-01 05:32:22 -05:00
|
|
|
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
|
|
|
|
# customize installation
|
2017-03-23 09:52:11 -05:00
|
|
|
- rustup target add i686-unknown-linux-gnu
|
|
|
|
- rustup target add i686-pc-windows-gnu
|
|
|
|
- rustup target add i686-pc-windows-msvc
|
2017-05-30 16:09:40 -05:00
|
|
|
- rustup component add rust-src
|
2018-10-01 05:32:22 -05:00
|
|
|
- cargo install xargo || echo "Skipping xargo install"
|
2018-08-14 10:21:02 -05:00
|
|
|
|
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
|
|
|
- |
|
2018-08-14 02:34:41 -05:00
|
|
|
# Test and install plain miri
|
2017-12-15 02:32:10 -06:00
|
|
|
cargo build --release --all-features &&
|
2018-08-14 10:21:02 -05:00
|
|
|
cargo test --release --all-features &&
|
2018-10-01 05:32:22 -05:00
|
|
|
cargo install --all-features --force --path .
|
2018-08-14 02:34:41 -05:00
|
|
|
- |
|
|
|
|
# get ourselves a MIR-full libstd
|
|
|
|
xargo/build.sh &&
|
|
|
|
export MIRI_SYSROOT=~/.xargo/HOST
|
2017-05-30 16:09:40 -05:00
|
|
|
- |
|
2018-10-01 01:27:03 -05:00
|
|
|
# run all tests with full mir
|
|
|
|
cargo test --release --all-features
|
|
|
|
- |
|
|
|
|
# test `cargo miri`
|
2017-01-24 10:55:42 -06:00
|
|
|
cd cargo-miri-test &&
|
2018-07-26 10:41:45 -05:00
|
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
2018-10-19 03:07:17 -05:00
|
|
|
cargo miri -q
|
2018-07-26 10:41:45 -05:00
|
|
|
else
|
2018-10-19 03:07:17 -05:00
|
|
|
cargo miri -q >stdout.real 2>stderr.real &&
|
2018-07-26 10:41:45 -05:00
|
|
|
cat stdout.real stderr.real &&
|
|
|
|
# Test `cargo miri` output. Not on mac because output redirecting doesn't
|
|
|
|
# work. There is no error. It just stops CI.
|
2018-07-26 11:15:51 -05:00
|
|
|
diff -u stdout.ref stdout.real &&
|
|
|
|
diff -u stderr.ref stderr.real
|
2018-07-26 10:41:45 -05:00
|
|
|
fi &&
|
2018-10-01 01:27:03 -05:00
|
|
|
# test `cargo miri test`
|
2018-08-14 02:34:41 -05:00
|
|
|
cargo miri test &&
|
2017-01-24 10:55:42 -06:00
|
|
|
cd ..
|
2018-08-14 10:21:02 -05:00
|
|
|
|
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
|