]> git.lizzy.rs Git - rust.git/blob - .travis.yml
the test suite assumes a libstd with full MIR; run test suite on xargo-built foreign...
[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 # macOS weirdness (https://github.com/travis-ci/travis-ci/issues/6307, https://github.com/travis-ci/travis-ci/issues/10165)
15 - if [[ "$TRAVIS_OS_NAME" == osx ]]; then rvm get stable; fi
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-version)
22   fi
23 - |
24   if [ "$TRAVIS_OS_NAME" == osx ]; then
25     export MIRI_SYSROOT_BASE=~/Library/Caches/miri.miri.miri/
26   else
27     export MIRI_SYSROOT_BASE=~/.cache/miri/HOST
28   fi
29 # install Rust
30 - curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN"
31 - export PATH=$HOME/.cargo/bin:$PATH
32 - rustc --version
33
34 script:
35 - set -e
36 - |
37   # Build and install miri
38   cargo build --release --all-features --all-targets &&
39   cargo install --all-features --force --path .
40 - |
41   # Get ourselves a MIR-full libstd
42   cargo miri setup &&
43   cargo miri setup --target i686-unknown-linux-gnu &&
44   cargo miri setup --target i686-apple-darwin
45 - |
46   # Test miri with full MIR, on the host and other architectures
47   MIRI_SYSROOT=$MIRI_SYSROOT_BASE/HOST cargo test --release --all-features &&
48   MIRI_SYSROOT=$MIRI_SYSROOT_BASE cargo test --release --all-features
49 - |
50   # Test cargo integration
51   (cd test-cargo-miri && MIRI_SYSROOT=$MIRI_SYSROOT_BASE/HOST ./run-test.py)
52
53 notifications:
54   email:
55     on_success: never
56 branches:
57   only:
58   - master
59 env:
60   global:
61   - RUST_TEST_NOCAPTURE=1