Simplifying the travis CI .travis.yml file instructions?

23 views
Skip to first unread message

Rob Stewart

unread,
Sep 6, 2016, 6:01:05 AM9/6/16
to haskell-stack
Hi,

I'd like to move the travis CI setup for my libraries over to stack for running their test suites.


The commentary and the content is good, thanks goes to the authors. I was however hoping for a very straight forward way over moving to stack for travis CI, much in the spirit of stack's ease of use philosophy. That is, I was hoping to just read "copy/paste this text into the .travis.yml file", followed by one verbatim block with what's to be copy/pasted.

Whilst sentences like "There are two ways to install GHC" may be useful for some, this isn't a detail I want to think about. As it happens, I want the first option, i.e. for stack to handle GHC installs in accordance the stack.yaml, just how stack would behave on my local machines.

Could there be a TL;DR section at the top of the page with the most common .travis.yml content?

Thanks,

--
Rob

Michael Snoyman

unread,
Sep 6, 2016, 6:06:13 AM9/6/16
to Rob Stewart, haskell-stack
I wasn't actually aware of that separate page. I always just copy the content out of the guide from:


I'd be in favor also of simplifying the story here, but perhaps others who have been involved with putting these docs together would like to weigh in.

--
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 haskell-stack+unsubscribe@googlegroups.com.
To post to this group, send email to haskel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/haskell-stack/eeda56eb-49dd-468c-8734-1e7a50a30f01%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted
Message has been deleted

Paolo G. Giarrusso

unread,
Sep 6, 2016, 2:18:09 PM9/6/16
to haskell-stack
Are you testing your own application or a Hackage library? Because the needs (and TL;DR.) are very different.

- an app can test only one configuration that picks a GHC version. So what you want is similar to this—all you have to maintain is your stack.yaml.
https://github.com/steshaw/stack-example/blob/f464a2306a6688f7a23898546a8a7b9a3e8c1aa0/.travis.yml

- a library on Hackage should work for users in many more contexts—GHC versions, using stack or cabal, etc. The content from the guide that @snoyberg cited (https://docs.haskellstack.org/en/stable/GUIDE/#travis-with-caching) is designed for that, but that can require (IMHO) quite a lot more customization to pick the versions you want to test with. Also, that guide assumes a single stack.yaml working for lts-2, lts-3, lts-6 and nightly.

IMHO we should support both.
Reply all
Reply to author
Forward
0 new messages