Skip to content

Expose versions.json as Github Actions test matrix - #96

Merged
ti-mo merged 10 commits into
mainfrom
tb/expose-matrix
Sep 29, 2026
Merged

ti-mo merged 10 commits into
mainfrom
tb/expose-matrix

Conversation

@ti-mo

@ti-mo ti-mo commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Since I'd like to start using ci-kernels for other projects, and I know some folks in the community (inspektor, elastic, ..) have been relying on these for a few years, this is my proposal for making the whole experience a little more user-friendly. This includes a GHA workflow for driving a vimto test matrix.

  • PR builds now push content-addressed candidate images; merging just retags them, so images are testable before merge and main builds finish in seconds
  • New matrix action lets other repos drive vimto test matrices from versions.json, filterable by channel
  • Repo is tagged (v7, v7.3, v7.3.<ts>) so callers can pin and let Dependabot track updates
  • Selftests build failures no longer block version bumps; -selftests tags may trail and failures are surfaced in the CI summary
  • README documents supported versions (auto-generated table), image variants and matrix usage
  • Internals: build inputs, toolchain and operator scripts reorganized into dedicated directories; workflow logic extracted into locally runnable scripts

Large parts of this PR are AIL:4 but heavily edited and iterated on by me.

…on fields

This makes the process a little more readable and understandable. Add a
'channel' field to versions.json to be used in a follow-up commit. Rename
static_tag to image_tag since it felt a little confusing.

AIL:3

Signed-off-by: Timo Beckers <timo@isovalent.com>
When testing locally, it can be a pain to figure out where the images are
again, especially after not having touched the repo in a few months.

This change puts it front and center and makes sure it stays updated.

AIL:3

Signed-off-by: Timo Beckers <timo@isovalent.com>
Since ae9bece, build_arm64 has been true on all call sites. Make it baseline.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo
ti-mo force-pushed the tb/expose-matrix branch 4 times, most recently from b86cee1 to 758c8d4 Compare September 27, 2026 19:16
…mption

Signed-off-by: Timo Beckers <timo@isovalent.com>
Signed-off-by: Timo Beckers <timo@isovalent.com>
build-and-push was starting to show its age, and the workflow yaml was starting
to absorb a lot of logic as bash-in-yaml, which wasn't super robust. The root
directory was also getting crowded, which made it difficult to establish which
files were affecting the build output and which weren't. I ended up splitting
things into three directories:

- build/: for all files involved in the live build process: (kernel) configs,
  scripts and the Dockerfile.
- toolchain/: for building and configuring the GCC and LLVM toolchain involved
  in building kernels.
- scripts/: automation for managing versions.json and scripts invoked by GHA
  workflows.

As a result, we can now hash the contents of build/, which, paired with the
versions described in versions.json, can be used to drive an idempotent build
pipeline saving us a lot of CI and iteration time, and even allows for local
builds + pushes if necessary. The logic for making this all happen has been
extracted into local-friendly shell scripts that can be linted and run locally.

We can now make changes to scripts/ without letting CI spend an hour rebuilding
the world.

AIL:3 since I was and still am clueless about GHA.

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo
ti-mo force-pushed the tb/expose-matrix branch 2 times, most recently from a35cd75 to 0d3bb8e Compare September 27, 2026 20:04
@ti-mo
ti-mo marked this pull request as ready for review September 27, 2026 20:18
Copilot AI lite review requested due to automatic review settings September 27, 2026 20:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Critical publishing and promotion issues, plus ordering and release-tag collision issues, remain unresolved.

Review effort: Lite
Findings: 2 High severity · 1 Medium severity

Open (3)
What changed in this PR

This pull request reorganizes kernel image builds and exposes supported versions through a reusable GitHub Actions matrix.

Changes:

  • Adds generated version metadata and matrix filtering.
  • Reorganizes build, toolchain, and operational scripts.
  • Adds candidate image builds, testing, promotion, tagging, and documentation.

Review findings include unresolved publishing and promotion risks, matrix ordering and release-tag collision issues, plus a documentation typo.

File Description
versions.json Removes legacy version metadata.
update-versions.sh Replaced by the Python updater.
toolchain/​VERSION Updates the builder version.
toolchain/​Makefile Builds the toolchain.
toolchain/​llvm.pref Adds LLVM package pinning.
toolchain/​llvm.list Adds LLVM repositories.
toolchain/​llvm-snapshot.gpg.key Adds the repository signing key.
toolchain/​Dockerfile Defines the builder image.
scripts/​update-versions.py Generates version metadata and README tables.
scripts/​test-kernel.sh Adds kernel smoke testing.
scripts/​tag.sh Creates release tags; collision handling requires changes.
scripts/​promote.sh Promotes candidate images; debug candidate handling requires changes.
scripts/​image-exists.sh Checks registry manifests.
scripts/​candidate-tag.sh Generates content-addressed tags.
scripts/​buildx.sh Provides a local build helper.
README.md Documents versions, images, and matrix usage.
matrix/​versions.json Publishes supported kernel versions.
matrix/​action.yml Provides the reusable filtered matrix action.
buildx.sh Replaced by the scripts helper.
build/​README.md Documents build inputs and hashing.
build/​filter-debug.awk Extracts referenced debug sources.
build/​env.sh Configures build architecture variables.
build/​download.sh Downloads kernel sources.
build/​Dockerfile Defines kernel build stages.
build/​copy-selftests.sh Packages BPF selftests.
build/​copy-debug.sh Packages debug artifacts.
build/​configure-vmlinux.sh Merges and validates kernel configuration.
build/​config-x86_64 Adds x86-64 configuration.
build/​config-arm64 Adds ARM64 configuration.
build/​config Adds common kernel configuration.
build/​ccache.conf Configures compiler caching.
build/​build-vmlinux.sh Builds the kernel image.
build/​build-selftests.sh Builds BPF selftests.
build-selftests.sh Replaced by the build-directory helper.
.github/​workflows/​tidy.yml Updates checkout action usage.
.github/​workflows/​images.yml Uses the matrix action and release tagging.
.github/​workflows/​build-and-push.yml Adds candidate builds and promotion; PR publishing permissions require changes.
.github/​dependabot.yml Enables GitHub Actions dependency updates.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/build-and-push.yml
Comment thread scripts/promote.sh
Comment thread scripts/tag.sh
Signed-off-by: Timo Beckers <timo@isovalent.com>
Signed-off-by: Timo Beckers <timo@isovalent.com>
GHA's warnings about Node 20 deprecations were piling up and cluttering our
build summaries.

Signed-off-by: Timo Beckers <timo@isovalent.com>
To allow importers to follow along at their own pace, give the repository
tags automatically on merges to main when any changes are made to ./matrix.

Three tag tiers are maintained:

- v7.3.202609271941 as a unique, non-floating tag
- v7.3 floating tag to follow along with the current minor version
- v7 floating tag to follow along with the major version

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo
ti-mo merged commit 17815e4 into main Sep 29, 2026
11 checks passed
@ti-mo
ti-mo deleted the tb/expose-matrix branch September 29, 2026 13:36
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.

2 participants