From 20bccae1fc0cab16c2a3286e91a0c68026cdb293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Wed, 5 Aug 2015 06:20:55 +0200 Subject: [PATCH] Enable travis caching for cabal dependencies --- .travis.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 662cf7b..988d705 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,23 @@ ghc: - 7.6 - 7.8 +sudo: false + +addons: + apt: + packages: + - zlib1g-dev + +cache: + apt: true + directories: + - ~/.cabal + - ~/.ghc + +before_cache: + - rm -f $HOME/.cabal/logs $HOME/.cabal/packages/*/build-reports.log + install: - - sudo apt-get install zlib1g-dev - cabal update # - ( $CABAL122 && cabal install cabal-install --constraint "Cabal >= 1.22" && ghc-pkg unregister Cabal ) || true - echo $PATH @@ -13,6 +28,8 @@ install: - if [ -n "$(cabal --version | grep 'Cabal library' | awk '{ print $3 }' | tail -n1 | sed -n '/^1.18/p')" ]; then cabal install cabal-install --constraint "Cabal == 1.18.* && > 1.18.0"; fi - cabal install happy - happy --version + - ls -lR ~/.ghc + - ls -lR ~/.cabal - cabal install -j --only-dependencies --enable-tests script: