]> git.lizzy.rs Git - rust.git/blob - travis.sh
add section on the no MIR error
[rust.git] / travis.sh
1 #!/bin/bash
2 set -euo pipefail
3
4 # Determine configuration
5 if [ "$TRAVIS_OS_NAME" == osx ]; then
6   export MIRI_SYSROOT_BASE=~/Library/Caches/miri.miri.miri/
7   FOREIGN_TARGET=i686-apple-darwin
8 else
9   export MIRI_SYSROOT_BASE=~/.cache/miri/
10   FOREIGN_TARGET=i686-unknown-linux-gnu
11 fi
12
13 echo "Build and install miri"
14 cargo build --release --all-features --all-targets
15 cargo install --all-features --force --path .
16 echo
17
18 echo "Get ourselves a MIR-full libstd for the host and a foreign architecture"
19 cargo miri setup
20 cargo miri setup --target "$FOREIGN_TARGET"
21 echo
22
23 echo "Test miri with full MIR, on the host and other architectures"
24 MIRI_SYSROOT="$MIRI_SYSROOT_BASE"/HOST cargo test --release --all-features
25 MIRI_SYSROOT="$MIRI_SYSROOT_BASE" MIRI_COMPILETEST_TARGET="$FOREIGN_TARGET" cargo test --release --all-features
26 echo
27
28 echo "Test cargo integration"
29 (cd test-cargo-miri && MIRI_SYSROOT="$MIRI_SYSROOT_BASE"/HOST ./run-test.py)
30 echo