ci: add tag-triggered release packaging workflow
Build / macOS (macos-latest) (push) Successful in 33s
Build / Linux (ubuntu-24.04) (push) Successful in 54s
Build / Windows (windows-latest) (push) Failing after 7m50s

Adds .gitea/workflows/release.yml, triggered only on a pushed v* tag, which
builds all three platforms (reusing the exact same configure/build/test
commands as build.yml, now factored out into .gitea/scripts/ so the two
workflows can't drift), zips each platform's build/package/ output, and
creates a draft Gitea Release with the archives attached.

This is packaging automation only -- it does not resolve or bypass the C1
WebRTC/OpenH264 release gate documented in README.md's Status section.
Nothing publishes until a human deliberately pushes a version tag (which
should not happen before owner sign-off) and then explicitly publishes the
resulting draft. The generated release notes lead with a restatement of the
open C1 question specifically so that second step can't be taken by
accident.

build.yml is refactored (not rewritten) to call the same shared scripts;
its job/step behavior is otherwise unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RL8abRmgFXkVASHkkqiJbE
This commit is contained in:
2026-09-07 05:06:25 -07:00
co-authored by Claude Sonnet 5
parent 79de5e8f23
commit 2b216d3d75
9 changed files with 493 additions and 113 deletions
+18 -108
View File
@@ -10,6 +10,11 @@ name: Build
# downloads the pinned obs-deps bundle and obs-studio source and builds just
# `libobs`. That step is the slow one: several minutes on a cold runner.
#
# The actual per-platform dependency-install and configure/build/test/verify
# commands live in .gitea/scripts/ and are shared with
# .gitea/workflows/release.yml, so the two workflows can't drift apart --
# edit the scripts, not either workflow, to change how a platform builds.
#
# RELEASE GATE: this workflow only builds, tests, and uploads CI-internal
# workflow artifacts (actions/upload-artifact, below) -- it does not create a
# Gitea Release, push a tag-triggered publish, or otherwise distribute
@@ -19,6 +24,10 @@ name: Build
# (The separate GPLv2/Apache-2.0 license-compatibility question is resolved:
# this project's own code is Apache-2.0.) If a real release/publish step is
# ever added here, it must carry that same gate.
#
# (.gitea/workflows/release.yml is that publish step, gated on a pushed
# version tag rather than on every push -- see the gate reminder baked into
# its generated release notes.)
on:
push:
@@ -38,26 +47,10 @@ jobs:
uses: actions/checkout@v4
- name: Install build dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq cmake ninja-build libobs-dev libcurl4-openssl-dev
run: .gitea/scripts/linux-deps.sh
- name: Configure
# Linux keeps its distribution libobs; the buildspec bootstrap is for
# the two platforms that have no such package.
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTPLUGIN_BOOTSTRAP_OBS=OFF
- name: Build
run: cmake --build build
- name: Test (core library)
run: ctest --test-dir build --output-on-failure
- name: Show what was built
run: |
ls -la build/package/bin/64bit build/package/data/locale build/package/licenses
ldd build/package/bin/64bit/streamer-tools-camera.so | grep -E 'obs|livekit'
nm -D build/package/bin/64bit/streamer-tools-camera.so | grep -E ' T obs_module_(load|unload)'
- name: Configure, build, test, verify
run: .gitea/scripts/linux-build.sh
- name: Upload plugin
continue-on-error: true
@@ -74,51 +67,10 @@ jobs:
uses: actions/checkout@v4
- name: Install build dependencies
run: brew install cmake ninja
run: .gitea/scripts/macos-deps.sh
- name: Configure
# The buildspec bootstrap runs here: it fetches obs-deps + the pinned
# obs-studio source and builds libobs before this project configures.
#
# If that fails, fall back to a core-library-only build rather than
# going red: the core library and its tests are what this job mainly
# guards, and the fallback is loud (a workflow warning, plus the
# "Show what was built" step below reporting no module) rather than
# silent. Do not remove the warning -- a green job that quietly stopped
# building the plugin is worse than a red one.
run: |
if ! cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release; then
echo "::warning::OBS SDK bootstrap failed on macOS; building the core library only. The plugin module was NOT built."
rm -rf build
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DSTPLUGIN_BOOTSTRAP_OBS=OFF
fi
- name: Build
run: cmake --build build
- name: Test (core library)
run: ctest --test-dir build --output-on-failure
- name: Show what was built
# This used to be informational only (every command "|| true"'d), so
# a bootstrap failure that silently fell back to a core-library-only
# build still reported a green job -- exactly the false-positive
# class of bug this step exists to catch, caught instead by a human
# reading the raw log by hand. The macOS bootstrap has been reliably
# building the real module in CI (6/6 tests, artifact uploaded --
# see README), so a missing module here is a regression to fail
# loudly on, not the old silent fallback. (This is separate from the
# macOS packaging gap in README -- that the module doesn't yet load
# as an OBS.app bundle -- which this check does not and cannot test.)
run: |
ls -la .deps/Frameworks/libobs.framework/Resources/cmake || true
if [ ! -f build/package/bin/streamer-tools-camera.so ]; then
echo "::error::no plugin module was built -- build/package/bin/streamer-tools-camera.so is missing. The macOS from-source libobs bootstrap is expected to succeed; treat this as a build failure, not a core-library-only fallback."
exit 1
fi
ls -la build/package/bin
otool -L build/package/bin/streamer-tools-camera.so
otool -L build/package/bin/streamer-tools-camera.so | grep -E 'obs|livekit'
- name: Configure, build, test, verify
run: .gitea/scripts/macos-build.sh
- name: Upload plugin
continue-on-error: true
@@ -140,51 +92,9 @@ jobs:
# preinstalled tooling (cmake included) can be assumed present.
uses: lukka/get-cmake@latest
- name: Configure
# The default Visual Studio generator is required, not Ninja:
# cmake/windows/buildspec.cmake keys the dependency slice off
# CMAKE_VS_PLATFORM_NAME, which only a VS generator sets.
#
# Same fallback as macOS, and the same warning: a green job that
# quietly stopped building the plugin is worse than a red one.
# PowerShell, not bash: this runner is a plain Windows VM and bash
# cannot be assumed present.
run: |
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
if ($LASTEXITCODE -ne 0) { exit 1 }
}
- name: Build
run: cmake --build build --config Release
- name: Test (core library)
run: ctest --test-dir build -C Release --output-on-failure
- name: Show what was built
# This used to be informational only: the else branch printed a
# message and exited 0, so a bootstrap failure that silently fell
# back to a core-library-only build (or a find_package(libobs)
# failure after a libobs that genuinely built, per the
# find_package(libobs) CMakeLists.txt fix above) still reported a
# green job -- exactly the false-positive class of bug this step
# exists to catch, caught instead by a human reading the raw log by
# hand across several "green" runs. The from-source libobs bootstrap
# is now expected to work reliably on this runner (that is the whole
# point of the buildspec bootstrap + find_package fix), so a missing
# module here is a regression to fail loudly on, not the old silent
# fallback.
run: |
$module = "build\package\bin\64bit\streamer-tools-camera.dll"
if (Test-Path $module) {
Get-ChildItem build\package\bin\64bit
} else {
Write-Host "::error::no plugin module was built -- $module is missing. The Windows from-source libobs bootstrap is expected to succeed; treat this as a build failure, not a core-library-only fallback."
exit 1
}
- name: Configure, build, test, verify
shell: pwsh
run: ./.gitea/scripts/windows-build.ps1
- name: Upload plugin
continue-on-error: true