Skip to content

ci: Fast PR path (Dylint + cargo check + path-scoped platform jobs), full suite after merge; prebuilt Qt libs for the Linux fast path #992

Closed

Description

@zackees

Goal: get PRs in as fast as possible. Cut PR CI time by about 95% and run only the checks that actually break CI. A break that slips through and is caught later is acceptable; slow CI is not. Related: #974 (superseded runs, fixed by #988), #436 (release-gating app builds).

Fast PR path (required on every PR)

  • lint lane: Dylint (dylints/*), rustfmt, clippy.
  • cross lane: check for the Windows and macOS targets from Linux (rust-cross-lint). Confirm it runs cargo check and Dylint for both targets, not only clippy.
  • Platform jobs stay path-scoped by ci/ci_scope.py: a change to macOS or Windows files (C or Rust) reruns that platform, so a compile or link error shows up on the PR that caused it. Shared build/CI config reruns both.
  • Add a compile-only app build for a platform when its files change, if the cross lane does not cover link-time errors. Measure its time first.

Moved off the PR path

  • Rust unit tests, Tier 2, Linux app builds: run on master after merge and on the scheduled run (scheduled.yaml, no new workflow file). A failure opens an issue.
  • Path-scoped test selection (run only tests relevant to changed paths), as a later step after the above.

Merge queue

  • merge_group runs only the fast gate, so entries clear in minutes. CI Gate requires only the fast-path jobs on PRs.

Qt libs ready to link on the Linux fast path

  • Make prebuilt Qt libraries available on the Linux runner (cached or a prebuilt artifact) so the Linux fast path can link the frontend without building or downloading Qt each run.
  • Decide the source (deps archive vs distro packages vs cached build), pin the version, and verify a cold and a warm run time.

Acceptance

  • A typical PR's required CI finishes in a few minutes; measured before and after with gh run view timings.
  • A scheduled master run covers everything removed from the PR path and files an issue on failure.

Activity

  1. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Linux Qt fast path landed in #994 (cfcd2c8).

    • New job Qt Frontend Linux builds the obs-studio Qt frontend and runs the Qt-linked cmocka tests under xvfb.
    • Qt 6.11.1 (qt6-6.11.1-linux-x86_64-glibc2.28) and FFmpeg 8.1.2 (ffmpeg-8.1.2-linux-x86_64-glibc2.28) come prebuilt from obs-rust/obs-studio-libs, pinned by tag and sha256 and cached by sha256. Qt and FFmpeg are never compiled, and no distro Qt, FFmpeg or codec packages are installed. The job fails if CMake resolves Qt or libavcodec outside those prefixes.
    • ci/ci_scope.py sets a qt flag for frontend/, shared/qt, shared/properties-view, plugins/frontend-tools, Qt-linked tests and the job's own files. The job runs only when qt is set, and always on master, schedule and ci-full. Otherwise it's skipped and passes CI Gate.
    • Timing: 9m52s on the first green run, which was cold (no ccache, no lib cache). No warm run has been measured yet.
    • Gap: the prebuilt Qt has no Qt6Test, so test_hotkey_capture_mnemonic is skipped in this job. Next step: add the Test module to obs-studio-libs' Qt build.

    Already done: #993 (tests deferred off the PR path). Still open in this issue: a scheduled master run that files an issue on failure, and path-scoped test selection.

  2. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Measured timings for the Linux Qt fast-path job (Qt Frontend Linux, #994):

    Run Total Prebuilt Qt and FFmpeg fetch/cache Install build deps Build frontend and run Qt tests
    Cold (PR #994, no ccache) 592 s ~2 s 25 s 543 s
    Cold (master 38860135629) 598 s
    Warm (master 38863907761) 414 s 3 s 37 s 349 s
    • Prebuilt libraries: Qt and FFmpeg are never compiled. Fetching them from obs-studio-libs, or restoring them from the cache, costs about 3 s.
    • What's left: most of the remaining time is compiling OBS itself plus the Qt tests. The ccache restore step took 2 s, so the warm run probably got only a partial cache hit.
    • Next lever: a full ccache key on master, plus building only the Qt targets the changed path needs. Both go into the per-path fast gate this issue is now heading towards.
    • When it runs: this job runs only when the qt path scope is set (frontend/ and the Qt-linked code and tests). A core-only PR doesn't run it at all.
  3. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Fast gate landed in #1013 (merged). Measured with probe PR #1039 (doc-comment change in rust/obs-util, a crate linked into libobs, so it also selects Tier 2):

    Before (3 recent core-ish PR runs): about 12 runners per PR, queue waits 30 s to 11 min per job, Rust Tests job 141-154 s, wall clock 21-41 min.

    After: 6 runners (Event Data, CI Mode, Checks, Validate Data, Fast Gate, CI Gate), plus Tier 2 jobs when the paths select them. No labels change CI.

    cold run re-run (warm)
    Event Data / CI Mode (parallel) 17 s / 19 s 18 s / 23 s
    Fast Gate queue 3 s 56 s
    Fast Gate run 200 s 202 s
    setup soldr 40 s 57 s
    lint (fmt, clippy, Dylint) 59 s 51 s
    unit tests (obs-util + dependents) 85 s 69 s
    push to Fast Gate done about 3m45s about 5m15s (queue 56 s)

    So a core change gets lint, Dylint and unit tests in about 3m45s when a 26.04 runner is free. Queueing, not job work, is the remaining variable.

    Not green yet, not caused by this work: the 6 Tier 2 Linux test shards fail on master too (validate.sh: line 87: rustc: command not found, exit 127, from the build/shard split in #975; master push run 38871391393 fails identically). CI Gate on #1039 is red only because of that.

    Follow-ups: fix the Tier 2 shard rustc PATH on master; Windows/macOS Qt lanes; the platform-rename issue to drop the legacy fallback in ci/platform_paths.py.

  4. zackees commented on Oct 16, 2026

    @zackees
    MemberAuthor

    Done. A core PR now clears its required CI in about 4 minutes.

    Landed:

    Measured on PR #1039, a core change in rust/obs-util. The Fast Gate took 200 s cold: setup soldr 40 s, lint 59 s, unit tests 85 s. Push to Fast Gate done was about 3m45s; the re-run took about 5m15s because of a 56 s runner queue wait. #1046 went push-to-green in about 4 min.

    Runners per core PR went from about 12 to 6. Queue waits used to run 30 s to 11 min, with 21 to 41 min total wall time.

    Follow-ups:

    The design write-up is in the Path-Scoped CI with ci.toml doc.

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

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions