Skip to content

ci: Tier 2 Linux builds once, then fans the tests out over parallel runners (target design for #930) #937

Closed

Description

@zackees

Part of #930. Do first: this is the target shape for Tier 2 Linux, and the other Tier 2 items in #930 are steps toward it.

Why

Measured on #918's queue run (Tier 2 Linux, 12.9 min):

Step Time
Setup (container, Rust staticlib, checks) 2.4 min
Build OFF (C) libobs.so + tests, warm ccache 28 s
Build ON (Rust) libobs.so + tests 33 s
OFF ctest 4.7 min
ON ctest 4.7 min

Builds are about 1 min; tests are 9.4 min, run back to back. Parallelizing the builds alone saves about 30 s. The win is building once and splitting the tests across runners.

Design

  1. Build job (one runner).
    • From one CMake configure, build the C libobs.so (ENABLE_RUST_LIBOBS=OFF), the Rust libobs.so (ON), and the cmocka test programs once.
    • The two libraries share the soname and exports, so the same test binaries run against either via LD_LIBRARY_PATH. That makes it a real drop-in ABI check.
    • Upload the two libraries, the test programs and their data as one artifact (about 100 MB).
  2. Test runners (matrix: library × shard).
    • For example {OFF, ON} × 4 shards. Each downloads the artifact and runs ctest -I <shard>,,<N> under xvfb against its library.
    • RUN_SERIAL tests go on one shard per library.
    • The floor is the longest single test (about 83 s, test_deinterlace_2x_field_order) plus about 30 s of artifact download.
  3. Symbol checks (report-only, after the tests).
    • A job that needs the test runners runs the new meta: Faster CI: code-PR queue runs under 8 minutes #930 A7 checks every time: the per-unit nm names (C object vs Rust exports) and the cbindgen-header signature compile.
    • For now they report without failing. The C and Rust sides may not be one-to-one yet, and there will be exceptions (Rust runtime internals, helpers, intentional differences). The report goes to the job summary as a list of mismatches.
    • Ratchet later: record the current mismatches as an allowlist, fail only on new ones, and shrink the list toward one-to-one.
    • The existing library-level nm -D OFF/ON comparison (IDENTICAL (1766 symbols) today) stays enforced as it is now. It already passes, and dropping it would weaken the current gate.
  4. Gate: CI Gate ✅ fails if any shard fails or the enforced export comparison differs. The lane proof is published only when all of them pass.

Later wins it enables

  • The C libobs.so depends only on C sources and build files, so Rust-only PRs can reuse master's artifact and skip the OFF build and the OFF shards.
  • The shard count is a single knob to trade runner minutes against wall time.

Checks before building it

  • decklink.so and obs-nvenc.so load libobs dynamically, so the swap works for them too.
  • Tests that compile a C source directly into the test program (test_utf8, …; testing-policy.md:200) only test C; they stay valid but don't exercise the swap.
  • Both libraries need identical compiler flags (one configure, two targets).

Expected

Tier 2 Linux from 12.9 min to about 3–4 min wall time.

Stepping stones

Activity

  1. added
    infra
    on Oct 16, 2026
  2. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Claiming: #937

    1. First cut, no CMake changes: one build job configures and builds OFF and ON (about 1 min warm), runs the export/ported-object/plugin checks, and uploads each build tree minus object files. Test jobs (mode × shard matrix) unpack it at the same path in the same image and run ctest -I <shard>,,<N>. The exports job compares OFF/ON as now; the report-only symbol checks come after.
    2. Follow-up: build the cmocka tests once and swap the C/Rust libobs.so, so Rust-only PRs reuse master's C library.
      RED test first in ci/; measured against today's 2-job split (ci: Tier 2 Linux runs OFF and ON as parallel jobs #956).
  3. self-assigned this
    on Oct 16, 2026
  4. added
    claimed
    on Oct 16, 2026
  5. github-actions commented on Oct 16, 2026

    @github-actions

    Claim bot: claimed by @zackees. It expires after 48 h (8 h on critical issues) without a progress comment here or a push, comment or review on a linked PR.

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

Metadata

Metadata

Assignees

Labels

claimedinfra

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions