Add CI for ARM linux
diff --git a/.travis.yml b/.travis.yml
index 1c01ade..8cb864c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,6 +22,9 @@
- os: linux
env: TARGET=x86_64-unknown-linux-musl
rust: nightly-2015-09-08
+ - os: linux
+ env: TARGET=arm-unknown-linux-gnueabihf
+ rust: nightly-2015-09-08
addons:
apt:
packages:
diff --git a/ci/cargo-config b/ci/cargo-config
index f1d42a3..40b79f0 100644
--- a/ci/cargo-config
+++ b/ci/cargo-config
@@ -1,2 +1,5 @@
[target.arm-linux-androideabi]
linker = "arm-linux-androideabi-gcc"
+
+[target.arm-unknown-linux-gnueabihf]
+linker = "arm-linux-gnueabihf-gcc-4.7"
diff --git a/ci/run-travis.sh b/ci/run-travis.sh
index a7d382f..5fa0786 100644
--- a/ci/run-travis.sh
+++ b/ci/run-travis.sh
@@ -11,14 +11,22 @@
# clang has better error messages and implements alignof more broadly
export CC=clang
+EXTRA_TARGETS=https://people.mozilla.org/~acrichton/libc-test/2015-09-08
+
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-musl" ]; then
- curl -s https://people.mozilla.org/~acrichton/libc-test/2015-09-08/x86_64-unknown-linux-musl.tar.gz | \
- tar xzf - -C $HOME/rust/lib/rustlib
+ curl -s $EXTRA_TARGETS/$TARGET.tar.gz | tar xzf - -C $HOME/rust/lib/rustlib
+ sh ci/run.sh $TARGET
+elif [ "$TARGET" = "arm-unknown-linux-gnueabihf" ]; then
+ curl -s $EXTRA_TARGETS/$TARGET.tar.gz | tar xzf - -C $HOME/rust/lib/rustlib
+ sudo apt-get install gcc-4.7-arm-linux-gnueabihf
+ mkdir .cargo
+ cp ci/cargo-config .cargo/config
+ export CC=arm-linux-gnueabihf-gcc-4.7
sh ci/run.sh $TARGET
else
# Download and install the relevant target locally, then run tests
diff --git a/ci/run.sh b/ci/run.sh
index 3f1f3bf..9e3e970 100644
--- a/ci/run.sh
+++ b/ci/run.sh
@@ -10,6 +10,8 @@
adb wait-for-device
adb push /root/target/$TARGET/debug/all-* /data/test
adb shell /data/test
+elif [ "$TARGET" = "arm-unknown-linux-gnueabihf" ]; then
+ qemu-arm -L /usr/arm-linux-gnueabi /root/target/$TARGET/debug/all-*
else
cargo test --manifest-path libc-test/Cargo.toml --target $TARGET
fi