Use build matrix on Travis CI

This makes it easy to see which target failed to build.
This commit is contained in:
Ian Douglas Scott
2018-03-17 14:59:54 -07:00
parent 362849f0f6
commit b7d68895b0
2 changed files with 8 additions and 15 deletions
+8 -3
View File
@@ -1,12 +1,17 @@
language: rust
env:
-
- TARGET=aarch64-unknown-linux-gnu
- TARGET=x86_64-unknown-redox
rust:
- nightly
cache: cargo
before_script:
- rustup component add rustfmt-preview
- rustup target add x86_64-unknown-redox
- rustup target add aarch64-unknown-linux-gnu
- if [ -n "$TARGET" ]; then rustup target add $TARGET; fi
script:
- bash ./ci.sh
- ./fmt.sh -- --write-mode=diff
- cargo build $([ -n "$TARGET" ] && echo --target="$TARGET")
- if [ -z "$TARGET" ]; then ./test.sh; fi
notifications:
email: false
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
set -ex
./fmt.sh -- --write-mode=diff
./test.sh
cargo build --target=x86_64-unknown-redox
if [ $(arch) == "x86_64" ]
then
cargo build --target=aarch64-unknown-linux-gnu
else
cargo build --target=x86_64-unknown-linux-gnu
fi