Skip to content

ci: build, test and boot the kernel in GitHub Actions - #160

Merged
chriskearney merged 4 commits into
integration/aurorafrom
ci/kernel-ci
Oct 20, 2026
Merged

chriskearney merged 4 commits into
integration/aurorafrom
ci/kernel-ci

Conversation

@chriskearney

@chriskearney chriskearney commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Until now, nothing built or tested a change to integration/aurora before it merged; problems showed up only when someone moved the omarchy-pkgs pin. This adds CI that runs entirely on free GitHub-hosted runners, plus the two fixes its first runs found.

What runs, and what it costs

When Jobs Time Cost
Every push to a PR commits (Signed-off-by, checkpatch, UAPI warning), compile (W=1 at every commit, new warnings only), device trees, host tests (137 suites from tools/), CI self-test ~8 min free
ci:build label on a PR all of the above, plus the package built with omarchy-pkgs' own recipe and compared with the target branch, KUnit (1,399 Apple driver tests), and a VM boot loading all 1,917 modules ~47 min free
After each merge reuses the build if one exists, else builds; attaches signed provenance to the packages ~5–47 min free
Nightly full rebuild, to catch packaging drift (as it did today) ~47 min free

Builds never run on every push. Optionally, setting the KERNEL_CI_RUNNER repository variable moves the package build and KUnit to omarchy-pkgs' Namespace runner: ~12 min instead of ~45, at Namespace's cost. No code change is needed.

How each job works, and how to run it locally: tools/aurora-ci/README.rst.

Two fixes in this PR, found by the CI

tools: linux/types.h: Add 128-bit integer types for arm64 UAPI structures is a backport of upstream 10a47fb.

Arch Linux ARM moved to linux-api-headers 7.3 today. Its arm64 ptrace.h uses __u128, which this tree's tools/include lacks, so every 7.2 build in a current builder now fails. omarchy-pkgs' next linux-aurora build is one of them:

/usr/include/asm/ptrace.h:96:2: error: unknown type name '__u128'
make[3]: *** [Makefile:77: bpf/resolve_btfids] Error 2

It fails without the fix (run) and passes with it (run). Only host tools change.

aurora-sep: count boot.bin device trees with bash 5.2 too

The M3 report reads grep -ob lines whose match bytes aren't valid UTF-8. On bash 5.2 (Ubuntu) it reads none of them and reports 0 device trees; Arch's bash 5.3 doesn't hit this. 5 report tests fail without the fix (run) and all 7 pass with it (run).

Testing

Everything ran first in a scratch copy of this tree, iconidentify/linux-aurora-ci-sandbox.

  • Every job green, KUnit and boot included (run). This PR's own checks are green here.

  • Builds what ships. CI's package of 1b4997b matches omarchy-pkgs' edge build of the same commit: same config, all 115 DTBs byte for byte, the same 1,917 modules.

  • No double work. A CI-only change reused the previous build. The push after a merge skipped KUnit and boot because that build had already passed them, then attested the packages (run); gh attestation verify accepts them.

  • Each fault fails the right job:

    PR Fault Caught by
    #2 compile error compile, at the commit and line
    #3 Type-C mux fix undone KUnit, the two cases usb: typec: mux: pass over a mux inside an unavailable node #126 added
    #4 brcmfmac scan timeout regressed host tests
    #5 DTS syntax error device trees, at the line
    #6 new W=1 warning compile, as an annotation (advisory)
    #7 WARN() during boot boot (warning, taint W), and KUnit
    #8 t8103-j293.dtb no longer built package: "Macs that boot it would be stranded"
    #9 no Signed-off-by commits
    #10 a comment nothing: all green, package identical to the base

Later, optional (admin)

Nothing above needs an admin; the ci:build label exists. One ruleset change would make the checks mandatory and move the full build to before each merge: in Settings → Rules → integration/aurora protection, require the ci / result check and turn on the merge queue with merge method "merge commit". Until then the checks report but don't block, and the build after each merge catches problems about an hour after they land.

🤖 Generated with Claude Code

…ures

The arm64 UAPI exposes some 128-bit integer types to represent things
such as fpsimd registers in the sigcontext. In preparation for defining
these using the '__u128' typedef implemented by uapi/linux/types.h, copy
that typedef over to the private linux/types.h header used by the tools
directory.

Cc: Arnd Bergmann <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: David Matlack <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
(cherry picked from commit 10a47fb)
[Chris Kearney: Arch Linux ARM's linux-api-headers 7.3 ships the arm64
 asm/ptrace.h that declares its 128-bit members as __u128 (upstream
 d4bf9e0). resolve_btfids builds libbpf against the system headers,
 so without this typedef the kernel no longer builds there.]
Signed-off-by: Chris Kearney <[email protected]>
chriskearney and others added 3 commits October 20, 2026 08:31
m3_report_boot_dt() finds the device trees in m1n1's boot.bin by their
magic with grep -ob, and read each "offset:match" line. The match is the
magic's bytes, which are not valid UTF-8, and bash 5.2's read returns
nothing for such a line in a UTF-8 locale: the report then says
"device trees in boot.bin: 0" on any system with bash 5.2 (Ubuntu 24.04,
for one), and the M3 report tests fail there. Arch's bash 5.3 reads the
lines, which is why the tests pass on Omarchy.

Keep only the offsets before read sees them.

Signed-off-by: Chris Kearney <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Nothing builds or tests a change to this tree before it merges: the
kernel is first built when omarchy-pkgs moves its pin. Add the tools a CI
needs, as standard-library Python under tools/aurora-ci, each of which
also runs by hand:

- plan.py, lookup-build.py and result.py decide what a run does, name a
  build by its inputs (the kernel tree without the CI, plus the trees of
  the omarchy-pkgs parts that package it) so that no build or test runs
  twice, and turn the jobs' results into one required check.
- prepare-recipe.py points omarchy-pkgs' own linux-aurora recipe at the
  commit under test by changing three lines. inspect-package.py checks
  what installs rely on, and compare-packages.py diffs the packages with
  the target branch's; a device tree that stops being built fails.
- boot-test.py boots the packaged kernel in QEMU and loads every module
  it ships, failing on any crash, warning or unexpected load failure.
- run-kunit.py builds every Apple, Asahi and Aurora KUnit suite into one
  kernel and compares cases and in-case kernel warnings with
  kunit-expected.json.
- host-tests.py runs the hermetic suites listed in host-tests.json.
- check-commits.py, compile-check.py and dt-check.py check a pull
  request's commits, its compile (W=1, at every commit) and its device
  trees, reporting only the problems the change adds.

README.rst describes the jobs and how to run each tool; the unit tests
in tests/ cover every tool.

Signed-off-by: Chris Kearney <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Run the tools in tools/aurora-ci from GitHub Actions.

Every push to a pull request gets the checks that cost nothing on
GitHub-hosted runners: commit hygiene, a W=1 compile of every commit,
device tree checks, the host test suites and the CI's own tests. The
kernel package is built with omarchy-pkgs' recipe and builder, KUnit
runs and the package boots in the merge queue, or earlier when a
maintainer applies the ci:build label. The push after a merge reuses the
queue's build and attests the packages, and a nightly run rebuilds when
omarchy-pkgs changes how the kernel is packaged.

The package and KUnit jobs run on GitHub's arm64 runner unless the
KERNEL_CI_RUNNER repository variable names another one.

Let .gitignore track .github/, which its rule for dot files ignored.

Signed-off-by: Chris Kearney <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chriskearney chriskearney added the ci:build Build, test and boot the kernel for this PR now label Oct 20, 2026
@chriskearney
chriskearney merged commit 34c7dfe into integration/aurora Oct 20, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:build Build, test and boot the kernel for this PR now

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants