diff --git a/.travis.yml b/.travis.yml index b83c2e30..f5863870 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,9 @@ matrix: - os: linux env: TARGET=arm-linux-androideabi rust: stable + - os: linux + env: TARGET=x86_64-unknown-linux-musl + rust: nightly-2015-09-08 addons: apt: packages: diff --git a/ci/run-travis.sh b/ci/run-travis.sh index 2e6613d1..b025db34 100644 --- a/ci/run-travis.sh +++ b/ci/run-travis.sh @@ -11,7 +11,16 @@ export HOST=$ARCH-$OS # clang has better error messages and implements alignof more broadly export CC=clang -if [ "$TARGET" = "" ]; then +if [ "$TARGET" = "arm-linux-androideabi" ]; then + # Pull a pre-built docker image for testing android, then run tests entirely + # within that image. + docker pull alexcrichton/rust-libc-test + docker run -v `pwd`:/clone -t alexcrichton/rust-libc-test sh ci/run.sh $TARGET +elif [ "$TARGET" = "x86_64-unknown-linux-gnu" ]; then + curl -sO https://people.mozilla.org/~acrichton/libc-test/2015-09-08/x86_64-unknown-linux-musl.tar.gz | \ + tar xzf -C $HOME/rust/lib/rustlib + sh ci/run.sh $TARGET +else # Download and install the relevant target locally, then run tests curl -sO https://static.rust-lang.org/dist/rust-$TRAVIS_RUST_VERSION-$HOST.tar.gz tar xf rust-$TRAVIS_RUST_VERSION-$HOST.tar.gz @@ -19,13 +28,4 @@ if [ "$TARGET" = "" ]; then mv rust-$TRAVIS_RUST_VERSION-$HOST/rustc/lib/rustlib/$HOST \ $HOME/rust/lib/rustlib sh ci/run.sh $HOST - -elif [ "$TARGET" = "arm-linux-androideabi" ]; then - # Pull a pre-built docker image for testing android, then run tests entirely - # within that image. - docker pull alexcrichton/rust-libc-test - docker run -v `pwd`:/clone -t alexcrichton/rust-libc-test sh ci/run.sh $TARGET -else - echo "Unknown target: $TARGET" - exit 1 fi