Skip to content

CI: run the Wine jobs and the Windows semantic-tests leg on main only (cuts CI demand by 65%) - #4657

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
ddm-j:ci/wine-and-windows-semantic-on-main
Nov 23, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
ddm-j:ci/wine-and-windows-semantic-on-main

Conversation

@ddm-j

@ddm-j ddm-j commented Nov 23, 2026

Copy link
Copy Markdown

Claimed in the coordination issue as: new BUILD item, #4571 (comment)

TL;DR

At today's PR rate, the CI queue never drains. Since 11-22 10:00 UTC, the queue wait has grown by about an hour every
hour (0 → 6.5 h by 20:00), and at today's rate it keeps growing.

This PR cuts CI demand by 65% by running three jobs only on main. In more than 1,000 sampled PR runs, none of the
three ever caught a failure that another job didn't also catch. Replaying the real traffic, the p90 queue wait at today's rate
falls from ~3.5 days to ~9 hours, and CI keeps up with twice the traffic it does now. The change only touches
the workflows and is reverted by reverting this PR.

What this PR can't do: get the wait under 30 minutes at today's volume. No change to the workflows can, so that
part is a decision for you. The options are at the bottom.

p90 queue wait vs push traffic

What changes

Job Share of PR runner time PR runs where only this job failed After this PR
Runtime / wine (winehq-stable) 14% 0 of 184 main and workflow_dispatch
Runtime / wine (ubuntu) 12% 0 of 186 main and workflow_dispatch
CI / semantic-tests (windows-latest) 14% 0 of 889 main and workflow_dispatch
Runtime / windows (MSVC build) 13% 120 of 663 unchanged: it catches real errors
CI / check (Windows) 19% 352 of 929, mostly the break on main noted below unchanged

A break that one of the moved jobs would catch still shows up on main, within one merge round.

These three are also the jobs whose runtime grows fastest. The Ubuntu Wine job went from 1.6 to 13.9 minutes in a
single day (11-22) as tests were added. With them off PRs, a push stops costing more runner time every hour.

Why the queue never drains

This repository belongs to a personal account, so every workflow shares one pool of 20 concurrent jobs, Windows
included. From 10:00 UTC on 11-22, demand was above that pool every hour. At the evening peak, running every push to
completion would have needed about 230 jobs at once.

Demand / capacity at today's rate p90 queue wait after 4 days Traffic served with p90 ≤ 30 min
Today 5.1× ~82 h, still growing 15% of today's
This PR 1.75× ~9 h 30%
This PR + #4085 (stdlib tests on Linux), Windows check on main 1.64× ~6 h 40%

What it would take to get under 30 minutes (your call)

  • Fewer runs per PR. 40% of PR CI runs are re-pushes to a PR that had already run, and many of them are the rebase the
    coordination issue asks for after each merge round. A PR without conflicts doesn't need that rebase to be tested.
  • Require approval for fork runs. This is already on your decisions list. CI then runs when you decide it should.
  • More capacity. A paid plan or self-hosted runners. A merge queue may need the repository to be owned by an
    organization; I couldn't confirm that.

Note. Every Windows check since 11-22 15:00 UTC fails on tests/test_docs_design_rows.py. That was fixed on
main in dac28e6b, but queued runs still test main as it was when they were triggered. With a queue this deep, a
break on main stays red in CI for about 6 hours after it is fixed.

How these numbers were made, and more charts

Data. Every Actions run from when the repository was created to 11-23 03:00 UTC: 19,768 runs from 4,431 PRs and
468 authors. Job timings come from a uniform sample of 3,800 finished runs. A job counts as having run only if a runner
picked it up. Jobs cancelled while still queued cost nothing; only 78 jobs were cancelled after they had started.

Model. A queue simulation that replays every real push in order, honouring each workflow's concurrency group (a
new push cancels the older run on that PR) and the needs: order. At 19 effective slots it reproduces the observed
queue growth to within 5 minutes per hour:

model validation

Forecast. The last 24 hours of traffic, replayed for 4 days. It uses the job mix of the latest complete window
(11-22 14:00–17:00) and leaves out runs that failed at startup (they cost nothing), which makes it conservative.
With the 09:00–17:00 job mix, today's setup comes out at 3.8× capacity and this PR at 1.7×, so the conclusion holds.
Traffic is scaled by adding or removing whole PRs.

Limits. The repository is two days old, and the PR rate grew about 7× during 11-22, so "today's rate" is a moving
target. The forecast doesn't count runs waiting for fork approval as demand.

demand vs capacity
4-day backlog
where the time goes
duration growth

Scripts, raw data (usernames removed, branch names hashed) and the CSVs behind every number: https://gist.github.com/ddm-j/0aa73670f8a5a8e42f8d9287879b0d0a

Data for reviewers (including AI reviewers): no need to re-pull the Actions API

