sudo: false

language: c

env:
  - GHCVER=7.6.3
  - GHCVER=7.8.4
  - GHCVER=7.10.3
  - GHCVER=8.0.2
  - GHCVER=8.2.1

addons:
  apt:
    sources:
      - hvr-ghc
    packages:
      - ghc-7.6.3
      - ghc-7.8.4
      - ghc-7.10.3
      - ghc-8.0.2
      - ghc-8.2.1
      - cabal-install-1.24

before_install:
  - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.24/bin:$PATH
  - ghc --version
  - cabal --version
  - travis_retry cabal update
  - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
  - cabal install --enable-tests --only-dep

script:
  - (cd ghci-wrapper && cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test)
  - cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test

sudo: false

language: c

matrix:
  include:
    - env: GHCVER=7.6.3
      addons:
        apt:
          sources:
            - hvr-ghc
          packages:
            - ghc-7.6.3
            - cabal-install-1.24
    - env: GHCVER=7.8.4
      addons:
        apt:
          sources:
            - hvr-ghc
          packages:
            - ghc-7.8.4
            - cabal-install-1.24
    - env: GHCVER=7.10.3
      addons:
        apt:
          sources:
            - hvr-ghc
          packages:
            - ghc-7.10.3
            - cabal-install-1.24
    - env: GHCVER=8.0.2
      addons:
        apt:
          sources:
            - hvr-ghc
          packages:
            - ghc-8.0.2
            - cabal-install-1.24
    - env: GHCVER=8.2.1
      addons:
        apt:
          sources:
            - hvr-ghc
          packages:
            - ghc-8.2.1
            - cabal-install-1.24

before_install:
  - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.24/bin:$PATH
  - ghc --version
  - cabal --version
  - travis_retry cabal update
  - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
  - cabal install --enable-tests --only-dep

script:
  - (cd ghci-wrapper && cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test)
  - cabal configure --enable-tests --ghc-options=-Werror && cabal build && cabal test

Reduce Travis build time by only downloading specific GHCs.
Reduce Travis build time by only downloading specific GHCs.

Previously, we were downloading all GHC versions every build! This
should speed things up.
