Skip to content

Commit

Permalink
Use cache for faster build times
Browse files Browse the repository at this point in the history
install hpc-coveralls in before_install to take advantage of this
b/c cache is updated before after_success so any installs in that
section will not be using cached content
  • Loading branch information
atodorov committed Jul 26, 2017
1 parent afd1e2c commit 3818db0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Expand Up @@ -2,21 +2,25 @@ dist: trusty
sudo: required
language: c

cache:
directories:
- ~/.ghc
- ~/.cabal

before_install:
- wget https://haskell.org/platform/download/8.0.2/haskell-platform-8.0.2-unknown-posix--minimal-x86_64.tar.gz
- tar -xzvf ./haskell-platform-8.0.2-unknown-posix--minimal-x86_64.tar.gz
- sudo ./install-haskell-platform.sh
- cabal update && cabal install hlint
- travis_retry cabal update && cabal install hlint hpc-coveralls

script:
- ~/.cabal/bin/hlint .
- cabal install --dependencies-only --enable-tests
- cabal install --dependencies-only --enable-tests --force-reinstalls
- cabal configure --enable-tests --enable-coverage --ghc-option=-DTEST
- cabal build
- cabal test --show-details=always

after_success:
- cabal install hpc-coveralls
- ~/.cabal/bin/hpc-coveralls --display-report tests

notifications:
Expand Down

0 comments on commit 3818db0

Please sign in to comment.