Add ARM and Aarch64 to Travis CI (build only, no tests).

This commit is contained in:
Brian Smith 2016-02-02 15:52:52 -10:00
parent d582ae38dc
commit 6cc1d68838
5 changed files with 70 additions and 13 deletions

View File

@ -2,6 +2,30 @@ language: rust
matrix:
fast_finish: true
include:
- env: TARGET_X=aarch64-unknown-linux-gnu CC_X=aarch64-linux-gnu-gcc CXX_X=aarch64-linux-gnu-g++ MODE_X=DEBUG
rust: stable
- env: TARGET_X=aarch64-unknown-linux-gnu CC_X=aarch64-linux-gnu-gcc CXX_X=aarch64-linux-gnu-g++ MODE_X=RELEASE
rust: stable
- env: TARGET_X=aarch64-unknown-linux-gnu CC_X=aarch64-linux-gnu-gcc CXX_X=aarch64-linux-gnu-g++ MODE_X=DEBUG
rust: nightly
- env: TARGET_X=aarch64-unknown-linux-gnu CC_X=aarch64-linux-gnu-gcc CXX_X=aarch64-linux-gnu-g++ MODE_X=RELEASE
rust: nightly
- env: TARGET_X=arm-unknown-linux-gnueabi CC_X=arm-linux-gnueabi-gcc CXX_X=arm-linux-gnueabi-g++ MODE_X=DEBUG
rust: stable
- env: TARGET_X=arm-unknown-linux-gnueabi CC_X=arm-linux-gnueabi-gcc CXX_X=arm-linux-gnueabi-g++ MODE_X=RELEASE
rust: stable
- env: TARGET_X=arm-unknown-linux-gnueabi CC_X=arm-linux-gnueabi-gcc CXX_X=arm-linux-gnueabi-g++ MODE_X=DEBUG
rust: nightly
- env: TARGET_X=arm-unknown-linux-gnueabi CC_X=arm-linux-gnueabi-gcc CXX_X=arm-linux-gnueabi-g++ MODE_X=RELEASE
rust: nightly
# The lines from "# BEGIN GENERATED" through "# END GENERATED" are
# generated by running |python mk/update-travis-yml.py|. Any changes
# made to those lines will be overwritten while other lines will be left

View File

@ -85,9 +85,13 @@ in the table below.
<table>
<tr><th>OS</th><th>Arch.</th><th>Compilers</th><th>Status</th>
<tr><td>Linux</td>
<td>x86, x64<td>GCC 4.6, 4.8, 4.9, 5; Clang 3.4, 3.6, 3.7, 3.8 (trunk)</td>
<td rowspan=2><a title="Build Status" href=https://travis-ci.org/briansmith/ring><img src=https://travis-ci.org/briansmith/ring.svg?branch=master></a>
<tr><td rowspan=2>Linux</td>
<td>x86, x64</td>
<td>GCC 4.6, 4.8, 4.9, 5; Clang 3.4, 3.6, 3.7, 3.8 (trunk)</td>
<td rowspan=3><a title="Build Status" href=https://travis-ci.org/briansmith/ring><img src=https://travis-ci.org/briansmith/ring.svg?branch=master></a>
</tr>
<tr><td>32-bit ARM, AAarch64</td>
<td>Linaro GCC 5.1-2015.08 (build only, no tests are run)</td>
</tr>
<tr><td>Mac OS X</td>
<td>x64</td>

View File

@ -18,15 +18,32 @@ set -eux -o pipefail
IFS=$'\n\t'
printenv
$CC_X --version
$CXX_X --version
make --version
cargo version
rustc --version
case $TARGET_X in
aarch64-unknown-linux-gnu)
DL_TARGET=aarch64-linux-gnu
DL_DIGEST=b9137008744d9009877f662dbac7481d673cdcb1798e727e325a37c98a0f63da
;;
arm-unknown-linux-gnueabi)
DL_TARGET=arm-linux-gnueabi
DL_DIGEST=1c11a944d3e515405e01effc129f3bbf24effb300effa10bf486c9119378ccd7
;;
*)
;;
esac
if [[ -n ${DL_TARGET-} ]]; then
DL_ROOT=https://releases.linaro.org/components/toolchain/binaries/
DL_RELEASE=5.1-2015.08
DL_BASENAME=gcc-linaro-$DL_RELEASE-x86_64_$DL_TARGET
wget $DL_ROOT/$DL_RELEASE/$DL_TARGET/$DL_BASENAME.tar.xz
echo "$DL_DIGEST $DL_BASENAME.tar.xz" | sha256sum -c
tar xf $DL_BASENAME.tar.xz
export PATH=$PWD/$DL_BASENAME/bin:$PATH
fi
if [[ ! "$TARGET_X" =~ "x86_64-" ]]; then
./mk/travis-install-rust-x86.sh
./mk/travis-install-rust-std.sh
# By default cargo/rustc seems to use cc for linking, We installed the
# multilib support that corresponds to $CC_X and $CXX_X but unless cc happens
@ -38,13 +55,25 @@ if [[ ! "$TARGET_X" =~ "x86_64-" ]]; then
cat .cargo/config
fi
$CC_X --version
$CXX_X --version
make --version
cargo version
rustc --version
if [[ "$MODE_X" == "RELWITHDEBINFO" ]]; then mode=--release; fi
CC=$CC_X CXX=$CXX_X cargo build -j2 ${mode-} --verbose --target=$TARGET_X
CC=$CC_X CXX=$CXX_X cargo test -j2 ${mode-} --verbose --target=$TARGET_X
CC=$CC_X CXX=$CXX_X cargo doc --verbose
case $TARGET_X in
arm-unknown-linux-gnueabi|aarch64-unknown-linux-gnu)
;;
*)
CC=$CC_X CXX=$CXX_X cargo test -j2 ${mode-} --verbose --target=$TARGET_X
CC=$CC_X CXX=$CXX_X cargo doc --verbose
;;
esac
CC=$CC_X CXX=$CXX_X cargo clean --verbose

View File

@ -78,8 +78,8 @@ targets = {
"x86_64-apple-darwin",
],
"linux" : [
"x86_64-unknown-linux-gnu",
"i686-unknown-linux-gnu",
"x86_64-unknown-linux-gnu",
],
}