language: cpp

os: osx

osx_image: xcode8.2

before_install:
  - brew update

install:
  - brew unlink cmake
  - brew upgrade cmake
  - brew install conan
  - brew install ninja
  - cmake --version

script:
  - mkdir build && cd build
  - conan install .. -s compiler=apple-clang -s compiler.version=8.0 -s compiler.libcxx=libc++ --build=missing
  - cmake -G Ninja -DCMAKE_BUILD_TYPE=Release
  - cmake --build .

after_script:
  - (cd build/bin && ./causal_sets_explorer)
language: cpp

matrix:
  include:
    - os: osx
      osx_image: xcode8.2

before_install:
# Workaround for https://github.com/travis-ci/travis-ci/issues/6307
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
      rvm get stable --auto-dotfiles
      brew update
    fi

install:
  - if [[ "${COMPILER}" != "" ]]; then export CXX=${COMPILER}; fi
  - |
    if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
      brew unlink cmake
      brew upgrade cmake
      brew install ninja
      brew install conan
    fi
  - cmake --version

script:
  - mkdir build && cd build
  - conan install .. -s compiler=apple-clang -s compiler.version=8.0 -s compiler.libcxx=libc++ --build=missing
  - cmake -G Ninja -DCMAKE_BUILD_TYPE=Release
  - cmake --build .

after_script:
  - (cd build/bin && ./causal_sets_explorer)
Revert "Travis-CI: when in doubt, simplify"
Revert "Travis-CI: when in doubt, simplify"

This reverts commit 446a80a3634ef55f719999ad119bcd75dc844925.
