Skip to content

Commit e5cc915

Browse files
committed
Merge #815
815: Reduce ios builds r=Susurrus a=Susurrus Closes #669
2 parents 7eaa208 + ea0952f commit e5cc915

File tree

3 files changed

+53
-49
lines changed

3 files changed

+53
-49
lines changed

.travis.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,31 @@ matrix:
1616
# likes to have a big backlog on builds on those machines. This way at least
1717
# all of the other jobs can finish while waiting on those builds.
1818
include:
19+
# iOS builds
20+
# These are all done on a single machine because Travis rations their OS X
21+
# builders so heavily that we otherwise can't merge PRs during the work week.
22+
# Additionally they're moved to the front of the line to get them in the Travis
23+
# OS X build queue first.
24+
- env: TARGET="aarch64-apple-ios;armv7-apple-ios;armv7s-apple-ios;i386-apple-ios;x86_64-apple-ios" DISABLE_TESTS=1
25+
rust: 1.20.0
26+
os: osx
27+
28+
# Mac builds
29+
# These are also moved to be first because they wait in a long queue with Travis
30+
- env: TARGET=i686-apple-darwin
31+
rust: 1.20.0
32+
os: osx
33+
- env: TARGET=x86_64-apple-darwin
34+
rust: 1.20.0
35+
os: osx
36+
1937
# Android
2038
- env: TARGET=aarch64-linux-android DISABLE_TESTS=1
2139
rust: 1.20.0
2240
- env: TARGET=arm-linux-androideabi DISABLE_TESTS=1
2341
rust: 1.20.0
2442
- env: TARGET=armv7-linux-androideabi DISABLE_TESTS=1
2543
rust: 1.20.0
26-
- env: TARGET=aarch64-apple-ios DISABLE_TESTS=1
27-
rust: 1.20.0
28-
os: osx
2944
- env: TARGET=i686-linux-android DISABLE_TESTS=1
3045
rust: 1.20.0
3146
- env: TARGET=x86_64-linux-android DISABLE_TESTS=1
@@ -34,45 +49,30 @@ matrix:
3449
# Linux
3550
- env: TARGET=aarch64-unknown-linux-gnu
3651
rust: 1.20.0
37-
- env: TARGET=armv7-apple-ios DISABLE_TESTS=1
38-
rust: 1.20.0
39-
os: osx
4052
- env: TARGET=arm-unknown-linux-gnueabi
4153
rust: 1.20.0
4254
- env: TARGET=arm-unknown-linux-musleabi DISABLE_TESTS=1
4355
rust: 1.20.0
4456
- env: TARGET=armv7-unknown-linux-gnueabihf
4557
rust: 1.20.0
46-
- env: TARGET=armv7s-apple-ios DISABLE_TESTS=1
47-
rust: 1.20.0
48-
os: osx
4958
- env: TARGET=i686-unknown-linux-gnu
5059
rust: 1.20.0
5160
- env: TARGET=i686-unknown-linux-musl
5261
rust: 1.20.0
5362
- env: TARGET=mips-unknown-linux-gnu
5463
rust: 1.20.0
55-
- env: TARGET=i386-apple-ios DISABLE_TESTS=1
56-
rust: 1.20.0
57-
os: osx
5864
- env: TARGET=mips64-unknown-linux-gnuabi64
5965
rust: 1.20.0
6066
- env: TARGET=mips64el-unknown-linux-gnuabi64
6167
rust: 1.20.0
6268
- env: TARGET=mipsel-unknown-linux-gnu
6369
rust: 1.20.0
64-
- env: TARGET=x86_64-apple-ios DISABLE_TESTS=1
65-
rust: 1.20.0
66-
os: osx
6770
- env: TARGET=powerpc-unknown-linux-gnu DISABLE_TESTS=1
6871
rust: 1.20.0
6972
- env: TARGET=powerpc64-unknown-linux-gnu
7073
rust: 1.20.0
7174
- env: TARGET=powerpc64le-unknown-linux-gnu
7275
rust: 1.20.0
73-
- env: TARGET=i686-apple-darwin
74-
rust: 1.20.0
75-
os: osx
7676
- env: TARGET=s390x-unknown-linux-gnu DISABLE_TESTS=1
7777
rust: 1.20.0
7878
- env: TARGET=x86_64-unknown-linux-gnu
@@ -89,18 +89,14 @@ matrix:
8989
- env: TARGET=x86_64-unknown-netbsd DISABLE_TESTS=1
9090
rust: 1.20.0
9191

92-
- env: TARGET=x86_64-apple-darwin
93-
rust: 1.20.0
94-
os: osx
95-
9692
# Make sure stable is always working too
9793
- env: TARGET=x86_64-unknown-linux-gnu
9894
rust: stable
9995

10096
before_install: set -e
10197

10298
install:
103-
- sh ci/install.sh
99+
- bash ci/install.sh
104100
- source ~/.cargo/env || true
105101

106102
script:

ci/install.sh

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
set -ex
23

34
main() {
@@ -12,23 +13,26 @@ main() {
1213

1314
# Builds for iOS are done on OSX, but require the specific target to be
1415
# installed.
15-
case $TARGET in
16-
aarch64-apple-ios)
17-
rustup target install aarch64-apple-ios
18-
;;
19-
armv7-apple-ios)
20-
rustup target install armv7-apple-ios
21-
;;
22-
armv7s-apple-ios)
23-
rustup target install armv7s-apple-ios
24-
;;
25-
i386-apple-ios)
26-
rustup target install i386-apple-ios
27-
;;
28-
x86_64-apple-ios)
29-
rustup target install x86_64-apple-ios
30-
;;
31-
esac
16+
IFS=';' read -ra TARGET_ARRAY <<< "$TARGET"
17+
for t in "${TARGET_ARRAY[@]}"; do
18+
case $t in
19+
aarch64-apple-ios)
20+
rustup target install aarch64-apple-ios
21+
;;
22+
armv7-apple-ios)
23+
rustup target install armv7-apple-ios
24+
;;
25+
armv7s-apple-ios)
26+
rustup target install armv7s-apple-ios
27+
;;
28+
i386-apple-ios)
29+
rustup target install i386-apple-ios
30+
;;
31+
x86_64-apple-ios)
32+
rustup target install x86_64-apple-ios
33+
;;
34+
esac
35+
done
3236

3337
# This fetches latest stable release
3438
local tag=$(git ls-remote --tags --refs --exit-code https://github.com/japaric/cross \

ci/script.sh

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/bin/bash
12
# This script takes care of testing your crate
23

34
set -ex
@@ -8,17 +9,20 @@ main() {
89
export RUSTFLAGS=--cfg=travis
910
fi
1011

11-
# Build debug and release targets
12-
cross build --target $TARGET
13-
cross build --target $TARGET --release
12+
IFS=';' read -ra TARGET_ARRAY <<< "$TARGET"
13+
for t in "${TARGET_ARRAY[@]}"; do
14+
# Build debug and release targets
15+
cross build --target $t
16+
cross build --target $t --release
1417

15-
if [ ! -z $DISABLE_TESTS ]; then
16-
return
17-
fi
18+
if [ ! -z $DISABLE_TESTS ]; then
19+
continue
20+
fi
1821

19-
# Run tests on debug and release targets.
20-
cross test --target $TARGET
21-
cross test --target $TARGET --release
22+
# Run tests on debug and release targets.
23+
cross test --target $t
24+
cross test --target $t --release
25+
done
2226
}
2327

2428
# we don't run the "test phase" when doing deploys

0 commit comments

Comments
 (0)