rust/.travis.yml

70 lines
1.7 KiB
YAML
Raw Normal View History

2016-04-14 00:10:31 +02:00
language: rust
2018-03-23 12:08:15 +01:00
cache: cargo
rust:
- nightly
2017-07-19 15:06:21 +02:00
os:
- linux
- osx
2017-07-19 15:06:21 +02:00
2016-04-14 00:10:31 +02:00
before_script:
2017-07-19 15:06:21 +02: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
# in a cronjob, use latest (not pinned) nightly
- if [ "$TRAVIS_EVENT_TYPE" = cron ]; then rustup override set nightly; fi
# prepare
2017-03-23 15:52:11 +01: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
- rustup component add rust-src
- cargo install xargo || echo "skipping xargo install"
2016-04-14 00:10:31 +02:00
script:
2017-08-18 11:42:00 +02:00
- set -e
2017-06-21 08:55:32 +02:00
- |
# Test and install plain miri
cargo build --release --all-features &&
cargo test --release --all-features &&
cargo install --all-features --force
- |
# 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
- |
2018-07-26 16:43:45 +02:00
# Test `cargo miri`
cd cargo-miri-test &&
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cargo miri -q -- -Zmiri-start-fn
else
cargo miri -q -- -Zmiri-start-fn >stdout.real 2>stderr.real &&
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 18:15:51 +02:00
diff -u stdout.ref stdout.real &&
diff -u stderr.ref stderr.real
fi &&
2018-07-26 16:43:45 +02:00
# Test `cargo miri test`
cargo miri test &&
cd ..
- |
2017-06-21 08:55:32 +02:00
# and run all tests with full mir
cargo test --release --all-features
2016-04-14 00:10:31 +02:00
notifications:
email:
on_success: never
2017-09-09 11:28:24 +02:00
branches:
only:
- master
2016-04-15 16:50:36 +02:00
env:
global:
- RUST_TEST_NOCAPTURE=1
- TRAVIS_CARGO_NIGHTLY_FEATURE=""