rust/travis.sh

30 lines
508 B
Bash
Raw Normal View History

#!/bin/bash
2019-02-08 05:13:07 -06:00
set -euo pipefail
# Determine configuration
if [ "$TRAVIS_OS_NAME" == osx ]; then
FOREIGN_TARGET=i686-apple-darwin
else
FOREIGN_TARGET=i686-unknown-linux-gnu
fi
# Prepare
2018-12-12 12:52:49 -06:00
echo "Build and install miri"
./miri build --all-features --all-targets
./miri install
2018-12-12 12:52:49 -06:00
echo
# Test
function run_tests {
./miri test
test-cargo-miri/run-test.py
}
echo "Test host architecture"
run_tests
2018-12-12 12:52:49 -06:00
echo
echo "Test foreign architecture ($FOREIGN_TARGET)"
MIRI_TEST_TARGET="$FOREIGN_TARGET" run_tests
2018-12-12 12:52:49 -06:00
echo