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