]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Merge pull request #425 from solson/rustup
[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   # 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 --all-features
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=""