Skip to content

Commit

Permalink
Switch to a travis matrix and apt addon
Browse files Browse the repository at this point in the history
  • Loading branch information
pnorman committed May 8, 2015
1 parent 6a9bbcb commit db5ea53
Showing 1 changed file with 61 additions and 31 deletions.
92 changes: 61 additions & 31 deletions .travis.yml
@@ -1,43 +1,73 @@
language: cpp
compiler:
- gcc
- clang
env:
- USE_LUA=true BOOST_PPA=false
- USE_LUA=true BOOST_PPA=1.54
- USE_LUA=true BOOST_PPA=1.55
# Skip some parts of the matrix for speed
# - USE_LUA=false BOOST_PPA=false
# - USE_LUA=false BOOST_PPA=1.54
- USE_LUA=false BOOST_PPA=1.55

addons:
apt:
packages:
- libtool
- libxml2-dev
- libgeos-dev
- libgeos++-dev
- libpq-dev
- libbz2-dev
- libproj-dev
- protobuf-c-compiler
- libprotobuf-c0-dev

matrix:
include:
#basic tests of with/without lua and old boost versions, with both clang and gc
- os: linux
compiler: clang
env: USE_LUA=true
- os: linux
compiler: clang
env: USE_LUA=true BOOST_PPA=1.55
- os: linux
compiler: clang
env: USE_LUA=false BOOST_PPA=1.55
- os: linux
compiler: gcc
env: USE_LUA=true
- os: linux
compiler: gcc
env: USE_LUA=true BOOST_PPA=1.55
- os: linux
compiler: gcc
env: USE_LUA=false BOOST_PPA=1.55
# additional tests
- os: linux
compiler: clang
env: USE_LUA=true BOOST_PPA=1.54

before_install:
- |-
if [ "${BOOST_PPA}" != "false" ]; then
sudo add-apt-repository -y ppa:boost-latest/ppa
fi
- sudo apt-get update -qq
install:
- sudo apt-get install -y -qq autoconf automake libtool make g++ libpq-dev libxml2-dev libbz2-dev libproj0 proj-bin libproj-dev # core deps
- |-
if [ "${BOOST_PPA}" = "false" ]; then
sudo apt-get install -y -qq libboost1.48-all-dev
# BOOST_PPA is only set on linux
- if [ -z ${BOOST_PPA+x} ]; then
echo "Using system Boost";
else
sudo apt-get install -y -qq boost${BOOST_PPA}
echo "Using Boost PPA";
sudo add-apt-repository -y ppa:boost-latest/ppa;
fi
- sudo apt-get install -y -qq protobuf-c-compiler libprotobuf-c0-dev
- sudo apt-get install -y -qq libgeos-3.3.3 libgeos-dev libgeos++-dev
- |-
if [ "${USE_LUA}" = "true" ]; then
sudo apt-get install -y -qq lua5.2 liblua5.2-dev
- if [[ $(uname -s) == 'Linux' ]]; then
sudo apt-get update -qq;
fi
install:
- if [[ $(uname -s) == 'Linux' ]]; then
if [ -z ${BOOST_PPA+x} ]; then
sudo apt-get install -y -qq libboost1.48-all-dev;
else
sudo apt-get install -y -qq "boost${BOOST_PPA}";
fi;
if [[ "${USE_LUA}" = "true" ]]; then
sudo apt-get install -y -qq lua5.2 liblua5.2-dev;
fi;
fi;
before_script:
- xml2-config --version
- geos-config --version
- proj | head -n1
- |-
if [ "${USE_LUA}" = "true" ]; then
lua -v
fi
- if [ "${USE_LUA}" = "true" ]; then
lua -v;
fi;
script:
./autogen.sh && ./configure && make -j2
after_failure:
Expand Down

0 comments on commit db5ea53

Please sign in to comment.