Skip to content

ci: Front-load build-system and test changes per subsystem so port PRs run Linux-only #2288

Closed

Description

@zackees

Problem

ci/ci_scope.py starts the macOS and Windows lanes, about 9–10 min each in the merge queue, only for shared build files:

  • libobs/cmake/ (rust-exports.map, rust-hidden.txt, rust-unexports-macos.txt)
  • cmake/common/ and cmake/finders/
  • rust/*/build.rs and rust/*/src/platform/mod.rs
  • the C++ test registrations

Changes to rust/ and libobs/ sources run on Linux only.

Today almost every port PR edits the export and hidden lists, and often adds tests or registrations too. So every unit pays for all three platforms, even though its real change is Rust code that only needs Linux. Relinking on Linux is cheap; changing the build system is what's expensive.

Proposal: front-load the build-system and test changes once per subsystem

  1. Characterization PR, one per subsystem (for example obs-hotkey or the graphics files). It is the only PR in the series that touches shared build files, so it is the only one that runs macOS and Windows. It carries:
    • the large characterization and differential tests for the whole subsystem, passing against C;
    • every test registration;
    • the Rust stubs (todo!() or a fallback to C) with their export-map entries;
    • any build.rs or crate wiring.
  2. Port PRs. Each one only fills in Rust bodies under rust/*/src and turns some of the existing tests green. It is Linux-only in PR CI and in the queue.
  3. Switch-over PR, one per subsystem. It moves the C symbols to rust-hidden.txt and deletes the C in one batch. That is the second and last macOS/Windows run for the subsystem.

For a subsystem of N units, that is 2 macOS/Windows runs instead of N.

Open questions (Decision needed)

  • RED evidence. A port PR would show RED by running the existing tests against its stub, not by adding a new test. This needs a line in testing-policy.md.
  • Hidden-list timing. Can a symbol stay C-backed while its Rust body is complete, until the batch switch-over? Tier 2 against hybrid libobs only exercises Rust after the switch.
  • Ratchet. A lint could flag a port PR (port/* branch) that touches a shared build file, asking for a reason.

Pilot

Pick the next unclaimed subsystem in the port order, then measure the macOS and Windows minutes per unit before and after.

Activity

  1. added
    design
    on Oct 25, 2026
  2. zackees commented on Oct 25, 2026

    @zackees
    MemberAuthor

    Step 1 is open as #2292. It covers your exception: a change that hides the same symbol in all three lists stays on Linux. Replaying the 64 merges since 2026-10-17 that touched the lists: all 64 were mirrored, and 49 would have skipped the macOS and Windows lanes. The other 15 also touched build.rs, platform/mod.rs or C++ tests. Front-loading (the design above) is the follow-up for those.

  3. added
    P2
    size:M
    on Oct 25, 2026
  4. zackees commented on Oct 25, 2026

    @zackees
    MemberAuthor

    /ready

    Triage: a design with measured value (replaying the 64 merges since 10-17: 49 would have skipped the macOS/Windows lanes), split into steps, with step 1 merged (#2292, mirrored hidden-symbol list changes stay on Linux). Acceptance per step: a ci/test_ci_scope*.py case per rule, plus a replay showing which past merges change lanes. Note #1294 part 2 (compile-only cross builds of touched host groups): the fewer platform lanes run, the more that safety net matters. P2 (merge-queue time), size:M.

  5. added
    ready
    on Oct 25, 2026
  6. zackees commented on Oct 26, 2026

    @zackees
    MemberAuthor

    Replay after step 1 (#2292): I ran ci_scope.scope() on every first-parent merge on master since 2026-10-20, using each merge's own tree and the hidden-list mirror check.

    So the front-loading series in the proposal would save little now. The per-unit cost it targeted is gone after #2292. I'm not claiming this, and I suggest closing #2288 as done by step 1. The three open questions (RED from existing tests, hidden-list timing, the port-branch ratchet) only matter if the series is still wanted. A separate issue would also be a better home for #1294 part 2 (compile-only cross builds of touched host groups).

  7. zackees commented on Oct 27, 2026

    @zackees
    MemberAuthor

    Closing as superseded by #2292. The replay of 591 first-parent merges since 2026-10-20 found 132 platform-lane selections, none from routine unit ports; the remaining selections were genuine platform-sensitive build or test changes. The proposed subsystem front-loading would no longer save the per-unit macOS/Windows runs it targeted. See the 2026-10-26 replay comment above.

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

    P2designreadysize:M

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions