Skip to content

Commit

Permalink
Travis multi-OS
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhvh committed May 18, 2014
1 parent 34bab37 commit 6615cd2
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
os:
- osx
- linux
language: c
before_script: travis/before-script.sh
script: travis/script.sh
4 changes: 3 additions & 1 deletion travis/before-script.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/bin/sh
set -e

sudo apt-get install libsasl2-dev libssl-dev zlib1g-dev
if test "x`uname`" = xLinux ; then
sudo apt-get install libsasl2-dev libssl-dev zlib1g-dev
fi
30 changes: 21 additions & 9 deletions travis/script.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
#!/bin/sh
set -e

distdir=libetpan-travis-build
./autogen.sh --with-curl=no --disable-db --with-expat=no
make dist distdir=$distdir
tar xzf $distdir.tar.gz
cd $distdir
./configure --with-curl=no --disable-db --with-expat=no
make
cd tests
make imap-sample
if test "x`uname`" = xLinux ; then
distdir=libetpan-travis-build
./autogen.sh --with-curl=no --disable-db --with-expat=no
make dist distdir=$distdir
tar xzf $distdir.tar.gz
cd $distdir
./configure --with-curl=no --disable-db --with-expat=no
make
cd tests
make imap-sample
else
echo Building library for iPhoneOS
xctool -project build-mac/libetpan.xcodeproj -sdk iphoneos7.1 -scheme "libetpan ios" build ARCHS="armv7 armv7s arm64"
echo Building library for iPhoneSimulator
xctool -project build-mac/libetpan.xcodeproj -sdk iphonesimulator7.1 -scheme "libetpan ios" build ARCHS="i386 x86_64"

echo Building library for Mac
xctool -project build-mac/libetpan.xcodeproj -sdk macosx10.8 -scheme "static libetpan" build
echo Building framework for Mac
xctool -project build-mac/libetpan.xcodeproj -sdk macosx10.8 -scheme "libetpan" build
fi

0 comments on commit 6615cd2

Please sign in to comment.