[CI] Windows工具链验证修复
Some checks failed
Release Build / build-windows-x64 (push) Failing after 4s
Release Build / build-linux-x64 (push) Successful in 23s

This commit is contained in:
2026-01-03 22:03:24 +08:00
parent b382a0bca5
commit f67a43f159

View File

@@ -110,13 +110,34 @@ jobs:
steps: steps:
- name: 验证Windows工具链 - name: 验证Windows工具链
run: | run: |
# 检查 xmake 和 clang 是否在 PATH 中 # 设置当前 PowerShell 会话的执行策略
where xmake || echo "警告: xmake 未找到" powershell -Command "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force"
where clang++ || echo "警告: clang++ 未找到"
# 显示版本信息
if (Get-Command xmake -ErrorAction SilentlyContinue) { xmake --version }
if (Get-Command clang++ -ErrorAction SilentlyContinue) { clang++ --version }
# 使用 PowerShell 语法检查工具链
powershell -Command "
# 检查 xmake
if (Get-Command xmake -ErrorAction SilentlyContinue) {
Write-Host '✅ xmake 已安装'
xmake --version
} else {
Write-Host '警告: xmake 未找到'
}
# 检查 clang++
if (Get-Command clang++ -ErrorAction SilentlyContinue) {
Write-Host '✅ clang++ 已安装'
clang++ --version
} else {
Write-Host '警告: clang++ 未找到'
}
# 检查 git可选
if (Get-Command git -ErrorAction SilentlyContinue) {
Write-Host '✅ git 已安装'
} else {
Write-Host '警告: git 未找到'
}
"
- name: 检出代码 - name: 检出代码
run: | run: |
git clone https://git.fig-lang.cn/${{ github.repository }} . git clone https://git.fig-lang.cn/${{ github.repository }} .