File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,13 +53,25 @@ jobs:
5353 if : matrix.os == 'windows-latest'
5454 shell : pwsh
5555 run : |
56- # LLVM is pre-installed on windows-latest runners; just export the path
57- $llvmDir = "C:\Program Files\LLVM\lib\cmake\llvm"
58- if (Test-Path $llvmDir) {
59- echo "LLVM_DIR=$llvmDir" >> $env:GITHUB_ENV
60- Write-Host "Using pre-installed LLVM at $llvmDir"
56+ # Use llvm-config to find the cmake dir dynamically (LLVM is pre-installed on runner)
57+ $llvmConfig = (Get-Command llvm-config -ErrorAction SilentlyContinue)?.Source
58+ if ($llvmConfig) {
59+ $llvmCmakeDir = & llvm-config --cmakedir
60+ Write-Host "Found LLVM cmake dir: $llvmCmakeDir"
61+ echo "LLVM_DIR=$llvmCmakeDir" >> $env:GITHUB_ENV
6162 } else {
62- Write-Warning "LLVM cmake dir not found at expected path; CMake will search automatically"
63+ # Fallback: check common install paths
64+ $candidates = @(
65+ "C:\Program Files\LLVM\lib\cmake\llvm",
66+ "C:\ProgramData\chocolatey\lib\llvm\tools\llvm\lib\cmake\llvm"
67+ )
68+ foreach ($p in $candidates) {
69+ if (Test-Path $p) {
70+ Write-Host "Found LLVM at fallback: $p"
71+ echo "LLVM_DIR=$p" >> $env:GITHUB_ENV
72+ break
73+ }
74+ }
6375 }
6476
6577
@@ -120,4 +132,4 @@ jobs:
120132 # For Linux/Mac, it still uploads the single binary.
121133 path : |
122134 ${{ matrix.bin_path }}
123- benchmarks /
135+ examples /
You can’t perform that action at this time.
0 commit comments