Skip to content

Commit 5978a65

Browse files
committed
Merge pull request #554 from libgit2/piet/travis-matrix
Add matrix build for iOS and Mac
2 parents 41d4e28 + de7f644 commit 5978a65

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
osx_image: xcode7
22
language: objective-c
3+
matrix:
4+
include:
5+
- osx_image: xcode7
6+
env: SCHEME="ObjectiveGit Mac"
7+
- osx_image: xcode7
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)