sudo: required
cache:
  directories:
    - $HOME/.cache/
language:
  - cpp
matrix:
  include:
    - os: linux
      dist: trusty
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - gcc-6
            - g++-6
      env:
        - CACHE_KEY=trusty-gcc-6
        - CC=/usr/bin/gcc-6
        - CXX=/usr/bin/g++-6
    - os: linux
      dist: trusty
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
            - llvm-toolchain-precise-3.8
          packages:
            - clang-3.8
      env:
        - CACHE_KEY=trusty-clang-3.8
        - CC=clang-3.8
        - CXX=clang++-3.8
install:
  - mkdir -p $HOME/.cache/$CACHE_KEY
  - sudo sh $TRAVIS_BUILD_DIR/.ci-scripts/install-cmake.sh
  - sudo sh $TRAVIS_BUILD_DIR/.ci-scripts/install-caf.sh
script:
  - cd ./build && cmake .. && make

sudo: required
cache:
  directories:
    - $HOME/.cache/
language:
  - cpp
matrix:
  include:
    - os: linux
      dist: trusty
      addons:
        apt:
          sources:
            - ubuntu-toolchain-r-test
          packages:
            - gcc-6
            - g++-6
      env:
        - CACHE_KEY=trusty-gcc-6
        - CC=/usr/bin/gcc-6
        - CXX=/usr/bin/g++-6
    - os: linux
      dist: trusty
      addons:
        apt:
          sources:
            - llvm-toolchain-trusty
          packages:
            - clang-5.0
      env:
        - CACHE_KEY=trusty-clang-5.0
        - CC=clang-5.0
        - CXX=clang++-5.0
    - os: osx
      osx_image: xcode8
      env:
        - CACHE_KEY=xcode8-gcc-6
        - CC=gcc-6
        - CXX=g++-6
      before_install:
        - brew install gcc
install:
  - mkdir -p $HOME/.cache/$CACHE_KEY
  - sudo sh $TRAVIS_BUILD_DIR/.ci-scripts/install-cmake.sh
  - sudo sh $TRAVIS_BUILD_DIR/.ci-scripts/install-caf.sh
script:
  - cd ./build && cmake .. && make

Add OSX to build matrix
Add OSX to build matrix
