From 3411581d898e5102096b49d9e1701f9326f4de87 Mon Sep 17 00:00:00 2001 From: Jason Paryani Date: Thu, 11 Dec 2014 22:11:25 -0800 Subject: [PATCH] Change travis to build with and without libcapnp pre-installed --- .travis.yml | 14 +++++--------- buildutils/setup_travis.sh | 12 ++++++++++++ 2 files changed, 17 insertions(+), 9 deletions(-) create mode 100755 buildutils/setup_travis.sh diff --git a/.travis.yml b/.travis.yml index 570a21d..099c4b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,18 +6,14 @@ python: - 3.3 - pypy +env: + - BUILD_CAPNP=true + - BUILD_CAPNP= + compiler: gcc before_install: - - sudo apt-get install autoconf automake libtool autotools-dev - - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - - sudo apt-get -qq update - - sudo apt-get -qq install g++-4.8 libstdc++-4.8-dev - - sudo update-alternatives --quiet --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 - --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 - --slave /usr/bin/gcov gcov /usr/bin/gcov-4.8 - - sudo update-alternatives --quiet --set gcc /usr/bin/gcc-4.8 - - wget https://github.com/kentonv/capnproto/archive/master.zip && unzip master.zip && cd capnproto-master/c++ && ./setup-autotools.sh && autoreconf -i && ./configure && make -j6 check && sudo make install && sudo ldconfig && cd ../.. + - buildutils/setup_travis.sh - pip install -U setuptools - pip install cython - pip install pytest diff --git a/buildutils/setup_travis.sh b/buildutils/setup_travis.sh new file mode 100755 index 0000000..c014767 --- /dev/null +++ b/buildutils/setup_travis.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test +sudo apt-get -qq update +sudo apt-get -qq install g++-4.8 libstdc++-4.8-dev +sudo update-alternatives --quiet --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 --slave /usr/bin/gcov gcov /usr/bin/gcov-4.8 +sudo update-alternatives --quiet --set gcc /usr/bin/gcc-4.8 + +if ! [ -z "${BUILD_CAPNP}" ]; then + sudo apt-get install autoconf automake libtool autotools-dev + wget https://github.com/kentonv/capnproto/archive/master.zip && unzip master.zip && cd capnproto-master/c++ && ./setup-autotools.sh && autoreconf -i && ./configure && make -j6 check && sudo make install && sudo ldconfig && cd ../.. +fi