summaryrefslogtreecommitdiff
path: root/ci/install.sh
diff options
context:
space:
mode:
authorBryant Mairs <bryantmairs@google.com>2017-12-08 08:21:15 -0800
committerBryant Mairs <bryantmairs@google.com>2017-12-08 17:55:13 -0800
commit112dca300c2e4a15c99b8d92963c370d0ac0c693 (patch)
treeb04d1d57470f3fc59b64535f90e7bab5592fb00f /ci/install.sh
parent7eaa20810a656158e4d57b792c58481f10987788 (diff)
downloadnix-112dca300c2e4a15c99b8d92963c370d0ac0c693.zip
Support building and testing multiple targets at once
Specifying multiple targets can be done by setting the environment variable to a semi-colon delimited list of targets.
Diffstat (limited to 'ci/install.sh')
-rw-r--r--ci/install.sh38
1 files changed, 21 insertions, 17 deletions
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 \