-
Notifications
You must be signed in to change notification settings - Fork 1
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
GitHub: cache more things #127
Conversation
acb05bc
to
c856f0f
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #127 +/- ##
=======================================
Coverage 82.45% 82.45%
=======================================
Files 16 16
Lines 627 627
Branches 38 38
=======================================
Hits 517 517
Misses 94 94
Partials 16 16 ☔ View full report in Codecov by Sentry. |
c856f0f
to
b59704d
Compare
@oliverlee I'm a bit worried about this in the post-cache step: I tried to reproduce locally but couldn't. Maybe it will be fixed once this runs on master and the cache is created. |
Github actions cache cannot be updated once it is created (except for separate versions on feature branches). This is how I handle repo cache in geometry: From looking at profiling data in CI logs, Here's a snippet from a recent build:
https://github.com/oliverlee/geometry/actions/runs/7514778513/job/20458026966 |
Also, the single saved repo cache in geometry is ~4GB. I assume it will be similar here if successful since the same hermetic toolchains are used. Since each job is creating a separate cache entry, each workflow run will probably hit the cache limit and result in cache evictions. |
also remove unnecessary remote_download_minimal. We're not using a remote cache so it's pointless. Change-Id: I375b456a064ccbd57d6cdc94f9b548371d92ddaf
b59704d
to
afbcd16
Compare
Hmm OK I guess not sure if this is the best, but seems a bit simpler that what you did to me. I split it into "bazel disk cache" which every job writes and reads, and "bazel other" which only one job writes and everyoone else just restores. |
"~/.cache/bazel_output_base/external" | ||
"~/.cache/bazel_repository_cache" | ||
"~/.cache/bazelisk" | ||
key: bazel-other |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just fyi, you will only be able to write this cache once per branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I did not know that's how the cache action worked but I think that's fine for these.
Jobs show about 0 second duration for cache restore steps. Maybe you can try manually clearing the caches and then triggering the workflow twice? |
Co-authored-by: Oliver Lee <[email protected]>
also remove unnecessary remote_download_minimal. We're not using a
remote cache so it's pointless.
Change-Id: I375b456a064ccbd57d6cdc94f9b548371d92ddaf