Skip to content

Commit 26259f1

Browse files
fix: restore llvm installation using native commands and aliases
1 parent 870f895 commit 26259f1

1 file changed

Lines changed: 11 additions & 12 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,25 +40,24 @@ jobs:
4040
sudo apt-get install -y llvm-21-dev libclang-21-dev
4141
4242
- name: Install LLVM 21 (Windows)
43-
if: matrix.os == 'windows-latest'
44-
uses: kappel/setup-llvm@v1
45-
with:
46-
version: "21.x"
47-
48-
- name: Create LLVM Alias (Windows)
4943
if: matrix.os == 'windows-latest'
5044
shell: pwsh
5145
run: |
52-
$LlvmPath = (Get-Command llvm-config).Source
53-
$NewPath = $LlvmPath.Replace("llvm-config.exe", "llvm-config-21.exe")
54-
Copy-Item $LlvmPath $NewPath
55-
echo "LLVM 21 configurado no Windows"
46+
choco install llvm -y
47+
$llvmBin = "C:\Program Files\LLVM\bin"
48+
if (Test-Path "$llvmBin\llvm-config.exe") {
49+
Copy-Item "$llvmBin\llvm-config.exe" "$llvmBin\llvm-config-21.exe"
50+
Add-Content -Path $env:GITHUB_PATH -Value "$llvmBin"
51+
Write-Host "LLVM configurado com sucesso no Windows."
52+
}
5653
5754
- name: Install LLVM 21 (macOS)
5855
if: matrix.os == 'macos-latest'
5956
run: |
60-
brew install llvm@21
61-
echo "/opt/homebrew/opt/llvm@21/bin" >> $GITHUB_PATH
57+
brew install llvm@21 || brew install llvm
58+
LLVM_PATH=$(brew --prefix llvm@21 || brew --prefix llvm)
59+
sudo ln -sf "$LLVM_PATH/bin/llvm-config" "$LLVM_PATH/bin/llvm-config-21"
60+
echo "$LLVM_PATH/bin" >> $GITHUB_PATH
6261
6362
- name: Build SimpleScript
6463
run: zig build -Doptimize=ReleaseSafe

0 commit comments

Comments
 (0)