Skip to content

Commit 545287c

Browse files
committed
Merge pull request #307 from asarium/ci/macosx
Add CI support for MacOSX
2 parents 00c3733 + 84a315d commit 545287c

5 files changed

Lines changed: 70 additions & 12 deletions

File tree

.travis.yml

Lines changed: 33 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,38 @@
11
language: cpp
2-
os:
3-
- linux
4-
env:
5-
- AUTOGEN_CONFIG="--enable-debug"
6-
- AUTOGEN_CONFIG=""
7-
compiler:
8-
- gcc
9-
- clang
2+
sudo: true
3+
matrix:
4+
include:
5+
- os: linux
6+
compiler: gcc
7+
env: CONFIGURATION="Release"
8+
- os: linux
9+
compiler: clang
10+
env: CONFIGURATION="Release"
11+
- os: osx
12+
compiler: clang
13+
env: CONFIGURATION="Release" MACOSX_ARCH=i386
14+
- os: osx
15+
compiler: clang
16+
env: CONFIGURATION="Release" MACOSX_ARCH=x86_64
17+
18+
- os: linux
19+
compiler: gcc
20+
env: CONFIGURATION="Debug"
21+
- os: linux
22+
compiler: clang
23+
env: CONFIGURATION="Debug"
24+
- os: osx
25+
compiler: clang
26+
env: CONFIGURATION="Debug" MACOSX_ARCH=i386
27+
- os: osx
28+
compiler: clang
29+
env: CONFIGURATION="Debug" MACOSX_ARCH=x86_64
30+
1031
before_install:
11-
- sudo apt-get update -qq
32+
- ./ci/travis/before_install.sh
1233
install:
13-
- sudo apt-get install libopenal-dev libogg-dev libvorbis-dev build-essential automake1.10 autoconf libsdl1.2-dev libtheora-dev libreadline6-dev libpng12-dev libjpeg62-dev liblua5.1-0-dev libjansson-dev libtool
34+
- ./ci/travis/install.sh
1435
before_script:
15-
- ./autogen.sh $AUTOGEN_CONFIG
36+
- ./ci/travis/before_script.sh
1637
script:
17-
- make -j 2
38+
- ./ci/travis/script.sh

ci/travis/before_install.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env sh
2+
3+
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
4+
sudo apt-get update -qq
5+
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
6+
# Nothing to do here
7+
:
8+
fi

ci/travis/before_script.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/usr/bin/env sh
2+
3+
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
4+
AUTOGEN_CONFIG=
5+
6+
if [ "$CONFIGURATION" = "Debug" ]; then
7+
AUTOGEN_CONFIG=--enable-debug
8+
fi
9+
10+
./autogen.sh $AUTOGEN_CONFIG
11+
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
12+
cd projects/Xcode4
13+
tar -xvzf Frameworks.tgz
14+
fi

ci/travis/install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env sh
2+
3+
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
4+
sudo apt-get install libopenal-dev libogg-dev libvorbis-dev build-essential automake1.10 autoconf libsdl1.2-dev libtheora-dev libreadline6-dev libpng12-dev libjpeg62-dev liblua5.1-0-dev libjansson-dev libtool
5+
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
6+
gem install xcpretty
7+
fi

ci/travis/script.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env sh
2+
3+
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
4+
make -j 2
5+
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
6+
cd projects/Xcode4
7+
xcodebuild ARCHS=$MACOSX_ARCH ONLY_ACTIVE_ARCH=NO -configuration "$CONFIGURATION" | xcpretty -c
8+
fi

0 commit comments

Comments
 (0)