language: c                             # make the validator happy
sudo: false
matrix:
  include:
  # CABALVER=1.16 is the earliest available in the PPA
  - env: STACK="stack --resolver lts-5"
    os: osx
  - env: GHCVER=7.4.2 CABALVER=1.16
      PREBUILD="sed -i.bak /utimensat/d configure.ac"
    addons:
      apt:
        packages: [ghc-7.4.2, cabal-install-1.16]
        sources: [hvr-ghc]
  - env: GHCVER=7.4.2 CABALVER=1.16
    addons:
      apt:
        packages: [ghc-7.4.2, cabal-install-1.16]
        sources: [hvr-ghc]
  - env: GHCVER=7.6.3 CABALVER=1.16
    addons:
      apt:
        packages: [ghc-7.6.3, cabal-install-1.16]
        sources: [hvr-ghc]
  - env: GHCVER=7.8.4 CABALVER=1.18
    addons:
      apt:
        packages: [ghc-7.8.4, cabal-install-1.18]
        sources: [hvr-ghc]
  - env: GHCVER=7.10.1 CABALVER=1.22
    addons:
      apt:
        packages: [ghc-7.10.1, cabal-install-1.22]
        sources: [hvr-ghc]
  - env: GHCVER=8.0.1 CABALVER=1.24
    addons:
      apt:
        packages: [ghc-8.0.1, cabal-install-1.24]
        sources: [hvr-ghc]
  - env: GHCVER=head CABALVER=head
    addons:
      apt:
        packages: [ghc-head, cabal-install-head]
        sources: [hvr-ghc]
  allow_failures:
  - env: GHCVER=head CABALVER=head
before_install:
- export PATH=$PWD/_stack:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
install:
- tools/testscript prepare
script:
- tools/testscript build
