]> git.lizzy.rs Git - rust.git/blob - travis.sh
move travis commands to script file, maybe that fixes the macOS weirdness
[rust.git] / travis.sh
1 #!/bin/bash
2 set -e
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 # Build and install miri
14 cargo build --release --all-features --all-targets &&
15 cargo install --all-features --force --path .
16
17 # Get ourselves a MIR-full libstd for the host and a foreign architecture
18 cargo miri setup &&
19 cargo miri setup --target "$FOREIGN_TARGET"
20
21 # Test miri with full MIR, on the host and other architectures
22 MIRI_SYSROOT=$MIRI_SYSROOT_BASE/HOST cargo test --release --all-features &&
23 MIRI_SYSROOT=$MIRI_SYSROOT_BASE MIRI_TARGET=$FOREIGN_TARGET cargo test --release --all-features
24
25 # Test cargo integration
26 (cd test-cargo-miri && MIRI_SYSROOT=$MIRI_SYSROOT_BASE/HOST ./run-test.py)