rust/.travis.yml
2018-08-14 00:58:43 +02:00

68 lines
1.8 KiB
YAML

language: rust
cache: cargo
os:
- osx
- linux
rust:
- nightly
before_script:
# 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
# actual travis code
- 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"
- export RUST_SYSROOT=$HOME/rust
script:
- set -e
- |
# get ourselves a MIR-ful libstd
xargo/build.sh
- |
# Test plain miri
cargo build --release --all-features &&
RUST_BACKTRACE=1 cargo test --release --all-features --all &&
cargo install --all-features --force
- |
# Test `cargo miri`
cd cargo-miri-test &&
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
MIRI_SYSROOT=~/.xargo/HOST cargo miri -q -- -Zmiri-start-fn
else
MIRI_SYSROOT=~/.xargo/HOST 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.
diff -u stdout.ref stdout.real &&
diff -u stderr.ref stderr.real
fi &&
# Test `cargo miri test`
#cargo miri test &&
cd ..
- |
# and run all tests with full mir
MIRI_SYSROOT=~/.xargo/HOST cargo test --release
- |
# test that the rustc_tests binary compiles
cd rustc_tests &&
cargo build --release &&
cd ..
notifications:
email:
on_success: never
branches:
only:
- master
env:
global:
- RUST_TEST_NOCAPTURE=1
- TRAVIS_CARGO_NIGHTLY_FEATURE=""