#!/usr/bin/env bash # Shared with .gitea/workflows/build.yml and .gitea/workflows/release.yml -- # this is the actual macOS configure/build/test/verify sequence. Edit once, # here, so both workflows stay in sync instead of drifting copies. # # 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 check 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. set -euo pipefail 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 cmake --build build ctest --test-dir build --output-on-failure # Show what was built. # # This is not purely informational: 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.) 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'