@@ -141,6 +141,7 @@ jobs:
141141 build-windows :
142142 name : Build on Windows (pinned LLVM 20.1.0)
143143 runs-on : windows-2022
144+ timeout-minutes : 45
144145 permissions :
145146 contents : read
146147
@@ -194,7 +195,7 @@ jobs:
194195 path : deps/coretrace-log
195196 fetch-depth : 1
196197
197- - name : Install LLVM 20.1.0 archive with CMake package files
198+ - name : Install LLVM 20.1.0 archive with 7-Zip
198199 shell : pwsh
199200 run : |
200201 $ErrorActionPreference = "Stop"
@@ -205,15 +206,45 @@ jobs:
205206 $archivePath = Join-Path $env:RUNNER_TEMP $archiveName
206207 $extractRoot = Join-Path $env:RUNNER_TEMP "llvm-extract"
207208 $installRoot = "C:\Program Files\LLVM-$llvmVersion"
209+ $sevenZip = "${env:ProgramFiles}\7-Zip\7z.exe"
210+ $tarPath = Join-Path $env:RUNNER_TEMP "clang+llvm-$llvmVersion-x86_64-pc-windows-msvc.tar"
208211
212+ if (-not (Test-Path $sevenZip)) {
213+ throw "7z.exe not found at $sevenZip"
214+ }
215+
216+ Write-Host "Downloading LLVM archive from $archiveUrl"
209217 Invoke-WebRequest -Uri $archiveUrl -OutFile $archivePath
218+ Write-Host "Download finished"
219+ Get-Item $archivePath | Select-Object FullName, Length | Format-Table -AutoSize
210220
211221 if (Test-Path $extractRoot) {
212222 Remove-Item -Recurse -Force $extractRoot
213223 }
214224 New-Item -ItemType Directory -Force -Path $extractRoot | Out-Null
215225
216- tar -xJf $archivePath -C $extractRoot
226+ if (Test-Path $tarPath) {
227+ Remove-Item -Force $tarPath
228+ }
229+
230+ Write-Host "Extracting .xz to .tar with 7-Zip"
231+ & $sevenZip x $archivePath "-o$env:RUNNER_TEMP" -y
232+ if ($LASTEXITCODE -ne 0) {
233+ throw "7-Zip failed while extracting .xz archive"
234+ }
235+
236+ if (-not (Test-Path $tarPath)) {
237+ throw "Expected tar file not found after xz extraction: $tarPath"
238+ }
239+
240+ Write-Host "Extracting .tar to $extractRoot"
241+ & $sevenZip x $tarPath "-o$extractRoot" -y
242+ if ($LASTEXITCODE -ne 0) {
243+ throw "7-Zip failed while extracting .tar archive"
244+ }
245+
246+ Write-Host "Listing extracted directories"
247+ Get-ChildItem $extractRoot -Directory | Select-Object Name, FullName | Format-Table -AutoSize
217248
218249 $extractedDir = Get-ChildItem $extractRoot -Directory | Select-Object -First 1
219250 if (-not $extractedDir) {
@@ -231,6 +262,11 @@ jobs:
231262 $llvmConfigPath = Join-Path $llvmCmakeDir "LLVMConfig.cmake"
232263 $clangConfigPath = Join-Path $clangCmakeDir "ClangConfig.cmake"
233264
265+ Write-Host "Checking extracted LLVM files"
266+ Write-Host "clang-cl path: $clangClPath"
267+ Write-Host "LLVMConfig path: $llvmConfigPath"
268+ Write-Host "ClangConfig path: $clangConfigPath"
269+
234270 if (-not (Test-Path $clangClPath)) {
235271 throw "clang-cl.exe not found after LLVM archive extraction: $clangClPath"
236272 }
0 commit comments