language: cpp
os:
  - linux
  - osx
compiler:
  - clang
  - gcc

matrix:
  exclude:
    - os: osx
      compiler: gcc

script:
  - make config=release
  - make config=coverage test

after_success:
  - bash <(curl -s https://codecov.io/bash)

language: sh

os:
  - linux
  - osx
  - windows

matrix:
  exclude:
    - os: windows
  include:
    - os: linux
      env:
        - CC=clang
        - CXX=clang++
    - os: windows
      env:
        - CMAKE_GENERATOR="Visual Studio 15 2017"
    - os: windows
      env:
        - CMAKE_GENERATOR="Visual Studio 15 2017 Win64"

script:
  - if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then make config=release; fi
  - if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then make config=coverage test; fi
  - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then PATH=$PATH:/c/Program\ Files/CMake/bin; fi
  - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then cmake -G "$CMAKE_GENERATOR" -DBUILD_DEMO=ON; fi
  - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then cmake --build . -- -verbosity:minimal; fi
  - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then ./Debug/demo.exe demo/pirate.obj; fi

after_script:
  - if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then bash <(curl -s https://codecov.io/bash); fi

Add windows to Travis CI build
Add windows to Travis CI build

This requires us to switch to language:sh since Travis doesn't support
language:cpp yet, and have essentially two separate scripts guarded with
ifs to build on all platforms.
