language: cpp

compiler:
  - gcc
  - clang

cache:
  - apt
  - ccache

sudo: false

addons:
  apt:
    # We need cmake > 2.8.7
    # https://github.com/travis-ci/travis-ci/issues/4631#issuecomment-191153634
    sources:
      - george-edison55-precise-backports # cmake 3.2.3 / doxygen 1.8.3
    packages:
      - cmake
      - cmake-data
      - libboost-dev
      - libdb-dev
      - libreadline-dev
      - libssl-dev
      - libwww-perl
      - time
      - xsltproc
      - zlib1g-dev

env:
  - TEST_TARGET=debug
  - TEST_TARGET=release
  - 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:
  - env EXTRA_MAKE_ARGS=-j2 ./infrastructure/travis-build.sh
