# Based on https://github.com/hvr/multi-ghc-travis and https://github.com/ekmett/lens/blob/master/.travis.yml

# NB: don't set `language: haskell` here

# The following enables several GHC versions to be tested; often it's enough to test only against the last release in a major GHC version. Feel free to omit lines listings versions you don't need/want testing for.
env:
 # - CABALVER=1.18 GHCVER=7.6.3
 # - CABALVER=1.18 GHCVER=7.8.3
 - CABALVER=1.22 GHCVER=7.10.1


# Note: the distinction between `before_install` and `install` is not important.
before_install:
 - travis_retry sudo add-apt-repository -y ppa:hvr/ghc
 - travis_retry sudo apt-get update
 - travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER
 - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH


install:
 - travis_retry cabal update
 - runhaskell BuildFromSource.hs build
 - cabal sandbox init --sandbox="`pwd`"/Elm-Platform/build/.cabal-sandbox
 - cabal install --only-dependencies --enable-tests


script:
 - cabal configure
 - cabal build
 - cabal install
 - ./tests/run-tests.sh

sudo: false

addons:
  apt:
    sources:
    - hvr-ghc
    packages:
    - cabal-install-1.22
    - ghc-7.10.1


install:
 - travis_retry cabal update
 - runhaskell BuildFromSource.hs build
 - cabal sandbox init --sandbox="`pwd`"/Elm-Platform/build/.cabal-sandbox
 - cabal install --only-dependencies --enable-tests


script:
 - cabal configure
 - cabal build
 - cabal install
 - ./tests/run-tests.sh

Migrate to Travis-CI container-based infrastructure (1st attempt)
Migrate to Travis-CI container-based infrastructure (1st attempt)

http://docs.travis-ci.com/user/migrating-from-legacy/
