]> git.lizzy.rs Git - rust.git/blob - .travis.yml
move 'cargo miri' test down so it is not the first thing testing start-fn
[rust.git] / .travis.yml
1 language: rust
2 cache: cargo
3 rust:
4 - nightly
5
6 os:
7 - linux
8 - osx
9
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 # prepare
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
24 script:
25 - set -e
26 - |
27   # Test and install plain miri
28   cargo build --release --all-features &&
29   cargo test --release --all-features &&
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   # run all tests with full mir
42   cargo test --release --all-features
43 - |
44   # test `cargo miri`
45   cd cargo-miri-test &&
46   if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
47     cargo miri -q -- -Zmiri-start-fn
48   else
49     cargo miri -q -- -Zmiri-start-fn >stdout.real 2>stderr.real &&
50     cat stdout.real stderr.real &&
51     # Test `cargo miri` output. Not on mac because output redirecting doesn't
52     # work. There is no error. It just stops CI.
53     diff -u stdout.ref stdout.real &&
54     diff -u stderr.ref stderr.real
55   fi &&
56   # test `cargo miri test`
57   cargo miri test &&
58   cd ..
59
60 notifications:
61   email:
62     on_success: never
63 branches:
64   only:
65   - master
66 env:
67   global:
68   - RUST_TEST_NOCAPTURE=1
69   - TRAVIS_CARGO_NIGHTLY_FEATURE=""