Skip to content

Commit 6296d44

Browse files
committed
\fix: improve xmake installation on Windows CI\n\n- Add chocolatey installation as primary method for Windows runners\n- Add fallback to official xmake installer with proper PATH setup\n- Add verification step to ensure xmake is installed correctly\n- Fix Windows PowerShell syntax for environment variables\n- Ensure xmake is available in PATH for subsequent steps"
1 parent bb991b2 commit 6296d44

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/tests.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,19 @@ jobs:
8787

8888
- name: Install xmake
8989
run: |
90-
Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content
90+
# Try chocolatey first, then fallback to official installer
91+
try {
92+
choco install xmake -y
93+
} catch {
94+
Write-Host "Chocolatey installation failed, trying official installer..."
95+
Invoke-Expression (Invoke-Webrequest 'https://xmake.io/psget.text' -UseBasicParsing).Content
96+
$env:PATH = "$env:USERPROFILE\.local\bin;$env:PATH"
97+
echo "$env:USERPROFILE\.local\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
98+
}
99+
100+
- name: Verify xmake installation
101+
run: |
102+
xmake --version
91103
92104
- name: Configure xmake
93105
run: |

0 commit comments

Comments
 (0)