# Use Ubuntu 14.04 Trusty for GCC 4.8
sudo: required
dist: trusty
language: cpp

branches:
  only:
  - master

matrix:
  include:
  - compiler: gcc
  - compiler: clang

before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libxml2-dev

script:
- ./install.sh
- . hclib-install/bin/hclib_setup_env.sh
- pushd test/c/   && ./test_all.sh && popd
- pushd test/cpp/ && ./test_all.sh && popd

# Use Ubuntu 14.04 Trusty for GCC 4.8
dist: trusty
sudo: required
language: cpp

branches:
  only:
  - master

matrix:
  include:
  - compiler: gcc # gcc-4.8
  - env: TRAVIS_CC=gcc-5 TRAVIS_CXX=g++-5
    addons:
      apt:
        packages:
          - g++-5
        sources:
          - ubuntu-toolchain-r-test
  - env: TRAVIS_CC=gcc-6 TRAVIS_CXX=g++-6
    addons:
      apt:
        packages:
          - g++-6
        sources:
          - ubuntu-toolchain-r-test
  - compiler: clang # clang-3.5
  - env: TRAVIS_CC=clang-4.0 TRAVIS_CXX=clang++-4.0
    addons:
      apt:
        packages:
          - clang-4.0
        sources:
          - llvm-toolchain-trusty-4.0

before_install:
- export CC=${TRAVIS_CC:-$CC} && $CC --version
- export CXX=${TRAVIS_CXX:-$CXX} && $CXX --version
- sudo apt-get update -qq
- sudo apt-get install -y libxml2-dev

script:
- ./install.sh
- . hclib-install/bin/hclib_setup_env.sh
- pushd test/c/   && ./test_all.sh && popd
- pushd test/cpp/ && ./test_all.sh && popd

Update Travis CI test matrix with newer compilers
Update Travis CI test matrix with newer compilers
