-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add .github/workflows/ci.yaml for GitHub Actions #1751
Conversation
Re: caching, I'm scared of the situation where CI is succeeding but a clean build fails, because it actually depends on something old in the cache. I'd rather have CI be slower (within reason) but more reproducible. Thoughts? |
@aryairani Makes sense to me, but just to clarify, this would be defending against a potential bug in |
Definitely keep at least And I'd also vote to keep I can't recall the last time I've had to do a |
Would it be possible to have both of these?
|
@mitchellwrosen I'd say if you can add the mac build, then let's merge it — we want to avoid surprises like #1616. The travis.yaml should show how to set up tools for a mac build; or is it missing something? I'd like to run the build on multiple linuxes, multiple macoses, and maybe even some windows. Do you know if it's possible to designate certain images to be required successes and others to be optional successes? |
Okay, we're going to merge this and delete the Travis build since Travis has become unusable with hours long wait times and lots of spurious failures, but @mitchellwrosen can you work on adding the macos build at least? |
Thanks for looking into this @mitchellwrosen ! |
@pchiusano, yup, it's on my list of things to do today in fact! |
Overview
This PR adds a .github/workflows/ci.yaml file for GitHub actions. I tried to make it perform roughly the same actions as the Travis CI config (build and run tests with both runtimes, then cache stuff).
Interesting/controversial decisions
I cached the local packages' build artifacts in
.stack-work
their directories, in addition to~/.stack
, which caches dependencies. The intention here is for CI to be similar in speed to locally editing a file and rebuilding - presumably not every local module will need to be recompiled.However, there may be some downsides to caching
.stack-work
that I haven't thought of, and I didn't measure whether caching it actually produced a measurable speedup.Loose ends
Only an Ubuntu build is configured at the moment, but macOS shouldn't be too hard to add. The main reason I didn't add it in this first pass is I had to download
stack
manually as part of the build, because the officialsetup-haskell
action is broken right now (it uses a deprecated mechanism for setting environment variables). So, the build explicitly downloads alinux
flavor ofstack
, but that could switch on the runner's OS instead.