language: cpp

matrix:
  include:
    - os: linux
      dist: xenial
    - os: osx

addons:
  apt:
    sources:
      - sourceline: 'deb http://mirrors.kernel.org/ubuntu/ bionic main'
      - sourceline: 'deb http://ftp.debian.org/debian stretch-backports main'
    packages:
      - debian-archive-keyring/bionic
      - libjsoncpp1/bionic
      - libstdc++6/bionic
      - libuv1/bionic
# FIXME: Homebrew is out of date on Travis. Uncomment when it has CMake 3.13.
# homebrew:
#   packages:
#     - cmake

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi

install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -yq --no-install-suggests --no-install-recommends install cmake/stretch-backports; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade cmake; fi

script:
  - mkdir build
  - cd build
  - cmake ..
  - cmake --build .

language: cpp

matrix:
  include:
    - os: linux
      dist: xenial
    - os: osx

addons:
  apt:
    sources:
      - sourceline: 'deb http://mirrors.kernel.org/ubuntu/ bionic main universe'
      - sourceline: 'deb http://ftp.debian.org/debian stretch-backports main'
    packages:
      - debian-archive-keyring/bionic
      - libjsoncpp1/bionic
      - libstdc++6/bionic
      - libuv1/bionic
# FIXME: Homebrew is out of date on Travis. Uncomment when it has CMake 3.13.
# homebrew:
#   packages:
#     - cmake

before_install:
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi

install:
  - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -yq --no-install-suggests --no-install-recommends install cmake/stretch-backports; fi
  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade cmake; fi

script:
  - mkdir build
  - cd build
  - cmake ..
  - cmake --build .

Add the Bionic universe for the keyring
Travis: Add the Bionic universe for the keyring
