compiler:
    - gcc
    - clang

language: c

os:
    - linux
    - osx

addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - gcc-5

before_install:
    - if [ "$TRAVIS_OS_NAME" == "osx" ] ; then brew update && brew install gcc ; fi

install:
    - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CC" == "gcc" ] ; then export CC="gcc-5"; fi
    
script:
    - $CC --version
    - make

compiler:
    - gcc
    - clang

language: c

os:
    - linux
    - osx

addons:
  apt:
    sources:
    - ubuntu-toolchain-r-test
    packages:
    - gcc-5

before_install:
    - if [ "$TRAVIS_OS_NAME" == "osx" ] ; then brew update && brew install gcc ; fi

install:
    - if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$CC" == "gcc" ] ; then export CC="gcc-5"; fi
    - if [ "$TRAVIS_OS_NAME" == "osx" ] && [ "CC" == "gcc" ] ; then export CC="gcc-7" ; fi
    
script:
    - $CC --version
    - make

Use gcc-7 on OS X to avoid ending up with clang!
Use gcc-7 on OS X to avoid ending up with clang!