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 recompiles Zebra from scratch for each CI test #9331

Open
upbqdn opened this issue Mar 17, 2025 · 1 comment
Open

CI recompiles Zebra from scratch for each CI test #9331

upbqdn opened this issue Mar 17, 2025 · 1 comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug

Comments

@upbqdn
Copy link
Member

upbqdn commented Mar 17, 2025

CI compiles Zebra upon each PR commit when preparing the Docker image for tests here: https://github.com/ZcashFoundation/zebra/actions/runs/13837431819/job/38722773169?pr=9323#step:10:871. However, each test compiles Zebra from scratch again. For example, here: https://github.com/ZcashFoundation/zebra/actions/runs/13837431819/job/38722794636?pr=9323#step:14:146.

This makes CI slow and expensive since it compiles Zebra from scratch ~ 15 times each time a PR is updated with a commit. I haven't looked at all the tests, but in some, the compilation takes longer than the test itself. CI should cache the compilation results and recompile only what's necessary, not only between image preparation and tests but also between individual preparations. We have the latter implemented: https://github.com/zcashfoundation/zebra/blob/49741e8b476aff1d1dd2f6a2f57ec9d24404d345/docker/Dockerfile#L97-L126, but it doesn't work. CI should also cache downloaded crates instead of pulling them for each compilation.

@upbqdn upbqdn added A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug labels Mar 17, 2025
@github-project-automation github-project-automation bot moved this to New in Zebra Mar 17, 2025
@gustavovalverde
Copy link
Member

Do we want to re-open #6169 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devops Area: Pipelines, CI/CD and Dockerfiles C-bug Category: This is a bug
Projects
Status: New
Development

No branches or pull requests

2 participants