ci: make Windows workflow PowerShell 5 compatible
Some checks failed
Build Windows Release / Build Windows x64 Release (push) Failing after -3s

This commit is contained in:
luochen570
2026-05-30 21:01:21 +08:00
parent a2c9097496
commit ce5918e4c0

View File

@@ -61,9 +61,12 @@ jobs:
}
$bash = "$msysRoot\usr\bin\bash.exe"
& $bash -lc "pacman --noconfirm -Syuu" || $true
& $bash -lc "pacman --noconfirm -Syuu"
if ($LASTEXITCODE -ne 0) { Write-Host '第一次 pacman 系统更新返回非零,继续执行第二次更新。' }
& $bash -lc "pacman --noconfirm -Syuu"
if ($LASTEXITCODE -ne 0) { throw "pacman 系统更新失败,退出码:$LASTEXITCODE" }
& $bash -lc "pacman --noconfirm -S --needed git zip unzip p7zip mingw-w64-ucrt-x86_64-toolchain mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-qt6-base mingw-w64-ucrt-x86_64-qt6-imageformats"
if ($LASTEXITCODE -ne 0) { throw "pacman 安装依赖失败,退出码:$LASTEXITCODE" }
- name: Configure and build
shell: powershell