Skip to content

ci: run optimised tests#2004

Merged
Mirko-von-Leipzig merged 4 commits intomainfrom
mirko/ci/tests
Apr 28, 2026
Merged

ci: run optimised tests#2004
Mirko-von-Leipzig merged 4 commits intomainfrom
mirko/ci/tests

Conversation

@Mirko-von-Leipzig
Copy link
Copy Markdown
Collaborator

@Mirko-von-Leipzig Mirko-von-Leipzig commented Apr 25, 2026

Changes CI to build with optmisations (opt-level 2).

This drastically improves test performance, especially prover related tests. This isn't ideal, and requires longer compile times, but the trade off at the moment is definitely worth it. Test compile time went up for deps but since they're usually cached this is okay. Test runtime went from ~15 minutes to 2.

On my local machine, tests time went from over 6 minutes, to 15s.

Important to note that we could do much better ito compile time if the optimisations could be restricted to a subset of dependencies. Unfortunately as noted in #2002 this isn't practically possible due to late monomorphisation of prover generics, so we always have miden-remote-prover as a requirement.


Additionally, I noticed that this rebuild took forever because the cache was useless. However all jobs had to rebuild from scratch because the build job only saves its cache when its pushed to next to not flood github cache. This is correct but means the current build is never shared, only the latest trunk's build.

I changed this to share the artifacts directly between the current job. Each trunk has a base cache, which is used by build. build then creates a run specific cache, which gets deleted at the end of the run to spare cache capacity.


I originally had this change only for CI. But I think this is probably useful for dev setup as well so I made it broader.

@Mirko-von-Leipzig Mirko-von-Leipzig added no changelog This PR does not require an entry in the `CHANGELOG.md` file CI CI and devops labels Apr 25, 2026
@Mirko-von-Leipzig Mirko-von-Leipzig marked this pull request as draft April 25, 2026 10:12
@Mirko-von-Leipzig Mirko-von-Leipzig marked this pull request as ready for review April 25, 2026 12:22
@Mirko-von-Leipzig
Copy link
Copy Markdown
Collaborator Author

The overall slow CI runtime is mostly because the existing rust cache is useless since we change opt-level in this PR. So there is no base cache.

Comment thread Cargo.toml
Copy link
Copy Markdown
Contributor

@kkovaacs kkovaacs left a comment

Choose a reason for hiding this comment

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

It'd be cool to avoid forcing this for all dependencies -- compile times are quite bad with these settings.

Is there any chance we could avoid surfacing prover generics from our dependencies?

@Mirko-von-Leipzig
Copy link
Copy Markdown
Collaborator Author

It'd be cool to avoid forcing this for all dependencies -- compile times are quite bad with these settings.

Is there any chance we could avoid surfacing prover generics from our dependencies?

That would be my preference as well. We can probably narrow down our dependency set further (as in, change "*" to some set of deps. But compile time hit will remain until we don't have the generics on our side I think.

I did some tweaks in #2002 but I don't know the proper place to really fix this. Its a bit crazy to me that we have plonky-related generics in our final exe.

@Mirko-von-Leipzig Mirko-von-Leipzig merged commit 7d4c33f into main Apr 28, 2026
19 checks passed
@Mirko-von-Leipzig Mirko-von-Leipzig deleted the mirko/ci/tests branch April 28, 2026 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI CI and devops no changelog This PR does not require an entry in the `CHANGELOG.md` file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants