sudo: required
dist: trusty
cache:
  apt: true

language: cpp

os:
  - linux
  - osx

osx_image: beta-xcode6.3

compiler:
  - gcc
  - clang

env:
  - BUILD_TYPE=Debug   COVERALLS=ON
  - BUILD_TYPE=Release COVERALLS=OFF

matrix:
  exclude:
    - os: osx
      compiler: gcc

install:
  # Install dependencies for FCL
  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then 'ci/install_linux.sh' ; fi
  - if [ "$TRAVIS_OS_NAME" = "osx"   ]; then 'ci/install_osx.sh'   ; fi

script:
  # Create build directory
  - mkdir build
  - cd build 

  # Configure
  - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DFCL_COVERALLS=$COVERALLS ..

  # Build
  - make -j2
  - if [ $COVERALLS = ON ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then make coveralls; fi

  # Run unit tests
  - make test

  # Make sure we can install and uninstall with no issues
  - sudo make -j4 install
  - sudo make -j4 uninstall


sudo: required
dist: trusty
cache:
  apt: true

language: cpp

matrix:
  include:
    - os: linux
      compiler: gcc
      env: BUILD_TYPE=Debug COVERALLS=ON
    - os: linux
      compiler: gcc
      env: BUILD_TYPE=Release COVERALLS=OFF
    - os: linux
      compiler: clang
      env: BUILD_TYPE=Debug COVERALLS=OFF
    - os: linux
      compiler: clang
      env: BUILD_TYPE=Release COVERALLS=OFF
    - os: osx
      osx_image: beta-xcode6.3
      compiler: clang
      env: BUILD_TYPE=Debug COVERALLS=OFF
    - os: osx
      osx_image: beta-xcode6.3
      compiler: clang
      env: BUILD_TYPE=Release COVERALLS=OFF

install:
  # Install dependencies for FCL
  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then 'ci/install_linux.sh' ; fi
  - if [ "$TRAVIS_OS_NAME" = "osx"   ]; then 'ci/install_osx.sh'   ; fi

script:
  # Create build directory
  - mkdir build
  - cd build 

  # Configure
  - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DFCL_COVERALLS=$COVERALLS ..

  # Build
  - make -j2
  - if [ $COVERALLS = ON ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then make coveralls; fi

  # Run unit tests
  - make test

  # Make sure we can install and uninstall with no issues
  - sudo make -j4 install
  - sudo make -j4 uninstall


Update Travis CI build matrix
Update Travis CI build matrix