Conversation
Delete the OBS plugin template CI infrastructure (~2800 lines of zsh/pwsh scripts, 6 composite actions, 3 complex workflows) and replace with: - Nix flake providing deterministic deps (clang-format, gersemi, cmake, ninja, pkg-config, ffmpeg, obs-studio on Linux) - Simple justfile recipes for check/fix/build (no more build-aux scripts) - Two minimal GitHub workflows: PR checks + push/release - Tag-triggered release automation with artifact uploads Also fixes: - FFmpeg not found in CI (now provided by Nix) - clang-format version pin breaking local dev (no longer pinned to 19.1.1) - xattr permission errors in macOS buildspec.cmake Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis pull request removes a large collection of CI and build helper files (multiple GitHub Actions workflows and composite actions, many scripts under .github/scripts, build-aux helper functions, and assorted logging/utilities). It adds a Nix flake ( 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/pr-pull.yaml:
- Around line 37-47: The Windows job build-windows is failing because the runner
lacks the just binary and the run steps default to PowerShell while the justfile
expects bash; fix by installing just (e.g., via choco or scoop) before invoking
it and ensure the just commands run under a bash shell by adding shell: bash to
the steps that call just (or run a bash environment), e.g., install just in a
pre-step and change the Setup and Build steps that call just setup and just
build to use shell: bash so the justfile shebang is honored.
In @.github/workflows/push.yaml:
- Around line 46-61: In the build-windows job update the steps that run "just"
so they first install the just binary and run under a bash shell: add a step
before the "Setup" step to install just (e.g., run: choco install just -y) and
add shell: bash to the steps that currently say run: just setup and run: just
build so those commands execute in a POSIX shell where just is available.
In `@flake.nix`:
- Around line 36-43: libDeps includes obs-studio only on Linux so macOS CI fails
because find_package(libobs REQUIRED) in CMake when BUILD_PLUGIN is enabled
cannot find OBS; fix by either (A) updating the macOS CI step that runs "nix
develop --command just setup" on macos-15 to install OBS beforehand (e.g., use
Homebrew to install or cask install obs) or (B) change CI to disable
BUILD_PLUGIN on Darwin (set BUILD_PLUGIN=OFF or similar env flag) and add a
clear note in documentation/README that macOS builds require OBS pre-installed
externally since obs-studio is not available in nixpkgs; reference libDeps,
obs-studio, BUILD_PLUGIN and find_package(libobs REQUIRED) when making the
change.
In `@justfile`:
- Around line 17-24: The check recipe in the justfile only runs gersemi on the
root CMakeLists.txt (the check target and the gersemi invocation), so
subdirectory .cmake files with gersemi directives are not validated; update the
gersemi invocation in the check target to include all CMake files (e.g. keep
CMakeLists.txt and add a glob like cmake/**/*.cmake or other project-wide
pattern) so gersemi validates all cmake/** files, and also reconcile the
documentation vs. implementation by either adding the build-aux/run-gersemi
script referenced in CLAUDE.md or updating CLAUDE.md to reflect the actual
command used in the check target (reference: justfile::check and the gersemi
command).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ca312cfa-224c-4843-bed7-7c4394d00dfa
⛔ Files ignored due to path filters (1)
flake.lockis excluded by!**/*.lock
📒 Files selected for processing (55)
.envrc.github/actions/build-plugin/action.yaml.github/actions/check-changes/action.yaml.github/actions/package-plugin/action.yaml.github/actions/run-clang-format/action.yaml.github/actions/run-gersemi/action.yaml.github/actions/setup-macos-codesigning/action.yaml.github/scripts/.Aptfile.github/scripts/.Brewfile.github/scripts/Build-Windows.ps1.github/scripts/Package-Windows.ps1.github/scripts/build-macos.github/scripts/build-ubuntu.github/scripts/package-macos.github/scripts/package-ubuntu.github/scripts/utils.pwsh/Ensure-Location.ps1.github/scripts/utils.pwsh/Invoke-External.ps1.github/scripts/utils.pwsh/Logger.ps1.github/scripts/utils.zsh/check_macos.github/scripts/utils.zsh/check_ubuntu.github/scripts/utils.zsh/log_debug.github/scripts/utils.zsh/log_error.github/scripts/utils.zsh/log_group.github/scripts/utils.zsh/log_info.github/scripts/utils.zsh/log_output.github/scripts/utils.zsh/log_status.github/scripts/utils.zsh/log_warning.github/scripts/utils.zsh/mkcd.github/scripts/utils.zsh/set_loglevel.github/scripts/utils.zsh/setup_ubuntu.github/workflows/build-project.yaml.github/workflows/check-format.yaml.github/workflows/dispatch.yaml.github/workflows/pr-pull.yaml.github/workflows/push.yamlbuild-aux/.functions/log_debugbuild-aux/.functions/log_errorbuild-aux/.functions/log_groupbuild-aux/.functions/log_infobuild-aux/.functions/log_outputbuild-aux/.functions/log_statusbuild-aux/.functions/log_warningbuild-aux/.functions/set_loglevelbuild-aux/.run-format.zshbuild-aux/run-clang-formatbuild-aux/run-gersemibuild-aux/run-swift-formatcmake/macos/buildspec.cmakeflake.nixjustfilesrc/moq-output.cppsrc/moq-output.hsrc/moq-service.cppsrc/moq-service.hsrc/moq-source.cpp
💤 Files with no reviewable changes (45)
- .github/scripts/utils.zsh/mkcd
- .github/scripts/.Brewfile
- .github/scripts/utils.zsh/log_info
- .github/scripts/utils.zsh/log_error
- .github/scripts/utils.zsh/log_debug
- .github/scripts/utils.zsh/log_warning
- .github/scripts/utils.zsh/log_output
- build-aux/run-clang-format
- .github/scripts/.Aptfile
- .github/scripts/utils.zsh/check_macos
- build-aux/.functions/log_debug
- .github/scripts/utils.zsh/log_status
- cmake/macos/buildspec.cmake
- .github/scripts/utils.pwsh/Ensure-Location.ps1
- .github/scripts/utils.zsh/log_group
- build-aux/run-gersemi
- build-aux/.functions/log_error
- build-aux/.functions/log_group
- build-aux/run-swift-format
- build-aux/.functions/log_info
- .github/scripts/utils.zsh/set_loglevel
- .github/workflows/dispatch.yaml
- build-aux/.functions/set_loglevel
- build-aux/.functions/log_status
- build-aux/.functions/log_output
- .github/workflows/check-format.yaml
- .github/scripts/utils.zsh/check_ubuntu
- .github/actions/setup-macos-codesigning/action.yaml
- .github/actions/run-gersemi/action.yaml
- .github/scripts/package-macos
- .github/scripts/utils.zsh/setup_ubuntu
- .github/scripts/utils.pwsh/Invoke-External.ps1
- .github/scripts/build-ubuntu
- .github/actions/check-changes/action.yaml
- .github/scripts/Package-Windows.ps1
- build-aux/.run-format.zsh
- .github/scripts/utils.pwsh/Logger.ps1
- .github/actions/run-clang-format/action.yaml
- .github/workflows/build-project.yaml
- .github/scripts/build-macos
- .github/scripts/package-ubuntu
- .github/scripts/Build-Windows.ps1
- .github/actions/package-plugin/action.yaml
- .github/actions/build-plugin/action.yaml
- build-aux/.functions/log_warning
| libDeps = | ||
| with pkgs; | ||
| [ | ||
| ffmpeg | ||
| ] | ||
| ++ lib.optionals stdenv.hostPlatform.isLinux [ | ||
| obs-studio | ||
| ]; |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if obs-studio is available for Darwin in nixpkgs
# and verify the CMake preset for macOS
# Check CMakePresets.json for macOS preset configuration
cat CMakePresets.json | jq '.configurePresets[] | select(.name == "macos")'
# Check if there's any OBS installation step in workflows
rg -n "obs-studio|brew.*obs|install.*obs" .github/workflows/Repository: moq-dev/obs
Length of output: 679
🏁 Script executed:
# Verify CMakeLists.txt has find_package(libobs REQUIRED) on line 17
head -20 CMakeLists.txt | tail -10Repository: moq-dev/obs
Length of output: 301
🏁 Script executed:
# Check the workflow files to confirm the exact commands run on macOS
rg -A 5 "macos-15|macos-" .github/workflows/ | head -60Repository: moq-dev/obs
Length of output: 1152
🏁 Script executed:
# Search for CMakeLists.txt to understand the OBS requirement
fd CMakeLists.txt --exec head -30 {}Repository: moq-dev/obs
Length of output: 1046
🌐 Web query:
obs-studio nixpkgs darwin macOS availability
💡 Result:
OBS Studio is not available in nixpkgs for Darwin/macOS platforms. The package's meta.platforms explicitly lists only Linux architectures: "x86_64-linux", "i686-linux", "aarch64-linux". Attempts to build it on Darwin (e.g., aarch64-darwin) fail because it is not supported. Open GitHub issues confirm this: #411190 (opened May 2025, marked stale) reports "obs-studio: not available on darwin platform", and #419380 requests Darwin support. Recent updates (e.g., PR #369193 for v31.0.1, merged Feb 2025) were not tested on Darwin and carry the "10.rebuild-darwin: 0" label, indicating no Darwin builds. NixOS wiki documentation focuses exclusively on Linux usage. Users on macOS with nix-darwin typically use alternatives like Homebrew for GUI apps including OBS Studio.
Citations:
- 1: obs-studio: not available on darwin platform NixOS/nixpkgs#411190
- 2: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/video/obs-studio/default.nix
- 3: obs-studio: 30.2.3 -> 31.0.1 NixOS/nixpkgs#369193
- 4: obs-studio: Request support for Darwin/macOS NixOS/nixpkgs#419380
- 5: https://wiki.nixos.org/wiki/OBS
macOS CI build will fail: obs-studio is not provided by the flake and unavailable in nixpkgs for Darwin.
The libDeps only includes obs-studio on Linux. On macOS, find_package(libobs REQUIRED) in CMakeLists.txt (line 15) fails when BUILD_PLUGIN is enabled, since obs-studio is not available in nixpkgs for Darwin. The workflows (.github/workflows/push.yaml:38-39 and .github/workflows/pr-pull.yaml:34-35) run nix develop --command just setup on macos-15 without providing OBS.
Consider:
- Installing OBS via
brewin the workflow before runningjust setup - Documenting that macOS builds require OBS to be pre-installed externally (since nixpkgs does not support Darwin)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@flake.nix` around lines 36 - 43, libDeps includes obs-studio only on Linux so
macOS CI fails because find_package(libobs REQUIRED) in CMake when BUILD_PLUGIN
is enabled cannot find OBS; fix by either (A) updating the macOS CI step that
runs "nix develop --command just setup" on macos-15 to install OBS beforehand
(e.g., use Homebrew to install or cask install obs) or (B) change CI to disable
BUILD_PLUGIN on Darwin (set BUILD_PLUGIN=OFF or similar env flag) and add a
clear note in documentation/README that macOS builds require OBS pre-installed
externally since obs-studio is not available in nixpkgs; reference libDeps,
obs-studio, BUILD_PLUGIN and find_package(libobs REQUIRED) when making the
change.
- Install just via chocolatey before running justfile commands - Set shell: bash for just steps (justfile uses bash shebangs) - Expand gersemi check/fix to include cmake/**/*.cmake files - Update CLAUDE.md to reflect removal of build-aux scripts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/push.yaml:
- Around line 67-81: The workflow currently grants workflow-wide write
permissions; restrict default permissions to read-only and grant contents: write
only to the release job by adding a top-level permissions: contents: read (or
removing write) and adding a permissions: contents: write block inside the
release job definition (the job named "release" that uses
softprops/action-gh-release@v2 and downloads artifacts) so only that job
receives elevated token scope.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: eabe7356-3a43-43d6-b516-d94d843ec909
📒 Files selected for processing (4)
.github/workflows/pr-pull.yaml.github/workflows/push.yamlCLAUDE.mdjustfile
✅ Files skipped from review due to trivial changes (2)
- CLAUDE.md
- .github/workflows/pr-pull.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- justfile
- Install pkgconfiglite via choco so CMake can find FFmpeg - Set PKG_CONFIG_PATH to choco ffmpeg-full pkgconfig directory - Consolidate choco installs into single step - Scope contents:write to release job only (was workflow-wide) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
just check/just fixcall tools directly, no morebuild-aux/scriptsWhat changed
flake.nix— devShell with all build and lint deps, pinned viaflake.lockjustfile—check/fixinline clang-format and gersemi calls, addedcirecipe.github/workflows/— two simple workflows usingcachix/install-nix-action+justcmake/macos/buildspec.cmake— xattr no longer fatal (was failing on build-generated files)Fixes
Test plan
nix develop -c just checkpasses locallynix develop -c just setup && nix develop -c just buildpasses locally (macOS verified)🤖 Generated with Claude Code