ci(windows): require node on runner; add toolchain preflight
build-windows / build-windows-x64 (push) Failing after 1h0m19s

This commit is contained in:
2026-05-04 18:51:25 +02:00
parent e1ca674a54
commit a99aeb843f
2 changed files with 24 additions and 8 deletions
+19 -7
View File
@@ -33,14 +33,26 @@ jobs:
with:
submodules: recursive
- name: Show toolchain versions
shell: bash
- name: Verify host toolchain
shell: pwsh
run: |
rustc --version
cargo --version
clang --version
flutter --version
python --version
$required = 'node','pwsh','git','bash','python','rustc','cargo','rustup','clang','flutter','nuget','cmake','ninja'
$missing = @()
foreach ($tool in $required) {
$cmd = Get-Command $tool -ErrorAction SilentlyContinue
if (-not $cmd) { $missing += $tool; continue }
$ver = & $tool --version 2>&1 | Select-Object -First 1
Write-Host ("{0,-10} {1} ({2})" -f $tool, $cmd.Source, $ver)
}
if ($missing.Count -gt 0) {
Write-Error ("Missing tools on runner: {0}. Re-run provision.ps1 or install manually." -f ($missing -join ', '))
exit 1
}
if (-not $env:VCPKG_ROOT -or -not (Test-Path "$env:VCPKG_ROOT\vcpkg.exe")) {
Write-Error "VCPKG_ROOT not set or vcpkg.exe missing at $env:VCPKG_ROOT"
exit 1
}
Write-Host "VCPKG_ROOT $env:VCPKG_ROOT"
- name: Install flutter_rust_bridge codegen tools
shell: bash
+5 -1
View File
@@ -47,10 +47,14 @@ if (-not (Get-Command choco -ErrorAction SilentlyContinue)) {
}
Write-Host '==> Installing base packages'
choco install -y --no-progress git python311 nuget.commandline 7zip cmake ninja
# nodejs-lts: act_runner needs node to execute JavaScript actions.
# powershell-core: workflows commonly use `shell: pwsh` (PS 7), not the OS's PS 5.1.
choco install -y --no-progress git python311 nuget.commandline 7zip cmake ninja nodejs-lts powershell-core
Add-MachinePath 'C:\Program Files\Git\cmd'
Add-MachinePath 'C:\Python311'
Add-MachinePath 'C:\Python311\Scripts'
Add-MachinePath 'C:\Program Files\nodejs'
Add-MachinePath 'C:\Program Files\PowerShell\7'
# --- 2. Visual Studio 2022 Build Tools (MSVC v143 + Win10 SDK) ---
$vsInstaller = "$env:ProgramFiles(x86)\Microsoft Visual Studio\Installer\vswhere.exe"