From 524e78c1a66a8fd80a17627b454b0f09e90315bc Mon Sep 17 00:00:00 2001 From: Josh Knapp Date: Sun, 6 Sep 2026 22:31:17 -0700 Subject: [PATCH] ci: write the Windows steps in PowerShell, not bash 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 Claude-Session: https://claude.ai/code/session_01RL8abRmgFXkVASHkkqiJbE --- .gitea/workflows/build.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index c1539b3..c20c893 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -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