Add CI for ARM linux
This commit is contained in:
parent
b9ca2325e9
commit
23ab70b3cb
|
@ -22,6 +22,9 @@ matrix:
|
|||
- 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:
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -11,14 +11,22 @@ export HOST=$ARCH-$OS
|
|||
# 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
|
||||
|
|
|
@ -10,6 +10,8 @@ if [ "$TARGET" = "arm-linux-androideabi" ]; then
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue