Repository navigation
ci: apple-build-kunit: run the KUnit suites a PR touches, several per job - #3738
Merged
Merged
Conversation
… job Every push to a PR under the Apple paths started all 17 KUnit suites as 17 jobs, each building its own arm64 kernel, and include/**, Kconfig* or Makefile anywhere set that off. The display, macaudio, MT7932, pmgr-pwrstate, SEP and AOP suites ran from five more workflows. scripts/ci/apple-kunit.py now holds all 23 suites with their paths. A "KUnit plan" job reads the PR's merge commit (HEAD^1..HEAD) and picks: the suites whose paths the PR touches; for a header no entry names, the suites whose sources include it (at most four), else a smoke set (dcp-topology, asahi); the smoke set for other shared code (Kconfig, Makefile, rust/, arm64, kernel/, mm/, lib/, the KUnit tooling). DT, docs and other workflows' files pick nothing. Selected suites run in order in one job, up to four per job, sharing one build dir. Pushes, dispatches and PRs carrying the kunit-full label still run every suite, one "KUnit <suite>" job each, which the merge train's full-matrix check reads. A dispatch can name suites. The compile job also builds drivers/pmdomain/apple, the MT7932 driver and sound/soc/apple. The run concurrency group is per PR for whichever event's jobs run, so a push supersedes the run of either event; the skipped twin and other label events get their own group and cancel nothing.
There was a problem hiding this comment.
Verdict: MERGE at d882049
Checked: scripts/ci/apple-kunit.py and the plan/matrix wiring in apple-build-kunit.yml.
- An empty plan is guarded: the KUnit job has
needs.plan.outputs.count != '0', so{"include":[]}never reachesfromJSONas a matrix. kunit-full, pushes and dispatches still get one "KUnit " job each, the names kunit_proven reads. - Dry run of
plan --fileson this head:- asahi .rs → asahi; clpc.c → clpc; sep.rs → sep; macsmc.c → macsmc
- drivers/soc/apple/Kconfig → smoke (dcp-topology asahi)
- media/apple/common → all six media suites in 2 jobs
- Documentation and dts → nothing
runcontinues past a failed suite and fails the job at the end, with a summary table.
Follow-ups (pre-existing gaps; the old 17-entry matrix had them too, so not a hold):- drivers/soc/apple/sleep.c and drivers/{net/wireless/apple/centauri,bluetooth/btcentauri}.c select no suite. Their KUnit tests (APPLE_SOC_SLEEP_KUNIT_TEST, apple-centauri-wifi) have no table entry. B1-GATES ran them by hand for #3728/#3735-3737; worth adding rows.
open(...)in--filesis never closed (cosmetic).- Merge #3739 only after this one, as its body says.
RyanTheTide
added a commit
that referenced
this pull request
Dec 1, 2026
apple-build-kunit.yml now takes its KUnit suites from scripts/ci/apple-kunit.py (#3738): the panel-notch matrix entry becomes a table row there, selected by the panel notch record, its header and the kiwi driver. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What: Per-PR KUnit selection for linux. A same-repo driver PR went from ~21 jobs (17 KUnit suites as 17 jobs, each building its own arm64 kernel, set off by include/**, any Kconfig* or Makefile) to ~6.
Supersedes the tiering in #3675 (that PR runs all suites on approval and on any shared path). The companion PR ci/b1-trim-pr-jobs-2-20261201 removes the single-suite workflows once this one is in.
Tested:
drm/asahi: advertise vertex scratch on scheduled render queues #3714 asahi+uapi 21 -> 6 (KUnit asahi); drm/asahi: g17: reuse cached queue records after a later release #3721 asahi 21 -> 6; drm/apple: audio: release idle TX DMA channel on PCM close #3712 drm/apple 22 -> 6 (KUnit dcp-fabric dcp-topology dcp-display); drm/apple: offer a firmware 27 ProMotion panel's fixed rates as paced modes #3693 drm/apple 22 -> 6; media: apple: prores: fix 1-byte shift in v1 frame header colour offsets #3713 prores 21 -> 6; iommu/apple-dart: import a locked four-level root before the core's reservations #3686 iommu/apple-dart 21 -> 6 (jpeg); accel/ane: h16: admit the 26B123 preload of the 32-core J616C #3690 ane 21 -> 6; cpufreq: apple-soc: park an idle cluster at its slowest state #3717 cpufreq + soc/apple header 22 -> 6 (smoke); soc: apple: clpc: tune T8142 idle sampling, CPU floor, and GPU busy-share ladder #3710 clpc + dts 28 -> 7; HID: apple-mtp-kiwi, drm/apple: map touches onto the picture when the notch is hidden #3722 edits this workflow 29 -> 11 (all suites, 6 jobs); arm64: dts: apple: enable manual fan control on dual-fan machines #3706 dts only 4 -> 4; Bluetooth: btcentauri: Drop the bring-up module parameters #3726 bluetooth 3 -> 3.
apple-kunit.py run "dcp-fabric dcp-topology dcp-display", LLVM=1, arm64 QEMU, one build dir, -j16 on a loaded buildbox): 117 + 210 + 180 tests pass in 230 s. The build is incremental across suites: topology took 40 s to build after display, against 100 s from clean.Risk: two-way door, CI only, no kernel change. A PR now runs only the suites its paths map to, so a break in an unselected suite shows up on the main push run (all suites) or under kunit-full. sep and aop now use the pinned Rust 1.96.0 that asahi uses, not the runner's default toolchain. Until the companion PR is in, the display/macaudio/MT7932/pmgr/SEP suites run twice on matching PRs.
Not yet: the companion PR (single-suite workflow removal, sep-source and host-tests trims). After both are in, the stale apple-drm/macaudio/mt7932/pmgr entries can come out of runner groups 3 and 4 (selected_workflows). #3722 adds a matrix entry to this file and will need a table line in apple-kunit.py instead.