ci: tiered toolchain/arch kernel build matrix (gcc+clang, x86_64+arm64) - #45
Merged
Conversation
runs-on: [self-hosted, X64] matches any X64 machine in the runner pool, including the Windows ones, so jobs occasionally landed on a Windows runner and failed. Pair self-hosted with the explicit OS label instead (ubuntu-latest for linux x86_64; the pool convention is ubuntu-latest-arm for linux arm64 and windows-latest for windows).
…/x86_64 Add a toolchain dimension (gcc, llvm) to the kernel matrix. gcc cells are today's native x86_64 build, unchanged, including the CONFIG_WERROR=y gate the x86_64 defconfig brings. llvm cells build the same kernels with LLVM=1 for ARCH=arm64 — the arch the driver actually ships on (JetHub) — which clang cross-compiles natively, so they double as the matrix's first arm64 coverage. Rationale: the recent fixes (#41-#44) all come from clang-only diagnostic classes (-Wsometimes-uninitialized, -Wuninitialized, -Wtautological-overlap-compare, -Warray-bounds with -fstrict-flex-arrays=3) that the gcc-only CI cannot see, so nothing currently guards them against regressions. The arm64 defconfig does not set CONFIG_WERROR, deliberately kept that way for now: clang warning classes stay informational in the summary tally and only the kernel's default-fatal diagnostics fail the build. Flip WERROR on in the llvm cells once the clang classes are at zero. Each toolchain gets its own kernel tree (/tmp/linux-TAG vs -llvm): the configs differ (CC_IS_CLANG, arm64) and a shared tree would rebuild from scratch every time the toolchains alternate on a cached runner. This doubles the matrix cell count and roughly doubles runner disk per tag.
The newest longterm, the newest stable release and linux-next build the full toolchain/arch square — gcc/x86_64, gcc/arm64, llvm/x86_64, llvm/arm64 — while every other maintained line keeps its single gcc/x86_64 cell: its job is catching kernel API breakage, and one toolchain covers that. A freshly released mainline (no -rc) also gets the full square for the window before its first stable point release; an -rc mainline stays in the short tier. The -Werror gate is now set explicitly instead of relying on which arch defconfig happens to carry CONFIG_WERROR: gcc cells gate (their warning classes are at zero), llvm cells stay informational until the clang-only classes reach zero too. gcc/arm64 cells cross-compile with aarch64-linux-gnu-. Kernel trees are cached per toolchain/arch combo; gcc/x86_64 keeps the historical unsuffixed path so existing caches stay warm.
The arm64 defconfig has RFKILL=m. CFG80211's dependency "RFKILL || !RFKILL" evaluates to m in tristate arithmetic, so olddefconfig capped the requested CFG80211=y (and with it MAC80211) back to =m, their exports never reached vmlinux.symvers, and modpost failed every arm64 cell with "cfg80211_* undefined". Reproduced locally: arm64 defconfig + scripts/config --enable CFG80211 + olddefconfig -> CFG80211=m; with --enable RFKILL it stays =y.
The runner now comes from the matrix cell ([self-hosted, ubuntu-latest] for x86_64, [self-hosted, ubuntu-latest-arm] for arm64), so every build is native: the arm64 vmlinux load moves off the x86_64 runners and the aarch64 cross toolchain is no longer needed — drop CROSS_COMPILE and the gcc-aarch64-linux-gnu dependency. ARCH stays explicit in the env: the driver's Makefile otherwise derives it from 'uname -m', which yields "aarch64" where kbuild expects "arm64".
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.
Tiered kernel matrix:
WERROR explicit: on in gcc cells, off in llvm cells for now. arm64 configs force RFKILL=y (tristate
RFKILL || !RFKILL= m capped CFG80211 to =m, dropping its exports from vmlinux.symvers). Runner OS labels pinned.Known-red cells (pre-existing driver breakage, fixed separately): 6.12.101+
set_monitor_channelnetdev param; linux-nextremain_on_channel/mgmt_txcookie by value.