Skip to content

build: decentralize build files so component and platform changes stop starting every platform lane #3232

Closed
5 of 5 issues completed

Description

@zackees

Problem

ci/ci_scope.py treats cmake/common/, cmake/finders/, libobs/cmake/ and the root CMake files as shared: touching any of them starts the macOS and Windows Rust/Tier 2 lanes (and blocks the merge queue on them). Because the build is described in a few central files, ordinary single-component or single-platform changes edit a shared file and pay for every platform.

Commits since 2026-08-01 touching shared build files (git log):

file commits
libobs/cmake/rust-hidden.txt / rust-exports.map / rust-unexports-macos.txt ~130 each
libobs/cmake/os-linux.cmake, os-freebsd.cmake 28 each
libobs/cmake/rust-exports.txt 26
cmake/common/groups.cmake, unity.cmake 15, 14
libobs/cmake/rust.cmake, sources.cmake 13, 11
CMakePresets.json, root CMakeLists.txt 11, 8

Switching build systems (Meson was asked about) does not fix this: a shared meson.build/options edit reconfigures every platform the same way. The fix is layout: put each fact next to the thing it describes, so the path tells ci_scope who is affected.

Plan (decentralized build files)

Each item: RED test in ci/ pinning the new layout + ci_scope mapping, then GREEN.

  • Per-unit symbol visibility. Replace the three central hidden-symbol lists with per-crate/per-unit fragments (or generate them from the Rust #[no_mangle] shims at build time) so a port edits only its own file. Platform-specific entries go in <os>-named fragments. Biggest win (~130 shared edits).
  • Per-platform split of cmake/common/. Move the OS branches of compiler_common.cmake, unity.cmake, groups.cmake, helpers_common.cmake into *-<os>.cmake files; teach ci/platform_paths.py that they start only their OS (as os-<os>.cmake already does).
  • Per-component source fragments. libobs/build/source-sets.json / sources.cmake and the group registrations become one fragment per component (next to its build/ dir), globbed at configure time; ci_scope treats a fragment as that component's path.
  • Per-test registration already exists (test/cmocka/tests.d/); audit the remaining central lists (test/cmocka/CMakeLists.txt, CMakePresets.json) the same way.
  • Shared-file budget ratchet. A ./lint check that reports which commits on a PR touch a shared build path, so new central lists don't creep back.

Out of scope: replacing CMake (#1332 covers the Cargo direction).

Related: #1997, #2288, #1051.

Activity

  1. added
    infraBuild, gate, CI and tooling
    trackerTracks work in sub-issues or a checklist; not claimable itself
    P2Normal priority
    size:XLToo big: split into sub-issues before it is Ready
    on Oct 31, 2026
  2. zackees commented on Oct 31, 2026

    @zackees
    MemberAuthor

    All sub-issues landed: #3248 (#3233 symbol fragments), #3269 (#3234 cmake/common OS-neutral), #3280 (#3235 libobs source-set files), #3293 (#3236 per-unit port metadata), #3296 (#3237 shared-build-file ratchet). Follow-ups if they become hotspots: the single-file source sets of frontend, obs-nvenc, mac-capture, shared/qt/wrappers and cmake/graphics-source-sets.json.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priorityinfraBuild, gate, CI and toolingsize:XLToo big: split into sub-issues before it is ReadytrackerTracks work in sub-issues or a checklist; not claimable itself

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions