On 23 June 2016 at 13:27, Magnus Therning <[email protected]> wrote:
>
> (I probably posted the first message to the wrong group.)
>
> Magnus Therning <[email protected]> writes:
>
>> I'm trying to find ways to make our CI builds a little faster. I've
>> managed to sneak in some Haskell code and use `stack` to build it. The
>> builds happen inside clean docker images (based on Debian Jessie). I've
>> pre-installed `stack` itself of course, and also run a `stack setup` to
>> ensure the compiler is pre-installed. So far so good.
>>
>> The other day our internet connection was flaky for a few hours, which
>> reminded me that our builds rely on stackage.org and hackage.org being
>> reachable while building. It would be nice to remove that requirement. I
>> guess some sort of caching would be the way to go, but I'm not sure how
>> to go about it.
>>
>> Are there nice documents relating to this that google-fu was too weak to
>> find?
>>
>> What are the sophisticated Haskell shops using?
>
> After posing the same question for Clojure [1] I thought I'd attempt the
> same solution for stack too. That is, I'll tell the CI system to cache
> my `.stack-work` folder between builds. This doesn't seem to work tough.
> On every build stack still produces output indicating that it's
> downloading and building all the dependencies before building my code:

I think you have to cache $HOME/.stack for this to work. The
.stack-work directory will only contain packages from your project,
whereas $HOME/.stack will contain the packages from the snapshot
you're using.

Erik

-- 
You received this message because you are subscribed to the Google Groups 
"haskell-stack" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/haskell-stack/CAPeieQHyJD6tF9vutFb7iRQbV-7ppG3VubmFBzWKzPHzZsvmrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to