Use cache in GitHub Actions#2146
Merged
Merged
Conversation
f1521c9 to
7777cf4
Compare
bd4488e to
f3d1711
Compare
f3d1711 to
86de351
Compare
marchof
reviewed
Jun 9, 2026
marchof
reviewed
Jun 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Execution of
provides rough estimation (due to some differences between builds - eg with/without ECJ)
that execution of each build downloads about 300M from Maven Central,
each GitHub Actions CI run contains 27 builds, so about 8G in total.
Better to cache this in GitHub Actions for the following reasons even if size of matrix might be reduced:
To reduce downloads from Maven Central - see https://central.sonatype.org/faq/429-error/
To be less affected by incidents with access of Maven Central (amount of which might increase due to previous point) - one known to me is quite recent https://github.com/orgs/community/discussions/183607
Also on Linux single job takes on average about 4.3 min,
out of which about 30 sec (13%) is downloading dependencies,
while cache restoration takes just 3-5 sec.
Time benefits seem even bigger on Windows.
Total duration of all jobs in GitHub Actions prior to this change is about 11.5 min and after this change is about 8.6 min (about 25% faster).
Possible future improvements
dependency:go-offlinethere are still few downloads due to slight differences in configurations between builds (eg with/without ECJ) and dynamic dependencies (such as providers downloaded by maven-surefire-plugin, formatter downloaded by spotless-maven-plugin, and scala compiler)