language: cpp
sudo: required

matrix:
  include:
    - os: linux
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-7
      env:
        - MATRIX_EVAL="export CC=gcc-7 && export CXX=g++-7"
    - os: osx
      osx_image: xcode9
      env:
        - MATRIX_EVAL="brew update-reset && brew install gcc && CC=gcc-8 && CXX=g++-8"

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

install: ./CI/install.${TRAVIS_OS_NAME}.sh

script:
  - mkdir build
  - cd build
  - cmake ..
  - make -j4

language: cpp
sudo: required

matrix:
  include:
    - os: linux
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - g++-7
      env:
        - MATRIX_EVAL="export CC=gcc-7 && export CXX=g++-7"
    - os: osx
      osx_image: xcode10.2

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

install: ./CI/install.${TRAVIS_OS_NAME}.sh

script:
  - mkdir build
  - cd build
  - cmake ..
  - make -j4

Fix OS X build on Travis CI
Fix OS X build on Travis CI
