]> git.lizzy.rs Git - rust.git/blob - .travis.yml
Merge pull request #543 from RalfJung/auto-libstd
[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 # install Rust
24 - curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN"
25 - export PATH=$HOME/.cargo/bin:$PATH
26 - rustc --version
27 # customize installation
28 - rustup target add i686-unknown-linux-gnu
29 - rustup target add i686-pc-windows-gnu
30 - rustup target add i686-pc-windows-msvc
31
32 script:
33 - set -e
34 - |
35   # Test and install plain miri
36   cargo build --release --all-features --all-targets &&
37   cargo test --release --all-features &&
38   cargo install --all-features --force --path .
39 - |
40   # Get ourselves a MIR-full libstd, and use it henceforth
41   cargo miri setup &&
42   if [ "$TRAVIS_OS_NAME" == osx ]; then
43     export MIRI_SYSROOT=~/Library/Caches/miri.miri.miri/HOST
44   else
45     export MIRI_SYSROOT=~/.cache/miri/HOST
46   fi
47 - |
48   # Test miri with full MIR
49   cargo test --release --all-features
50 - |
51   # Test cargo integration
52   (cd cargo-miri-test && ./run-test.py)
53
54 notifications:
55   email:
56     on_success: never
57 branches:
58   only:
59   - master
60 env:
61   global:
62   - RUST_TEST_NOCAPTURE=1