99os :
1010- linux
1111- osx
12+ dist : xenial
1213
1314before_script :
15+ # install extra stuff for cross-compilation
16+ - if [[ "$TRAVIS_OS_NAME" == linux ]]; then sudo apt update && sudo apt install gcc-multilib; fi
1417# macOS weirdness (https://github.com/travis-ci/travis-ci/issues/6307, https://github.com/travis-ci/travis-ci/issues/10165)
1518- if [[ "$TRAVIS_OS_NAME" == osx ]]; then rvm get stable; fi
1619# Compute the rust version we use. We do not use "language: rust" to have more control here.
1720- |
18- if [ "$TRAVIS_EVENT_TYPE" = cron ]; then
21+ if [[ "$TRAVIS_EVENT_TYPE" == cron ] ]; then
1922 RUST_TOOLCHAIN=nightly
2023 else
2124 RUST_TOOLCHAIN=$(cat rust-version)
@@ -24,7 +27,7 @@ before_script:
2427 if [ "$TRAVIS_OS_NAME" == osx ]; then
2528 export MIRI_SYSROOT_BASE=~/Library/Caches/miri.miri.miri/
2629 else
27- export MIRI_SYSROOT_BASE=~/.cache/miri/HOST
30+ export MIRI_SYSROOT_BASE=~/.cache/miri/
2831 fi
2932# install Rust
3033- curl https://build.travis-ci.org/files/rustup-init.sh -sSf | sh -s -- -y --default-toolchain "$RUST_TOOLCHAIN"
@@ -38,10 +41,13 @@ script:
3841 cargo build --release --all-features --all-targets &&
3942 cargo install --all-features --force --path .
4043 - |
41- # Get ourselves a MIR-full libstd
44+ # Get ourselves a MIR-full libstd for the host and a foreign architecture
4245 cargo miri setup &&
43- cargo miri setup --target i686-unknown-linux-gnu &&
44- cargo miri setup --target i686-apple-darwin
46+ if [[ "$TRAVIS_OS_NAME" == osx ]]; then
47+ cargo miri setup --target i686-apple-darwin
48+ else
49+ cargo miri setup --target i686-unknown-linux-gnu
50+ fi
4551 - |
4652 # Test miri with full MIR, on the host and other architectures
4753 MIRI_SYSROOT=$MIRI_SYSROOT_BASE/HOST cargo test --release --all-features &&
0 commit comments