]> git.lizzy.rs Git - rust.git/blob - .travis.yml
fix 'cargo miri test' for full MIR, and run it on CI
[rust.git] / .travis.yml
1 language: rust
2 cache: cargo
3
4 os:
5 - osx
6 - linux
7
8 rust:
9 - nightly
10 before_script:
11 # mac os weirdness (https://github.com/travis-ci/travis-ci/issues/6307)
12 - curl -sSL https://rvm.io/mpapis.asc | gpg --import -
13 - rvm get stable
14 # in a cronjob, use latest (not pinned) nightly
15 - if [ "$TRAVIS_EVENT_TYPE" = cron ]; then rustup override set nightly; fi
16 # actual travis code
17 - export PATH=$HOME/.local/bin:$PATH
18 - rustup target add i686-unknown-linux-gnu
19 - rustup target add i686-pc-windows-gnu
20 - rustup target add i686-pc-windows-msvc
21 - rustup component add rust-src
22 - cargo install xargo || echo "skipping xargo install"
23 - export RUST_SYSROOT=$HOME/rust
24 script:
25 - set -e
26 - |
27   # Test and install plain miri
28   cargo build --release --all-features &&
29   RUST_BACKTRACE=1 cargo test --release --all-features --all &&
30   cargo install --all-features --force
31 - |
32   # test that the rustc_tests binary compiles
33   cd rustc_tests &&
34   cargo build --release &&
35   cd ..
36 - |
37   # get ourselves a MIR-full libstd
38   xargo/build.sh &&
39   export MIRI_SYSROOT=~/.xargo/HOST
40 - |
41   # Test `cargo miri`
42   cd cargo-miri-test &&
43   if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
44     cargo miri -q -- -Zmiri-start-fn
45   else
46     cargo miri -q -- -Zmiri-start-fn >stdout.real 2>stderr.real &&
47     cat stdout.real stderr.real &&
48     # Test `cargo miri` output. Not on mac because output redirecting doesn't
49     # work. There is no error. It just stops CI.
50     diff -u stdout.ref stdout.real &&
51     diff -u stderr.ref stderr.real
52   fi &&
53   # Test `cargo miri test`
54   cargo miri test &&
55   cd ..
56 - |
57   # and run all tests with full mir
58   cargo test --release
59 notifications:
60   email:
61     on_success: never
62 branches:
63   only:
64   - master
65 env:
66   global:
67   - RUST_TEST_NOCAPTURE=1
68   - TRAVIS_CARGO_NIGHTLY_FEATURE=""