ci: write the Windows steps in PowerShell, not bash
Build / macOS (macos-latest) (push) Successful in 32s
Build / Linux (ubuntu-24.04) (push) Successful in 50s
Build / Windows (windows-latest) (push) Failing after 9m35s

The core-only fallback and the "Show what was built" step were written with
`shell: bash`. `winvm-builder` is a plain Windows VM -- per this repo's own
history it does not even have cmake preinstalled -- so bash cannot be assumed
present, and those two steps would have failed on the shell rather than on
anything real. Both are PowerShell now, using $LASTEXITCODE and Test-Path.

Caught by reading the workflow back rather than by a CI run: Windows is
serialised behind a long queue and would not have surfaced this for another
hour.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RL8abRmgFXkVASHkkqiJbE
This commit is contained in:
2026-09-06 22:31:17 -07:00
co-authored by Claude Sonnet 5
parent 9a1a1474a9
commit 524e78c1a6
+14 -7
View File
@@ -122,13 +122,16 @@ jobs:
#
# Same fallback as macOS, and the same warning: a green job that
# quietly stopped building the plugin is worse than a red one.
shell: bash
# PowerShell, not bash: this runner is a plain Windows VM and bash
# cannot be assumed present.
run: |
if ! cmake -S . -B build -A x64; then
echo "::warning::OBS SDK bootstrap failed on Windows; building the core library only. The plugin module was NOT built."
rm -rf build
cmake -S . -B build -A x64
if ($LASTEXITCODE -ne 0) {
Write-Host "::warning::OBS SDK bootstrap failed on Windows; building the core library only. The plugin module was NOT built."
Remove-Item -Recurse -Force build -ErrorAction SilentlyContinue
cmake -S . -B build -A x64 -DSTPLUGIN_BOOTSTRAP_OBS=OFF
fi
if ($LASTEXITCODE -ne 0) { exit 1 }
}
- name: Build
run: cmake --build build --config Release
@@ -137,8 +140,12 @@ jobs:
run: ctest --test-dir build -C Release --output-on-failure
- name: Show what was built
shell: bash
run: ls -la build/package/bin || echo "no plugin module was built (core library only)"
run: |
if (Test-Path build\package\bin) {
Get-ChildItem build\package\bin
} else {
Write-Host "no plugin module was built (core library only)"
}
- name: Upload plugin
continue-on-error: true