Everything behind this PR is in https://gist.github.com/ddm-j/0aa73670f8a5a8e42f8d9287879b0d0a: the raw runs and jobs, the queue model (sim.py), the calibration, and a
README explaining how to rerun it all in a few minutes. The two tables that carry the argument:

job_stats.csv (failed_alone = runs where this job failed and no other job in the run did):

workflow,job,os,sampled_jobs,ran,median_min,p90_min,fail_rate,share_of_runner_time,failed_alone,runs_considered
CI,check,win,1708,940,2.65,4.65,0.434,0.1856,352,929
CI,semantic-tests (windows-latest),win,959,917,1.9,4.52,0.005,0.1387,0,889
Runtime,wine (winehq-stable),linux,202,188,7.42,9.82,0.0,0.1376,0,184
Runtime,windows,win,1045,675,1.62,2.82,0.317,0.1319,120,663
Runtime,wine (ubuntu),linux,202,187,4.05,13.9,0.0,0.1241,0,186
Runtime,linux-gpu-tools,linux,1045,672,1.08,2.03,0.219,0.0815,53,666
CI,semantic-tests (ubuntu-latest),linux,959,926,1.07,2.72,0.033,0.0812,3,919
CI,translator-tests,linux,1697,927,1.0,3.13,0.026,0.081,1,924
CI,change-scope,linux,1533,839,0.15,0.23,0.0,0.0094,0,839
No Game Data,no-game-data,linux,259,152,0.13,0.18,0.0,0.0093,0,152
Runtime,wine,linux,50,48,1.57,1.77,0.021,0.0075,1,48
CI,viewer-tests,linux,1592,822,0.12,0.2,0.0,0.0072,0,821
Runtime,build,win,51,50,0.83,1.1,0.02,0.0042,1,46
jactionlint,jactionlint,linux,67,50,0.18,0.25,0.0,0.0005,0,49
Runtime,macos,linux,1,1,4.22,4.22,0.0,0.0004,0,1

forecast.csv at today's traffic (minutes on day 4 of replaying the last 24 hours; capacity is 19 slots):

config,traffic_multiple,offered_demand_over_capacity,wait_p50_min_day4,wait_p90_min_day4,feedback_p50_min_day4,feedback_p90_min_day4
all_windows_on_main,1.0,1.09,40,103,47,191
baseline,1.0,5.06,4161,4943,10556,11930
proposal,1.0,1.75,445,529,761,955
proposal+stdlib_on_linux,1.0,1.64,292,350,389,659

Tested

  • actionlint 1.7.12, which jactionlint wraps, on both changed workflows: clean. The repo's jactionlint job runs on this PR as well.
  • tests/test_docs_*.py and tests/test_i18n_index.py (README changed): pass.
  • The semantic-tests matrix expression gives ["ubuntu-latest"] on pull_request and both legs otherwise; the wine job is skipped only on pull_request, so its check reports "skipped", not missing. Branch protection on main requires no checks.
  • The queue model was checked against observed queue waits (chart in the details above).
  • AI-assisted (Claude Code).

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a)

🤖 Generated with Claude Code

The account's 20 concurrent GitHub-hosted jobs have been saturated since
11-22 10:00 UTC and the queue wait grows by about an hour per hour. Three
jobs take about 40% of pull request runner time and never failed alone in
sampled pull request runs: wine (ubuntu) and wine (winehq-stable), 0 of
188, and semantic-tests (windows-latest), 0 of 914.

Pull requests now skip them; pushes to main and workflow_dispatch still
run them. Pull requests keep the native Windows build, its CTest run and
the runtime-windows artifact testers download.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kapitche

Copy link
Copy Markdown
Contributor

Tested bba1bfe merged with main 3eb4410 on WSL2 Ubuntu, Python 3.12.16: pass (workflow and docs change, so a code read plus the repo checks that read the workflows; I cannot run GitHub Actions here and had no YAML linter available).

  • The tests that read .github/workflows pass on the PR: tests/test_ci_registration.py 11 OK, tests/test_runtime_paths.py 5 OK, tests/test_runner_calls_all_tests.py 3 OK, tests/test_cmake_vulkan_missing.py 5 OK; tests/test_ci_registration.py and tests/test_runtime_paths.py also pass on main, so there is no negative control for them.
  • Read: in ci.yml the matrix os becomes fromJSON(github.event_name == 'pull_request' && '["ubuntu-latest"]' || '["windows-latest", "ubuntu-latest"]'), which is the usual conditional-matrix form; in runtime.yml the only new if: is github.event_name != 'pull_request' on wine (which needs: windows; no other job needs wine), and the windows and linux-gpu-tools jobs are untouched. The README sentence now matches the workflow. One thing for the maintainer to decide rather than a defect: if a branch-protection rule requires the Windows ci.yml leg or the wine check by name, those would no longer report on pull requests.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants