language:
  - cpp

sudo:
  - false

dist:
  - trusty

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-5
      - g++-6
      - valgrind
      
cache:
  directories:
    - deps

matrix:
  include:
    - os: osx
      osx_image: xcode9
      env: PLATFORM=mac COVERAGE=ON
    - os: osx
      osx_image: xcode8.3
      env: PLATFORM=mac COVERAGE=ON
    - os: osx
      osx_image: xcode9
      env: PLATFORM=ios
    - os: osx
      osx_image: xcode8.3
      env: PLATFORM=ios

    - os: linux
      env: PLATFORM=linux COVERAGE=ON MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"

    - os: linux
      env: PLATFORM=linux COVERAGE=ON MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"

before_install:
  - eval "${MATRIX_EVAL}"

install:
  - pip install --user plumbum

before_script:
  - scripts/travis_check_deps.sh

script:
  - scripts/travis.sh

after_success:
  - if [ -n "$COVERAGE" ]; then bash <(curl -s https://codecov.io/bash); fi

language:
  - cpp

sudo:
  - false

dist:
  - trusty

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-5
      - g++-6
      - valgrind
      
cache:
  directories:
    - deps

matrix:
  include:
    - os: osx
      osx_image: xcode9
      env: PLATFORM=mac COVERAGE=ON
    - os: osx
      osx_image: xcode8.3
      env: PLATFORM=mac COVERAGE=ON
    - os: osx
      osx_image: xcode9
      env: PLATFORM=ios
    - os: osx
      osx_image: xcode8.3
      env: PLATFORM=ios

    - os: linux
      env: PLATFORM=linux COVERAGE=ON MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"

    - os: linux
      env: PLATFORM=linux COVERAGE=ON MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"

before_install:
  - eval "${MATRIX_EVAL}"

install:
  - pip install --user plumbum

before_script:
  - scripts/travis_check_deps.sh

script:
  - set -e
  - scripts/travis.sh

after_success:
  - if [ -n "$COVERAGE" ]; then bash <(curl -s https://codecov.io/bash); fi

Stop CI when building fails
CI: Stop CI when building fails
