Skip to content
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

Consider caching Nix artifacts via Cachix #960

Open
phijor opened this issue Nov 24, 2022 · 0 comments
Open

Consider caching Nix artifacts via Cachix #960

phijor opened this issue Nov 24, 2022 · 0 comments

Comments

@phijor
Copy link
Contributor

phijor commented Nov 24, 2022

Currently, the Nix CI job builds Agda and the Cubical library, but throws away all the results once done typechecking. I suggest it is worth investigating whether these artifacts could be cached between runs or not

Implementation

I'm using Cachix to cache my own Agda artifacts. The setup is relatively simple (documentation):

  1. Set up a cache at cachix.org, call it say cubical. Open-source projects get 5GiB of cache for free.
  2. Create an API token, store it in this project's GitHub secrets
  3. Add the GitHub Action https://github.com/cachix/cachix-action to the CI job and tell it to use the cubical cache.

Here's how I've been doing it for one of my libraries.

Benefits

  • avoids rebuilding Agda when unchanged (cf. Added agda-2.6.3 in flakes #959)
  • should prevent re-typechecking for documentation-only changes (or anything that doesn't touch *.agda files)
  • if hosted on a public cache, everyone using the provided Nix flake as an input can use the cached artifacts, avoiding the need to type-check locally (looking at you, Cubical/Experiments/ZCohomology/Benchmarks.agda 👀)

Drawbacks

  • Someone has to be responsible for the cachix.org cache.
  • ???

PS: Pinging @guilhermehas who seems to be responsible for Nix CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant