]> git.lizzy.rs Git - rust.git/blob - .travis.yml
automalically use start-fn if we have all the MIR
[rust.git] / .travis.yml
1 language: generic
2 cache:
3   # Cache the global cargo directory, but NOT the local `target` directory which
4   # we cannot reuse anyway when the nightly changes (and it grows quite large
5   # over time).
6   directories:
7     - /home/travis/.cargo
8
9 os:
10 - linux
11 - osx
12
13 before_script:
14 # mac os weirdness (https://github.com/travis-ci/travis-ci/issues/6307)
15 - rvm get stable
16 # Compute the rust version we use. We do not use "language: rust" to have more control here.
17 - |
18   if [ "$TRAVIS_EVENT_TYPE" = cron ]; then
19     RUST_TOOLCHAIN=nightly
20   else
21     RUST_TOOLCHAIN=$(cat rust-toolchain)
22   fi
23 - rm rust-toolchain
24 # install Rust
25 - curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN"
26 - export PATH=$HOME/.cargo/bin:$PATH
27 - rustc --version
28 # customize installation
29 - rustup target add i686-unknown-linux-gnu
30 - rustup target add i686-pc-windows-gnu
31 - rustup target add i686-pc-windows-msvc
32 - rustup component add rust-src
33 - cargo install xargo || echo "Skipping xargo install"
34
35 script:
36 - set -e
37 - |
38   # Test and install plain miri
39   cargo build --release --all-features &&
40   cargo test --release --all-features &&
41   cargo install --all-features --force --path .
42 - |
43   # get ourselves a MIR-full libstd
44   xargo/build.sh &&
45   export MIRI_SYSROOT=~/.xargo/HOST
46 - |
47   # run all tests with full mir
48   cargo test --release --all-features
49 - |
50   # test `cargo miri`
51   cd cargo-miri-test &&
52   if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
53     cargo miri -q
54   else
55     cargo miri -q >stdout.real 2>stderr.real &&
56     cat stdout.real stderr.real &&
57     # Test `cargo miri` output. Not on mac because output redirecting doesn't
58     # work. There is no error. It just stops CI.
59     diff -u stdout.ref stdout.real &&
60     diff -u stderr.ref stderr.real
61   fi &&
62   # test `cargo miri test`
63   cargo miri test &&
64   cd ..
65
66 notifications:
67   email:
68     on_success: never
69 branches:
70   only:
71   - master
72 env:
73   global:
74   - RUST_TEST_NOCAPTURE=1