ci(windows-drivers): LLVM via portable tar.xz + self-provision driver-build
apple / swift (push) Failing after 1s
apple / screenshots (push) Has been skipped
windows-drivers-provision / provision (push) Successful in 1m26s
windows-drivers / probe-and-proto (push) Successful in 16s
windows-drivers / driver-build (push) Successful in 56s
ci / rust (push) Successful in 1m16s
ci / web (push) Successful in 40s
android / android (push) Successful in 3m12s
ci / docs-site (push) Successful in 58s
deb / build-publish (push) Successful in 3m22s
decky / build-publish (push) Successful in 13s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 4s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 4s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 3s
ci / bench (push) Successful in 4m44s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m36s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m24s
docker / deploy-docs (push) Successful in 6s

The LLVM NSIS .exe /S silent install HANGS in the headless SYSTEM CI session
(stuck >15min after download, blocking the single runner). Switch to the portable
clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz (curl + Win11 tar -xf, strip 1) —
deterministic, no installer. And make driver-build run the provision script itself
(idempotent) so it self-provisions LLVM and never races a separate provision run.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-24 09:27:42 +00:00
parent 1682b83b3f
commit b24c10a723
2 changed files with 19 additions and 9 deletions
+5
View File
@@ -124,6 +124,11 @@ jobs:
LIBCLANG_PATH: 'C:\llvm-21\bin' LIBCLANG_PATH: 'C:\llvm-21\bin'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Ensure WDK + cargo-wdk + LLVM 21.1.2 (idempotent self-provision)
# Run the provisioning script here too so driver-build is self-sufficient and never races a
# separate provision run on the single runner. Path is relative to the job working-directory
# (packaging/windows/drivers). Near-noop once the toolchain is present.
run: ../../../scripts/ci/provision-windows-wdk.ps1
- name: cargo build wdk-probe (windows-drivers-rs) - name: cargo build wdk-probe (windows-drivers-rs)
run: cargo build -p wdk-probe -v run: cargo build -p wdk-probe -v
- name: Inspect the produced DLL's /INTEGRITYCHECK bit - name: Inspect the produced DLL's /INTEGRITYCHECK bit
+14 -9
View File
@@ -62,15 +62,20 @@ $libclang = Join-Path $llvmDir 'bin\libclang.dll'
if (Test-Path $libclang) { if (Test-Path $libclang) {
info "LLVM 21.1.2 already present ($libclang) — skipping." info "LLVM 21.1.2 already present ($libclang) — skipping."
} else { } else {
$url = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.2/LLVM-21.1.2-win64.exe' # Use the portable .tar.xz, NOT the NSIS .exe: the .exe /S silent install HANGS in the headless SYSTEM
$tmp = Join-Path $env:TEMP 'LLVM-21.1.2-win64.exe' # CI session (observed stuck >15 min after download, blocking the runner). Win11's bundled tar
info "Downloading LLVM 21.1.2 -> $tmp" # (bsdtar/libarchive) extracts .tar.xz; the tarball has one top-level dir, so --strip-components=1
Invoke-WebRequest -Uri $url -OutFile $tmp -UseBasicParsing # lands bin/ at $llvmDir\bin. We only need libclang.dll + the clang resource dir for bindgen.
info ("downloaded {0:N1} MB; installing silently (NSIS /S /D=$llvmDir)..." -f ((Get-Item $tmp).Length / 1MB)) $url = 'https://github.com/llvm/llvm-project/releases/download/llvmorg-21.1.2/clang+llvm-21.1.2-x86_64-pc-windows-msvc.tar.xz'
# NSIS: /S = silent; /D=<path> MUST be last and unquoted (path has no spaces). $tmp = Join-Path $env:TEMP 'llvm-21.1.2-msvc.tar.xz'
$p = Start-Process -FilePath $tmp -ArgumentList '/S', "/D=$llvmDir" -Wait -PassThru info "Downloading LLVM 21.1.2 portable archive (~898 MB) -> $tmp"
info "LLVM installer exit = $($p.ExitCode)" & curl.exe -L --fail --retry 3 -o $tmp $url
if (-not (Test-Path $libclang)) { throw "LLVM 21.1.2 install did not produce $libclang (exit $($p.ExitCode))" } if ($LASTEXITCODE -ne 0) { throw "LLVM archive download failed ($LASTEXITCODE)" }
info ("downloaded {0:N0} MB; extracting to $llvmDir (tar, strip 1)..." -f ((Get-Item $tmp).Length / 1MB))
New-Item -ItemType Directory -Force -Path $llvmDir | Out-Null
& tar -xf $tmp -C $llvmDir --strip-components=1
if ($LASTEXITCODE -ne 0) { throw "tar extract of LLVM failed ($LASTEXITCODE) — runner tar may lack .xz support" }
if (-not (Test-Path $libclang)) { throw "LLVM extract did not produce $libclang" }
} }
# ---- 3. Verify (enumerate the REAL layout; fail only on build-essential absences) ---- # ---- 3. Verify (enumerate the REAL layout; fail only on build-essential absences) ----