-
Notifications
You must be signed in to change notification settings - Fork 0
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
enable cachix #26
enable cachix #26
Conversation
4fcd156
to
a9c6214
Compare
16cedce
to
b3c6367
Compare
Some notes: CI is passing for the first time in a long time. Since everything is cached, it doesn't actually do much of anything until something changes 😄 There are a few things that, if they have to actually get built on a GitHub Actions runner, don't actually work because the build runs out of disk space. This can can fixed by bumping the runner up to the 4-core version, but I'm going to see if we can get away with relying on the cache to avoid keeping it set to the bug runner permanently. MacOS is currently disabled in the GH actions because there are a few packages that don't build on that platform (at least e.g. cypress). I think we just need to fiddle with the definitions of particular packages for which this is the case to avoid declaring support for platforms we can't actually support. I also threw in a few new GHC versions to this PR. A reminder that I'm going to keep repeating in various places:
To build everything locally and upload it to the cache, after setting up your auth token you can run:
The github action will also build everything and upload to the cache, but doing it locally is a nice option because when you make changes you may want to test them locally first anyway, in which case might as well just upload the artifacts instead of waiting for github to rebuild them redundantly. Alternatively, using the cache in the other direction is also a nice option: If you don't want to compile locally because you're low on disk space, battery, etc. then you can start by creating PR, wait for the build to finish, and then the artifacts will be there in the cache for you. The compression that Cachix does seems to make a substantial difference; there's a lot of stuff here but Cachix is only reporting it as taking 2 GB. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw cypress
is not available for aarch64-darwin
. I see that the CDN that fetchzip
points to makes a version available for the platform, so there ought to be a way to work around this? In my testing, I get blocked by the alsa-lib
dependency used in the Nix expression.
I'm curious if there is a way to cut out cypress
and potentially other packages that prove problematic on macOS, in order to populate the binary cache with the other packages, rather than removing the macOS runner altogether? But I don't think that should block this improvement.
Does |
Yeah, I don't think that'll be hard, I just don't immediately know how to write it. I suspect we'll want to refactor a little so that rather than applying
I think the idea is that |
This modifies the github workflow such that build results are pushed to cachix. It also modifies the flake such that users are directed to use the binary cache.