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

ci: cache Nix store with cache-nix-action #2992

Merged
merged 11 commits into from
Nov 21, 2023

Conversation

develop7
Copy link
Collaborator

@develop7 develop7 commented Oct 5, 2023

This PR introduces caching of the Nix store for nix-based CI jobs, improving "nix setup" build step 2x to 3x, depending on the job

Closes #2990

Changes introduced:

  • Reworked the setup-nix action:
    • upgraded Nix to 2.13.6 for CI jobs
    • added cache-nix-action to cache nix store
    • added cache-id parameter to be able to fine-tune caches
  • unifying cache keys' naming scheme across the workflows, making them easier identifiable
  • Introduced the merge-nix-caches job, which supposed to merge mostly similar nix-based jobs' caches. Had to uncomment it because it couldn't purge per-job caches (to save space) being run under my account, but the work could be continued right where it stopped

TODO: enable Nix garbage collecting

@develop7 develop7 force-pushed the fix-ci_cache_speedup branch 6 times, most recently from ae54af9 to 3a6e233 Compare October 31, 2023 15:49
@develop7 develop7 force-pushed the fix-ci_cache_speedup branch from d5c5e43 to d87bcb2 Compare November 17, 2023 14:36
@develop7 develop7 force-pushed the fix-ci_cache_speedup branch from d87bcb2 to e128e12 Compare November 20, 2023 14:58
@develop7 develop7 changed the title ci: use magic-nix-cache ci: cache Nix store with cache-nix-action Nov 20, 2023
@develop7 develop7 marked this pull request as ready for review November 20, 2023 18:16
Copy link
Member

@steve-chavez steve-chavez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks harmless so I think we can merge now and improve it later.

@steve-chavez steve-chavez merged commit abcb21c into PostgREST:main Nov 21, 2023
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Leverage GitHub Actions' own cache
2 participants