summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2017-05-15 21:16:13 +0100
committerChris Wilson <chris+github@qwirx.com>2017-06-18 11:11:08 +0100
commit14e48b9851920cb2beb000610b36391879dcb201 (patch)
tree0aa1191b68a9070c9db12824cff4573732fac7d5
parenta3e328ef8f83d81f74b6a334ff6ad66d7dcbd534 (diff)
Add Boost to Travis build environment, and OSX builds
-rw-r--r--.travis.yml14
-rwxr-xr-xinfrastructure/travis-build.sh34
2 files changed, 42 insertions, 6 deletions
diff --git a/.travis.yml b/.travis.yml
index 96e8bf26..57bd36f3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,10 +19,12 @@ addons:
packages:
- cmake
- cmake-data
+ - libboost-dev
- libdb-dev
- libreadline-dev
- libssl-dev
- libwww-perl
+ - time
- xsltproc
- zlib1g-dev
@@ -32,5 +34,15 @@ env:
- BUILD=cmake TEST_TARGET=debug
- BUILD=cmake TEST_TARGET=release
+os:
+ - linux
+ - osx
+
+matrix:
+ exclude:
+ # No point testing both GCC and Clang on Mac OS X, as they're the same thing.
+ - os: osx
+ compiler: gcc
+
script:
- - ./infrastructure/travis-build.sh
+ - env EXTRA_MAKE_ARGS=-j2 ./infrastructure/travis-build.sh
diff --git a/infrastructure/travis-build.sh b/infrastructure/travis-build.sh
index 72a187b3..74b58a3d 100755
--- a/infrastructure/travis-build.sh
+++ b/infrastructure/travis-build.sh
@@ -3,23 +3,47 @@
set -e
set -x
+if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ brew update
+ # Travis appears to have Boost and OpenSSL installed already:
+ # brew install boost ccache openssl
+ ls /usr/local /usr/local/opt /usr/local/opt/openssl
+ brew install ccache
+fi
+
ccache -s
if [ "$BUILD" = 'cmake' ]; then
+ if [ -z "$TEST_TARGET" ]; then
+ echo "TEST_TARGET must be set to 'release' or 'debug' for CMake builds"
+ exit 2
+ fi
+
+ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ EXTRA_ARGS="-DOPENSSL_ROOT_DIR=/usr/local/opt/openssl -DBOOST_ROOT=/usr/local/opt/boost"
+ fi
+
cd `dirname $0`
mkdir -p cmake/build
cd cmake/build
cmake --version
- cmake -DCMAKE_BUILD_TYPE:STRING=$TEST_TARGET ..
- make install
+ cmake -DCMAKE_BUILD_TYPE:STRING=$TEST_TARGET $EXTRA_ARGS "$@" ..
+ make
+
[ "$TEST" = "n" ] || ctest -C $TEST_TARGET -V
else
+ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+ EXTRA_ARGS="--with-ssl-lib=/usr/local/opt/openssl/lib --with-ssl-headers=/usr/local/opt/openssl/include --with-boost=/usr/local/opt/boost"
+ fi
+
cd `dirname $0`/..
./bootstrap
- ./configure CC="ccache $CC" CXX="ccache $CXX" "$@"
+ ./configure CC="ccache $CC" CXX="ccache $CXX" $EXTRA_ARGS "$@"
grep CXX config.status
- make V=1
- ./runtest.pl ALL $TEST_TARGET
+ make V=1 $EXTRA_MAKE_ARGS
+
+ [ "$TEST" = "n" ] || ./runtest.pl ALL $TEST_TARGET
+
if [ "$TEST_TARGET" = "release" ]; then
make
make parcels