From b7d68895b04f242b3fbdb107b168273aca1cfe24 Mon Sep 17 00:00:00 2001 From: Ian Douglas Scott Date: Sat, 17 Mar 2018 14:59:54 -0700 Subject: [PATCH] Use build matrix on Travis CI This makes it easy to see which target failed to build. --- .travis.yml | 11 ++++++++--- ci.sh | 12 ------------ 2 files changed, 8 insertions(+), 15 deletions(-) delete mode 100755 ci.sh diff --git a/.travis.yml b/.travis.yml index 15083598be..6fd8524c77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/ci.sh b/ci.sh deleted file mode 100755 index fd7dd91a48..0000000000 --- a/ci.sh +++ /dev/null @@ -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