sudo: true
language: c

matrix:
  include:
    - env: GHCVER=8.0.1
      addons: {apt: {packages: [ghc-8.0.1], sources: [hvr-ghc]}}

install:
 - mkdir -p $HOME/.local/bin
 - export PATH=$HOME/.local/bin:/opt/ghc/$GHCVER/bin:$PATH
 - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
 - wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
 - travis_retry sudo apt-get update -qq
 - travis_retry sudo apt-get install rethinkdb -y
 - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C $HOME/.local/bin '*/stack'
 - stack setup
 - echo "$(stack ghc -- --version) [$(stack ghc -- --print-project-git-commit-id 2> /dev/null || echo '?')]"

before_script:
 - sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/default.conf
 - sudo /etc/init.d/rethinkdb restart

script:
 - script/cibuild

sudo: true
language: c

matrix:
  include:
    - env: GHCVER=8.0.1
      addons: {apt: {packages: [ghc-8.0.1], sources: [hvr-ghc]}}
    - env: GHCVER=8.6.1
      addons: {apt: {packages: [ghc-8.6.1], sources: [hvr-ghc]}}

install:
 - mkdir -p $HOME/.local/bin
 - export PATH=$HOME/.local/bin:/opt/ghc/$GHCVER/bin:$PATH
 - source /etc/lsb-release && echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee /etc/apt/sources.list.d/rethinkdb.list
 - wget -qO- http://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
 - travis_retry sudo apt-get update -qq
 - travis_retry sudo apt-get install rethinkdb -y
 - travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C $HOME/.local/bin '*/stack'
 - stack setup
 - echo "$(stack ghc -- --version) [$(stack ghc -- --print-project-git-commit-id 2> /dev/null || echo '?')]"

before_script:
 - sudo cp /etc/rethinkdb/default.conf.sample /etc/rethinkdb/instances.d/default.conf
 - sudo /etc/init.d/rethinkdb restart

script:
 - script/cibuild

Add GHC 8.6.1 to test matrix
Add GHC 8.6.1 to test matrix
