env:
 - GHCVER=7.6.3
 - GHCVER=7.8.2
 - GHCVER=head

matrix:
  allow_failures:
   - env: GHCVER=head

cache:
  directories:
   - .cabal-sandbox

before_install:
 - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
 - travis_retry sudo add-apt-repository -y "deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty main"
 - travis_retry sudo apt-get update
 - travis_retry sudo apt-get install cabal-install-1.20 ghc-$GHCVER
 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.20/bin:$PATH
 - travis_retry sudo apt-get install libleveldb-dev -t trusty

install:
 - cabal --version
 - cabal update
 - cabal install -j --enable-tests --enable-benchmarks --only-dependencies

script:
 - cabal configure --enable-tests --enable-benchmarks -v2
 - cabal build
 - cabal test
 - cabal check
 - cabal sdist


env:
 - GHCVER=7.6.3
 - GHCVER=7.8.2
 - GHCVER=head

matrix:
  allow_failures:
   - env: GHCVER=head

cache:
  directories:
   - $HOME/.cabal
   - $HOME/.ghc

before_install:
 - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
 - travis_retry sudo add-apt-repository -y "deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ trusty main"
 - travis_retry sudo apt-get update
 - travis_retry sudo apt-get install cabal-install-1.20 ghc-$GHCVER
 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.20/bin:$PATH
 - travis_retry sudo apt-get install libleveldb-dev -t trusty

install:
 - cabal --version
 - cabal update
 - cabal install -j --enable-tests --enable-benchmarks --only-dependencies

script:
 - cabal configure --enable-tests --enable-benchmarks -v2
 - cabal build
 - cabal test
 - cabal check
 - cabal sdist


Set Travis-CI cache path correctly
Set Travis-CI cache path correctly

CI build does not use cabal sandboxes, so the correct path should be $HOME/.cabal and $HOME/.ghc
