[Haskell-cafe] Travis/Cabal help

Edward Z. Yang ezyang at mit.edu
Fri Sep 2 21:27:10 UTC 2016


The way that Cabal's CI does it is that it uses new-build, and
places .cabal/store and some related directories in the cache.

Here's the snippet:

cache:
 directories:
 - $HOME/.cabal/packages
 - $HOME/.cabal/store
 - $HOME/.cabal/bin

# We remove the index because it churns quite a bit and we don't want
# to pay the cost of repeatedly caching it even though we don't care
# about most changing packages.
before_cache:
 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index*

Full yaml:
https://github.com/haskell/cabal/blob/master/.travis.yml

Edward

Excerpts from David Feuer's message of 2016-09-02 12:04:40 -0400:
> Last I spoke to Herbert, he didn't think the caching stuff was likely
> to be feasible for containers, because of its unusual place in the
> ecosystem. There may be some way around it though.
> 
> On Fri, Sep 2, 2016 at 11:57 AM, Mikhail Glushenkov
> <mikhail.glushenkov at gmail.com> wrote:
> > Hi,
> >
> > On 2 September 2016 at 16:55, David Feuer <david.feuer at gmail.com> wrote:
> >> Indeed, that fixed the problem. Unfortunately, now I have a different
> >> problem. The CI build with benchmarks takes *much* longer than the one
> >> without (I think this is mostly because of the time required to
> >> install Criterion's dependencies).
> >
> > Try enabling caching on Travis:
> >
> > https://docs.travis-ci.com/user/caching/#Arbitrary-directories
> > https://github.com/haskell/cabal/blob/master/.travis.yml#L86


More information about the Haskell-Cafe mailing list