summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2017-12-09 04:28:31 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2017-12-09 04:28:31 +0000
commite5cc9152452db25bd0d30e1b0fe19e8733a59c2e (patch)
treeb2ac6c8354099dd47adb9c2a29f3fe304a6f4cd6
parent7eaa20810a656158e4d57b792c58481f10987788 (diff)
parentea0952f4783c961af0419430014a6b49ea35f981 (diff)
downloadnix-e5cc9152452db25bd0d30e1b0fe19e8733a59c2e.zip
Merge #815
815: Reduce ios builds r=Susurrus a=Susurrus Closes #669
-rw-r--r--.travis.yml42
-rw-r--r--ci/install.sh38
-rw-r--r--ci/script.sh22
3 files changed, 53 insertions, 49 deletions
diff --git a/.travis.yml b/.travis.yml
index 1553ce4f..04046aa9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,6 +16,24 @@ matrix:
# likes to have a big backlog on builds on those machines. This way at least
# all of the other jobs can finish while waiting on those builds.
include:
+ # iOS builds
+ # These are all done on a single machine because Travis rations their OS X
+ # builders so heavily that we otherwise can't merge PRs during the work week.
+ # Additionally they're moved to the front of the line to get them in the Travis
+ # OS X build queue first.
+ - env: TARGET="aarch64-apple-ios;armv7-apple-ios;armv7s-apple-ios;i386-apple-ios;x86_64-apple-ios" DISABLE_TESTS=1
+ rust: 1.20.0
+ os: osx
+
+ # Mac builds
+ # These are also moved to be first because they wait in a long queue with Travis
+ - env: TARGET=i686-apple-darwin
+ rust: 1.20.0
+ os: osx
+ - env: TARGET=x86_64-apple-darwin
+ rust: 1.20.0
+ os: osx
+
# Android
- env: TARGET=aarch64-linux-android DISABLE_TESTS=1
rust: 1.20.0
@@ -23,9 +41,6 @@ matrix:
rust: 1.20.0
- env: TARGET=armv7-linux-androideabi DISABLE_TESTS=1
rust: 1.20.0
- - env: TARGET=aarch64-apple-ios DISABLE_TESTS=1
- rust: 1.20.0
- os: osx
- env: TARGET=i686-linux-android DISABLE_TESTS=1
rust: 1.20.0
- env: TARGET=x86_64-linux-android DISABLE_TESTS=1
@@ -34,45 +49,30 @@ matrix:
# Linux
- env: TARGET=aarch64-unknown-linux-gnu
rust: 1.20.0
- - env: TARGET=armv7-apple-ios DISABLE_TESTS=1
- rust: 1.20.0
- os: osx
- env: TARGET=arm-unknown-linux-gnueabi
rust: 1.20.0
- env: TARGET=arm-unknown-linux-musleabi DISABLE_TESTS=1
rust: 1.20.0
- env: TARGET=armv7-unknown-linux-gnueabihf
rust: 1.20.0
- - env: TARGET=armv7s-apple-ios DISABLE_TESTS=1
- rust: 1.20.0
- os: osx
- env: TARGET=i686-unknown-linux-gnu
rust: 1.20.0
- env: TARGET=i686-unknown-linux-musl
rust: 1.20.0
- env: TARGET=mips-unknown-linux-gnu
rust: 1.20.0
- - env: TARGET=i386-apple-ios DISABLE_TESTS=1
- rust: 1.20.0
- os: osx
- env: TARGET=mips64-unknown-linux-gnuabi64
rust: 1.20.0
- env: TARGET=mips64el-unknown-linux-gnuabi64
rust: 1.20.0
- env: TARGET=mipsel-unknown-linux-gnu
rust: 1.20.0
- - env: TARGET=x86_64-apple-ios DISABLE_TESTS=1
- rust: 1.20.0
- os: osx
- env: TARGET=powerpc-unknown-linux-gnu DISABLE_TESTS=1
rust: 1.20.0
- env: TARGET=powerpc64-unknown-linux-gnu
rust: 1.20.0
- env: TARGET=powerpc64le-unknown-linux-gnu
rust: 1.20.0
- - env: TARGET=i686-apple-darwin
- rust: 1.20.0
- os: osx
- env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1
rust: 1.20.0
- env: TARGET=x86_64-unknown-linux-gnu
@@ -89,10 +89,6 @@ matrix:
- env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1
rust: 1.20.0
- - env: TARGET=x86_64-apple-darwin
- rust: 1.20.0
- os: osx
-
# Make sure stable is always working too
- env: TARGET=x86_64-unknown-linux-gnu
rust: stable
@@ -100,7 +96,7 @@ matrix:
before_install: set -e
install:
- - sh ci/install.sh
+ - bash ci/install.sh
- source ~/.cargo/env || true
script:
diff --git a/ci/install.sh b/ci/install.sh
index 80e18e47..5997c7cb 100644
--- a/ci/install.sh
+++ b/ci/install.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
set -ex
main() {
@@ -12,23 +13,26 @@ main() {
# Builds for iOS are done on OSX, but require the specific target to be
# installed.
- case $TARGET in
- aarch64-apple-ios)
- rustup target install aarch64-apple-ios
- ;;
- armv7-apple-ios)
- rustup target install armv7-apple-ios
- ;;
- armv7s-apple-ios)
- rustup target install armv7s-apple-ios
- ;;
- i386-apple-ios)
- rustup target install i386-apple-ios
- ;;
- x86_64-apple-ios)
- rustup target install x86_64-apple-ios
- ;;
- esac
+ IFS=';' read -ra TARGET_ARRAY <<< "$TARGET"
+ for t in "${TARGET_ARRAY[@]}"; do
+ case $t in
+ aarch64-apple-ios)
+ rustup target install aarch64-apple-ios
+ ;;
+ armv7-apple-ios)
+ rustup target install armv7-apple-ios
+ ;;
+ armv7s-apple-ios)
+ rustup target install armv7s-apple-ios
+ ;;
+ i386-apple-ios)
+ rustup target install i386-apple-ios
+ ;;
+ x86_64-apple-ios)
+ rustup target install x86_64-apple-ios
+ ;;
+ esac
+ done
# This fetches latest stable release
local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \
diff --git a/ci/script.sh b/ci/script.sh
index df61c35a..e1d1ab7e 100644
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
# This script takes care of testing your crate
set -ex
@@ -8,17 +9,20 @@ main() {
export RUSTFLAGS=--cfg=travis
fi
- # Build debug and release targets
- cross build --target $TARGET
- cross build --target $TARGET --release
+ IFS=';' read -ra TARGET_ARRAY <<< "$TARGET"
+ for t in "${TARGET_ARRAY[@]}"; do
+ # Build debug and release targets
+ cross build --target $t
+ cross build --target $t --release
- if [ ! -z $DISABLE_TESTS ]; then
- return
- fi
+ if [ ! -z $DISABLE_TESTS ]; then
+ continue
+ fi
- # Run tests on debug and release targets.
- cross test --target $TARGET
- cross test --target $TARGET --release
+ # Run tests on debug and release targets.
+ cross test --target $t
+ cross test --target $t --release
+ done
}
# we don't run the "test phase" when doing deploys