os:
  - linux
language: cpp
dist: trusty
sudo: required

matrix:
  include:
    - compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - gcc-4.9
            - g++-4.9
        artifacts: true
      env:
        - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
    - compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - gcc-5
            - g++-5
        artifacts: true
      env:
        - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
    - compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - gcc-6
            - g++-6
        artifacts: true
      env:
        - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"

before_install:
  - eval "${MATRIX_EVAL}"
  - . scripts/travis-$TRAVIS_OS_NAME.sh

script:
  - ./bootstrap.sh -a
  - ./configure
  - make
  - make test

os:
  - linux
language: cpp
dist: trusty
sudo: required

matrix:
  include:
    - compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - gcc-4.9
            - g++-4.9
        artifacts: true
      env:
        - MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9"
    - compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - gcc-5
            - g++-5
        artifacts: true
      env:
        - MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
    - compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - gcc-6
            - g++-6
        artifacts: true
      env:
        - MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
    - compiler: gcc
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - gcc-7
            - g++-7
        artifacts: true
      env:
        - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"

before_install:
  - eval "${MATRIX_EVAL}"
  - . scripts/travis-$TRAVIS_OS_NAME.sh

script:
  - ./bootstrap.sh -a
  - ./configure
  - make
  - make test

Test GCC 7 with Travis
Test GCC 7 with Travis
