summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2015-07-29 00:21:08 +0200
committerAlexis Hildebrandt <afh@surryhill.net>2015-07-31 03:30:58 +0200
commit81ee98c17c96aed21d437457e4917fe6a3a8c47b (patch)
tree67e6787ebebef30ffbca4cd93ce8d0ed42a37594 /tools
parent3008a6a6bed9dcc98981d4c66e978eb6eacf1e02 (diff)
downloadfork-ledger-81ee98c17c96aed21d437457e4917fe6a3a8c47b.tar.gz
fork-ledger-81ee98c17c96aed21d437457e4917fe6a3a8c47b.tar.bz2
fork-ledger-81ee98c17c96aed21d437457e4917fe6a3a8c47b.zip
[travis] Add multi-os build configuration
and use a custom build of boost.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/travis-before_install.sh16
-rwxr-xr-xtools/travis-install.sh22
2 files changed, 38 insertions, 0 deletions
diff --git a/tools/travis-before_install.sh b/tools/travis-before_install.sh
new file mode 100755
index 00000000..fe010945
--- /dev/null
+++ b/tools/travis-before_install.sh
@@ -0,0 +1,16 @@
+#!/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
+ 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..4e8bdc48
--- /dev/null
+++ b/tools/travis-install.sh
@@ -0,0 +1,22 @@
+#!/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
+ (cd "${BOOST_ROOT}"
+ ./bootstrap.sh --with-libraries="${BOOST_LIBS}"
+ ./b2 threading=multi --prefix="${BOOST_ROOT}" -d0 install
+ )
+fi