language: cpp

matrix:
  include:
    - compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-5
      env: COMPILER=g++-5
    - compiler: clang
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.7
          packages:
            - clang-3.7
      env: COMPILER=clang++-3.7

git:
  depth: 4

install:
  - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
  - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
  - CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz"
  - mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
  - export PATH=${DEPS_DIR}/cmake/bin:${PATH}
  - cd ${TRAVIS_BUILD_DIR}

script:
  - mkdir build && cd build && CXX=`printenv COMPILER` cmake .. && make
  - tests/tests
language: cpp

matrix:
  include:
    - compiler: gcc 5
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-5
      env: COMPILER=g++-5
    - compiler: gcc 7
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-7
      env: COMPILER=g++-7
    - compiler: clang 3.7
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.7
          packages:
            - clang-3.7
      env: COMPILER=clang++-3.7
    - compiler: clang 6
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-trusty-6.0
          packages:
            - clang-6.0
      env: COMPILER=clang++-6.0

git:
  depth: 4

install:
  - DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
  - mkdir -p ${DEPS_DIR} && cd ${DEPS_DIR}
  - CMAKE_URL="http://www.cmake.org/files/v3.5/cmake-3.5.2-Linux-x86_64.tar.gz"
  - mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
  - export PATH=${DEPS_DIR}/cmake/bin:${PATH}
  - cd ${TRAVIS_BUILD_DIR}

script:
  - mkdir build && cd build && CXX=`printenv COMPILER` cmake .. && make
  - tests/tests
Add newer Clang and GCC to Travis
Add newer Clang and GCC to Travis
