Skip to content

Install LLVM 22 on Windows CI when choco can't - #8861

Merged
littledivy merged 1 commit into
mainfrom
littledivy/2026-11-24-flake-dom-exception-c-2
Nov 24, 2026
Merged

littledivy merged 1 commit into
mainfrom
littledivy/2026-11-24-flake-dom-exception-c-2

Conversation

@littledivy

@littledivy littledivy commented Nov 24, 2026 •

Copy link
Copy Markdown
Member

The Windows setup step installs LLVM 22 with choco (#8751), because the current MSVC STL rejects the runner's LLVM 20. When the Chocolatey feed returns a 503, choco prints "llvm was not found with the source(s) listed", upgrades nothing and exits 0. The build then runs with LLVM 20 and fails much later with STL1000 in whichever targets miss the remote cache. This happened on #8848, #8849 and #8850 between 03:58 and 04:09 UTC, and it looked like a flaky //src/bench/dom-exception:dom-exception-cpp@smoke on Windows. The feed was down for at least ten minutes, so retrying choco isn't enough.

In this patch the step checks the version clang-cl reports after choco. If it isn't 22.1.8, the step downloads LLVM-22.1.8-win64.exe from the llvm-project GitHub release, checks it against the release's SHA-256 and installs it silently. If clang-cl still isn't 22.1.8, the step fails right away with an error that names the cause.

This changes CI only. The Windows job on this PR runs the choco path. The fallback runs only when choco fails, so CI doesn't exercise it.

@littledivy
littledivy requested review from a team as code owners November 24, 2026 05:13

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of cc055ed8.

This review, of addea5ac

✅ Approved — This CI-only change makes the Windows setup fail early when LLVM 22 isn't installed. The retry loop, the version check and the exit handling are all correct, and I found nothing to fix.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🔒 Security: ✅ LGTM

No security concerns in this CI setup change.


📋 Code Quality: ✅ LGTM

The retry loop in .github/actions/setup-runner/action.yml makes three attempts with 30s and 60s delays and fails explicitly on the last one. The version check uses an escaped regex on the clang-cl --version output. After a successful break, $LASTEXITCODE is 0, so the step ends cleanly.


📝 Documentation: ✅ LGTM

The updated comment correctly explains why the step checks the installed version and retries.


Reviewed commit: addea5ac

@ryanking13

Copy link
Copy Markdown
Contributor

Will retrying actually fix the issue?

@littledivy

Copy link
Copy Markdown
Member Author

most probably no, just trying out random things

The Windows setup step installs LLVM 22 with choco, because the runner's
LLVM 20 is rejected by the current MSVC STL. When the Chocolatey feed
returns a 503, choco prints a warning, upgrades nothing and exits 0. The
build then runs with LLVM 20 and fails much later with STL1000 in
whichever targets miss the remote cache, which looked like a flaky
//src/bench/dom-exception:dom-exception-cpp@smoke on Windows. The feed
was down for at least ten minutes when that happened, so retrying choco
isn't enough.

In this patch the step checks the version clang-cl reports after choco.
If it isn't 22.1.8, the step downloads the LLVM 22.1.8 installer from
the llvm-project GitHub release, checks its SHA-256 and installs it. If
clang-cl still isn't 22.1.8, the step fails with an error that names
the cause.
@littledivy
littledivy force-pushed the littledivy/2026-11-24-flake-dom-exception-c-2 branch from addea5a to cc055ed Compare November 24, 2026 05:23
@littledivy littledivy changed the title Fail Windows CI setup when LLVM 22 isn't installed Install LLVM 22 on Windows CI when choco can't Nov 24, 2026

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved — This CI-only change verifies the installer by SHA-256 and checks the installed clang-cl version before it lets the Windows build go ahead. I found nothing to fix.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🔒 Security: ✅ LGTM

The installer comes from the official llvm-project GitHub release over HTTPS, and the step checks it against a pinned SHA-256 before running it.


📋 Code Quality: ✅ LGTM

The step in .github/actions/setup-runner/action.yml runs choco first. If the installed version is wrong, it downloads LLVM-22.1.8-win64.exe, verifies its SHA-256 and installs it silently to the same C:\Program Files\LLVM path. If clang-cl still doesn't report 22.1.8, it fails with a clear error. If the installer fails, the version check after it catches the failure.


📝 Documentation: ✅ LGTM

The inline comment correctly says why the step checks the installed version and falls back to the GitHub release.


Reviewed commit: cc055ed8

@ryanking13 ryanking13 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay to me. Thanks for looking into this.

Maybe we could make "downloads LLVM-22.1.8-win64.exe from the llvm-project GitHub release" as a default, but not sure GitHub is more reliable at all these days 🤷

@littledivy
littledivy merged commit 4cd61b1 into main Nov 24, 2026
24 checks passed
@littledivy
littledivy deleted the littledivy/2026-11-24-flake-dom-exception-c-2 branch November 24, 2026 09:17
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