-
Notifications
You must be signed in to change notification settings - Fork 81
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
Suboptimal caching on Actions CI #1391
Comments
Hi @patrickt,
Looking at the build log I see it reports
which looks like you're getting cache hits on all builds. Note that Bazel also caches build logs and reproduces them when fetching targets from cache. So, you'll see GHC output even on a cached build. IIRC the motivation for this behavior is to not hide compiler warnings due to caching.
Bazel's caching of repository rules is currently limited to downloads, e.g. |
Pinning definitely helped! We’re under 4 minutes now, which is really superb (and most of that is from restoring the binary cache). |
Thank you for reporting back, that sounds great! It sounds like this can be closed. Please reopen if there's another issue or something new comes up. |
👋 Hey, everyone. I’m running into some weird behavior when integrating Bazel into Semantic CI. Though Bazel caches the Stackage snapshot correctly on CI when combined with https://github.com/actions/cache, the projects defined in the
semantic
repository are being rebuilt every time. I’m hoping that someone can point out something I’m doing wrong, even though this is perhaps beyond the purview ofrules_haskell
itself (N.B. I based the config file off of @aherrmann’s one here.Some links that (hopefully) demonstrate what I'm talking about:
As per the examples, I am using
.bazelrc
to specify a local directory fordisk_cache
andrepository_cache
, then adding that directory to thepath
key in thecache
step.Note that in the build log, there’s an extensive
Analyzing…
phase that happens before the projects are compiled; since that doesn’t happen on a local build with full caching, I presume that this analysis step is the culprit, but I’m at a loss as to how to introspect as to why this analysis phase is occurring.Interestingly enough, the test phases cache correctly—it’s only the main builds that aren’t caching.
Things I’ve tried:
bazel
executable myself so that thebazel
that ships with the builder image doesn’t have to do the decompression step;bazel-out
//home/runner/cache
: this works, but balloons the cache greatly;git_repository
calls, sincegit_repository
appears not to respect the repository cache;Would
bazelisk
help here?Any insight would be much appreciated!
The text was updated successfully, but these errors were encountered: