diff --git a/.travis.yml b/.travis.yml index 5e99aa135..0a8814d90 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,31 @@ -language: haskell -ghc: - - 7.6 -install: +language: c +sudo: false +addons: + apt: + sources: + - hvr-ghc + packages: + - ghc-7.6.3 + - ghc-7.8.4 + - ghc-7.10.1 + - cabal-install-1.22 +env: + global: + - CABALVER=1.22 + matrix: + - GHCVER=7.6.3 + - GHCVER=7.8.4 + - GHCVER=7.10.1 +cache: + directories: + - '$HOME/.ghc' + - '$HOME/.cabal' +before_install: - './_test/bootstrap.sh' +install: + - true script: - - '( export PATH=/opt/hp-2013.2.0.0/bin:$PATH; runhaskell ./_test/check-exercises.hs )' + - 'export PATH=/opt/cabal/$CABALVER/bin:/opt/ghc/$GHCVER/bin:$PATH' + - 'runhaskell -Wall ./_test/check-exercises.hs' - './bin/fetch-configlet' - './bin/configlet .' diff --git a/_test/bootstrap.sh b/_test/bootstrap.sh index 64f49b3cc..69d659813 100755 --- a/_test/bootstrap.sh +++ b/_test/bootstrap.sh @@ -1,21 +1,25 @@ #!/bin/bash -# This installs a Haskell platform to PREFIX=/opt/hp-2013.2.0.0 +# This installs a the prerequisites for a given GHC/Cabal config set -x set -e -HP_VER=2013.2.0.0 -HP_URL=https://github.com/etrepum/travis-haskell/releases/download/${HP_VER}/hp-${HP_VER}.tar.bz2 -PREFIX=/opt/hp-${HP_VER} -sudo apt-get update -sudo apt-get -y install git gcc make autoconf libtool zlib1g-dev \ - libncurses-dev libgmp-dev -if [ ! -e "/usr/lib/libgmp.so.3" ]; then - sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so.10 /usr/lib/libgmp.so.3 +if [ ! -z "$GHCVER" ]; then + export PATH=/opt/ghc/${GHCVER}/bin:$PATH fi -if [ ! -e "/usr/lib/libgmp.so" ]; then - sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so.10 /usr/lib/libgmp.so +if [ ! -z "$CABALVER" ]; then + export PATH=/opt/cabal/${CABALVER}/bin:$PATH fi -if [ ! -e "${PREFIX}" ]; then - ( cd / - curl -L "${HP_URL}" | sudo tar jxf - ) -fi -sudo chmod ugo+rX -R "${PREFIX}" +cabal update +# This is a fairly minimal set +cabal install \ + primitive \ + random \ + tf-random \ + HUnit \ + QuickCheck \ + split \ + text \ + bytestring \ + attoparsec \ + vector \ + parallel \ + stm