Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ci: add magic nix cache #107

Merged
merged 3 commits into from
Jul 12, 2023
Merged

ci: add magic nix cache #107

merged 3 commits into from
Jul 12, 2023

Conversation

sagikazarmark
Copy link
Member

Overview

Fixes #105

Notes for reviewer

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
@ramizpolic
Copy link
Member

I don't see much difference in pipeline steps with and without caching, is this maybe because this was the first execution or perhaps that it's not present on main branch, @sagikazarmark ?

@sagikazarmark sagikazarmark force-pushed the nix-cache branch 2 times, most recently from a30d26b to e0b5e93 Compare July 11, 2023 14:54
@sagikazarmark
Copy link
Member Author

sagikazarmark commented Jul 11, 2023

Main branch (without caching): https://github.com/bank-vaults/vault-operator/actions/workflows/ci.yaml?query=branch%3Amain

Cache branch: https://github.com/bank-vaults/vault-operator/actions/workflows/ci.yaml?query=branch%3Anix-cache

Test job without caching: ~7 minutes
Test job with Nix caching only: ~3 minutes
Test job with Nix+Go caching only: no real improvement

@sagikazarmark sagikazarmark self-assigned this Jul 11, 2023
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
ramizpolic
ramizpolic previously approved these changes Jul 11, 2023
Copy link
Member

@ramizpolic ramizpolic left a comment

Choose a reason for hiding this comment

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

Great improvements 🚀

akijakya
akijakya previously approved these changes Jul 12, 2023
Copy link
Member

@akijakya akijakya left a comment

Choose a reason for hiding this comment

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

🥳

@sagikazarmark sagikazarmark dismissed stale reviews from akijakya and ramizpolic via cf8b046 July 12, 2023 18:51
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
@sagikazarmark
Copy link
Member Author

Managed to improve things further by segmenting the Go cache for each job. It takes up more space in the cache, but different jobs download different dependencies (eg. build doesn't download test dependencies, etc)

@sagikazarmark sagikazarmark merged commit cbac8e7 into main Jul 12, 2023
@sagikazarmark sagikazarmark deleted the nix-cache branch July 12, 2023 19:52
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add caching or remove nix from pipeline build steps
3 participants