Skip to content

Commit 1e3f6c5

Browse files
committed
Add matrix build for iOS and Mac
1 parent 8b46e45 commit 1e3f6c5

File tree

2 files changed

+25
-8
lines changed

2 files changed

+25
-8
lines changed

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
osx_image: xcode7
1+
osx_image: xcode7.2
22
language: objective-c
3+
matrix:
4+
include:
5+
- osx_image: xcode7.2
6+
env: SCHEME="ObjectiveGit Mac"
7+
- osx_image: xcode7.2
8+
env: SCHEME="ObjectiveGit iOS"
39
before_install:
410
- brew update
511
- brew outdated xctool || brew upgrade xctool

script/cibuild

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,19 @@ main ()
6262
"$BOOTSTRAP" || exit $?
6363
fi
6464

65-
echo "*** Prebuilding OpenSSL"
66-
$SCRIPT_DIR/update_libssl_ios
65+
if [ "$SCHEME" == "ObjectiveGit iOS" ]
66+
then
67+
echo "*** Prebuilding OpenSSL"
68+
$SCRIPT_DIR/update_libssl_ios
69+
fi
6770

68-
echo "*** The following schemes will be built:"
69-
echo "$SCHEMES" | xargs -n 1 echo " "
70-
echo
71+
if [ -z "${SCHEME+x}" ] && [ "${#SCHEME[@]}" = 0 ]
72+
then
73+
echo "*** The following schemes will be built:"
74+
echo "$SCHEMES" | xargs -n 1 echo " "
75+
echo
7176

72-
echo "$SCHEMES" | xargs -n 1 | (
77+
echo "$SCHEMES" | xargs -n 1 | (
7378
local status=0
7479

7580
while read scheme
@@ -78,7 +83,13 @@ main ()
7883
done
7984

8085
exit $status
81-
)
86+
)
87+
else
88+
echo "*** The following scheme will be built $SCHEME"
89+
local status=0
90+
build_scheme "$SCHEME" || status=1
91+
exit $status
92+
fi
8293
}
8394

8495
find_pattern ()

0 commit comments

Comments
 (0)