Skip to content

ci: Cache Windows LLVM download, and retry curl downloads - #2187

Merged
lgritz merged 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-cachellvm
Oct 17, 2026
Merged

lgritz merged 1 commit into
AcademySoftwareFoundation:mainfrom
lgritz:lg-cachellvm

Conversation

@lgritz

@lgritz lgritz commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Our Windows CI often fails spuriously in ways that are unrelated to whatever changes are in a PR, and then succeeds upon retry (sometimes after multiple retries). Often it's at the step where it's downloading the pre-built Windows LLVM that we stashed on a Google drive (we could not find a pre-built one with exactly the options we wanted, and we can't build LLVM from scratch in a reasonable time on the CI machines).

I finally (with some help from Claude) tracked down the source of these failures: we're hitting Google Drive download limits!

This patch uses GHA cache action to reuse those downloads, generally only retrieving from the Google drive the first time a branch or PR goes through CI, which throttles usage enough to keep us under quota.

The specifics:

  • Cache the unpacked LLVM (~/llvm/llvm-build) with actions/cache, keyed on LLVM_GOOGLE_DRIVE_ID. Both Windows jobs share the entry. The save step runs right after Dependencies, so a later build failure doesn't lose it. gh-win-installdeps.bash skips the download when the cache restored the directory.
  • When we do download, check the result with unzip -t. If it is not a zip, fail with a clear message and print the start of the file.
  • Add --fail --retry 5 --retry-delay 10 to the curl downloads in gh-win-installdeps.bash, build_llvm.bash, and build_cmake.bash, to ride out transient network failures.
  • Fix a missing ; before then in gh-win-installdeps.bash.

Assisted-by: Claude Code / Claude Opus 5.5

Our Windows CI often fails suriously in ways that are unrelated to
whatever changes are in a PR, and then succeeds upon retry (sometimes
after multiple retries). Often it's at the step where it's downloading
the pre-built Windows LLVM that we stashed on a Google drive (we could
not find a pre-built one with exactly the options we wanted, and we
can't build LLM from scratch in a reasonable time on the CI machines).

I finally (with some help from Claude) tracked down the source of
these failures: we're hitting Google Drive download limits!

This patch uses GHA cache action to reuse those downloads, generally
only retrieving from the Google drive the first time a branch or PR
goes through CI, which throttles usage enough to keep us under quota.

The specifics:

* Cache the unpacked LLVM (~/llvm/llvm-build) with actions/cache,
  keyed on LLVM_GOOGLE_DRIVE_ID. Both Windows jobs share the
  entry. The save step runs right after Dependencies, so a later build
  failure doesn't lose it. gh-win-installdeps.bash skips the download
  when the cache restored the directory.
* When we do download, check the result with `unzip -t`. If it is not
  a zip, fail with a clear message and print the start of the file.
* Add `--fail --retry 5 --retry-delay 10` to the curl downloads in
  gh-win-installdeps.bash, build_llvm.bash, and build_cmake.bash, to
  ride out transient network failures.
* Fix a missing `;` before `then` in gh-win-installdeps.bash.

Assisted-by: Claude Code / Claude Opus 5.5

Signed-off-by: Larry Gritz <lg@larrygritz.com>
@lgritz
lgritz merged commit 82d05bb into AcademySoftwareFoundation:main Oct 17, 2026
23 checks passed
@lgritz
lgritz deleted the lg-cachellvm branch October 17, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants