sudo: required
dist: trusty

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install libeigen3-dev libglew-dev libc++-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pyenv versions && pyenv global system 3.6; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update          ; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install eigen glew ; fi

language: cpp

compiler:
  - gcc
  - clang

os:
  - linux
  - osx

env:
  - BUILD_TYPE=Release
#  - BUILD_TYPE=Debug

script:
  - mkdir build
  - cd build
  - cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE ..
  - make -j4

sudo: required
dist: trusty

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qq update ; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install libeigen3-dev libglew-dev libc++-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev; fi
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then pyenv versions && pyenv global system 3.6; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update          ; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install eigen glew ; fi

addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      # install newer libstdc++ (from ubuntu-toolchain-r/test PPA), since otherwise clang fails with old libstdc++-4.8
      - libstdc++-5-dev

language: cpp

compiler:
  - gcc
  - clang

os:
  - linux
  - osx

env:
  - BUILD_TYPE=Release
#  - BUILD_TYPE=Debug

script:
  - mkdir build
  - cd build
  - cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE ..
  - make -j4

Install libstdc++-5 on Linux to for clang.
CI: Install libstdc++-5 on Linux to for clang.
