From 1ef946a9b9b45698fd0fc603c196c58072fb735c Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Fri, 31 Jul 2015 10:29:51 +0200 Subject: [travis] Fix Travis CI builds Add multi-os build configuration and use a custom build of boost. --- tools/travis-before_install.sh | 17 +++++++++++++++++ tools/travis-install.sh | 23 +++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100755 tools/travis-before_install.sh create mode 100755 tools/travis-install.sh (limited to 'tools') diff --git a/tools/travis-before_install.sh b/tools/travis-before_install.sh new file mode 100755 index 00000000..a1800021 --- /dev/null +++ b/tools/travis-before_install.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +#set -x +set -e +set -o pipefail + +if [ "${TRAVIS_OS_NAME}" = "osx" ]; then + brew update +fi + +if [ -n "${BOOST_VERSION}" ]; then + echo "Downloading boost ${BOOST_VERSION}" + mkdir -p $BOOST_ROOT + wget --no-verbose --output-document=- \ + http://sourceforge.net/projects/boost/files/boost/${BOOST_VERSION}/boost_${BOOST_VERSION//./_}.tar.bz2/download \ + | tar jxf - --strip-components=1 -C "${BOOST_ROOT}" +fi diff --git a/tools/travis-install.sh b/tools/travis-install.sh new file mode 100755 index 00000000..b5039d5c --- /dev/null +++ b/tools/travis-install.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash + +#set -x +set -e +set -o pipefail + +if [ "${TRAVIS_OS_NAME}" = "osx" ]; then + for formula in $(echo "${BREWS//,/ }"); do + echo "Checking ${formula} formula" + brew outdated "${formula}" \ + || (brew unlink "${formula}" + brew install "${formula}" + ) + done +fi + +if [ -d "${BOOST_ROOT}" ]; then + echo "Installing boost ${BOOST_VERSION} in ${BOOST_ROOT}" + (cd "${BOOST_ROOT}" + ./bootstrap.sh --with-libraries="${BOOST_LIBS}" + ./b2 threading=multi --prefix="${BOOST_ROOT}" -d0 install + ) +fi -- cgit v1.2.3