2016-04-13 17:10:31 -05:00
|
|
|
language: rust
|
2018-03-23 06:08:15 -05:00
|
|
|
cache: cargo
|
2018-08-14 10:21:02 -05:00
|
|
|
rust:
|
|
|
|
- nightly
|
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)
|
|
|
|
- curl -sSL https://rvm.io/mpapis.asc | gpg --import -
|
|
|
|
- rvm get stable
|
2018-08-13 17:54:04 -05:00
|
|
|
# in a cronjob, use latest (not pinned) nightly
|
|
|
|
- if [ "$TRAVIS_EVENT_TYPE" = cron ]; then rustup override set nightly; fi
|
2018-08-14 10:21:02 -05:00
|
|
|
# prepare
|
2017-03-23 09:52:11 -05:00
|
|
|
- export PATH=$HOME/.local/bin:$PATH
|
|
|
|
- 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-05-09 08:13:36 -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-05-09 08:13:36 -05:00
|
|
|
cargo install --all-features --force
|
2018-08-14 02:34:41 -05:00
|
|
|
- |
|
|
|
|
# test that the rustc_tests binary compiles
|
|
|
|
cd rustc_tests &&
|
|
|
|
cargo build --release &&
|
|
|
|
cd ..
|
|
|
|
- |
|
|
|
|
# get ourselves a MIR-full libstd
|
|
|
|
xargo/build.sh &&
|
|
|
|
export MIRI_SYSROOT=~/.xargo/HOST
|
2017-05-30 16:09:40 -05:00
|
|
|
- |
|
2018-07-26 09:43:45 -05:00
|
|
|
# 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-08-14 02:34:41 -05:00
|
|
|
cargo miri -q -- -Zmiri-start-fn
|
2018-07-26 10:41:45 -05:00
|
|
|
else
|
2018-08-14 02:34:41 -05:00
|
|
|
cargo miri -q -- -Zmiri-start-fn >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-07-26 09:43:45 -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 ..
|
2017-05-30 16:09:40 -05:00
|
|
|
- |
|
2017-06-21 01:55:32 -05:00
|
|
|
# and run all tests with full mir
|
2018-08-14 10:21:02 -05:00
|
|
|
cargo test --release --all-features
|
|
|
|
|
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
|
|
|
|
- TRAVIS_CARGO_NIGHTLY_FEATURE=""
|