diff --git a/.travis.yml b/.travis.yml index 7875302..298d0b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,13 +10,23 @@ install: # Set up the Shell to treat the semicolon as && - set -o pipefail && set -e # Install GHC and Cabal - - travis_retry sudo add-apt-repository -y ppa:hvr/ghc - - travis_retry sudo apt-get update - - travis_retry sudo apt-get install cabal-install-1.18 ghc-$ghc - - export PATH=/opt/ghc/$ghc/bin:/opt/cabal/1.18/bin:$PATH + - + travis_retry sudo add-apt-repository -y ppa:hvr/ghc; + travis_retry sudo apt-get update; + travis_retry sudo apt-get install cabal-install-1.18 ghc-$ghc; + export PATH=/opt/ghc/$ghc/bin:/opt/cabal/1.18/bin:$PATH; + # Update the Cabal database - cabal update + # Switch to the distro: + - + export pkg_name=$(cabal info . | awk '{print $2;exit}'); + cabal sdist; + cd dist; + tar xzvf $pkg_name.tar.gz; + cd $pkg_name; # Install the lower bound dependencies - - if [ $lower_bound_dependencies -eq 1 ]; + - + if [ $lower_bound_dependencies -eq 1 ]; then cabal install "transformers == 0.2.*"; cabal install "text == 1.0.*"; @@ -24,18 +34,12 @@ install: cabal install "time == 1.4.*"; cabal install "list-t == 0.2.*"; fi; - # Work around the "haskell-src-exts" implicit dependency: + # Install the "haskell-src-exts" implicit dependency - cabal install happy - # Switch to the distro: - - export pkg_name=$(cabal info . | awk '{print $2;exit}'); - cabal sdist; - cd dist; - tar xzvf $pkg_name.tar.gz; - cd $pkg_name; - - cabal install --only-dependencies --enable-tests --enable-benchmarks - - cabal configure --enable-tests --enable-benchmarks - - cabal build - + # Install the remaining dependencies + - cabal install --only-dependencies --enable-tests --enable-benchmarks --avoid-reinstalls + # Configure and build + - cabal configure --enable-tests --enable-benchmarks && cabal build script: - cabal test --show-details=always