-
-
Notifications
You must be signed in to change notification settings - Fork 268
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
Use gradle-build-action in Actions #708
base: main
Are you sure you want to change the base?
Conversation
Just tested this on branch test-gradle-build-action. The docs for It creates so many cache files... And each CI run creates two new cache files for each job. Size is 85 MB per job. And it is getting even worse: updated Gradle from 8.1.1 to latest version 8.3, but this fails when running in Java 11+, so changed back to Gradle 8.2.1. In the meantime there are 88 files in cache: https://github.com/JFormDesigner/FlatLaf/actions/caches IMO there are two major problems with
Do you use |
Interesting; I haven't had caches from Here are some of my observations from https://github.com/JFormDesigner/FlatLaf/actions/runs/6052546499:
Let me check if there are some dials we could tweak to stop this from happening... Side note: you might want to consider disabling changes to README triggering the CI regardless of this PR? Just an idea. |
8d67582
to
e9be206
Compare
I believe that 7287ff4 should do the trick? 🤞 |
Excluding This run added ~1.5 GB and 10 additional files to cache. Coming closer to the 10 GB limit:
But they are accessed. See run 6057970068, which restores cache entries for Gradle 8.1.1, 8.2.1 and 8.3, but runs 8.2.1:
It also does not release storage when files for multiple Gradle versions are in a single cache entry. Take a look at
In run 6052414218, which was after moving from Gradle 8.1.1 to 8.3, it had 162 MB:
An in run 6052482553, which was after moving from Gradle 8.3 to 8.2.1, it growed to 240 MB:
So each time changing Gradle version, this single cache entry grows by 80 MB. |
Um... adding another gigabyte and half of cache was not what I was expecting to happen... |
This PR modifies the Actions workflows to use
gradle/gradle-build-action
for running gradle instead of invoking it from CLI.Changes include:
gradle/gradle-build-action
actions/setup-java
to take advantage of finer-grain caching provided bygradle/gradle-build-action
.--no-daemon
argument in native libraries workflow (handled bygradle/gradle-build-action
action - see documentation)