Skip to content
Snippets Groups Projects
Commit 23ab70b3 authored by Alex Crichton's avatar Alex Crichton
Browse files

Add CI for ARM linux

parent b9ca2325
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,9 @@ matrix: ...@@ -22,6 +22,9 @@ matrix:
- os: linux - os: linux
env: TARGET=x86_64-unknown-linux-musl env: TARGET=x86_64-unknown-linux-musl
rust: nightly-2015-09-08 rust: nightly-2015-09-08
- os: linux
env: TARGET=arm-unknown-linux-gnueabihf
rust: nightly-2015-09-08
addons: addons:
apt: apt:
packages: packages:
......
[target.arm-linux-androideabi] [target.arm-linux-androideabi]
linker = "arm-linux-androideabi-gcc" linker = "arm-linux-androideabi-gcc"
[target.arm-unknown-linux-gnueabihf]
linker = "arm-linux-gnueabihf-gcc-4.7"
...@@ -11,14 +11,22 @@ export HOST=$ARCH-$OS ...@@ -11,14 +11,22 @@ export HOST=$ARCH-$OS
# clang has better error messages and implements alignof more broadly # clang has better error messages and implements alignof more broadly
export CC=clang export CC=clang
EXTRA_TARGETS=https://people.mozilla.org/~acrichton/libc-test/2015-09-08
if [ "$TARGET" = "arm-linux-androideabi" ]; then if [ "$TARGET" = "arm-linux-androideabi" ]; then
# Pull a pre-built docker image for testing android, then run tests entirely # Pull a pre-built docker image for testing android, then run tests entirely
# within that image. # within that image.
docker pull alexcrichton/rust-libc-test docker pull alexcrichton/rust-libc-test
docker run -v `pwd`:/clone -t alexcrichton/rust-libc-test sh ci/run.sh $TARGET docker run -v `pwd`:/clone -t alexcrichton/rust-libc-test sh ci/run.sh $TARGET
elif [ "$TARGET" = "x86_64-unknown-linux-musl" ]; then 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 | \ curl -s $EXTRA_TARGETS/$TARGET.tar.gz | tar xzf - -C $HOME/rust/lib/rustlib
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 sh ci/run.sh $TARGET
else else
# Download and install the relevant target locally, then run tests # Download and install the relevant target locally, then run tests
......
...@@ -10,6 +10,8 @@ if [ "$TARGET" = "arm-linux-androideabi" ]; then ...@@ -10,6 +10,8 @@ if [ "$TARGET" = "arm-linux-androideabi" ]; then
adb wait-for-device adb wait-for-device
adb push /root/target/$TARGET/debug/all-* /data/test adb push /root/target/$TARGET/debug/all-* /data/test
adb shell /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 else
cargo test --manifest-path libc-test/Cargo.toml --target $TARGET cargo test --manifest-path libc-test/Cargo.toml --target $TARGET
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment