Commit Graph
11 Commits
Author SHA1 Message Date
Andrei Gherzan 67d7736ed4 ci: cancel superseded runs with native concurrency groups
cancel-redundant-workflows.yml had some overhead as it was spawning an extra
workflow_run job per workflow. With concurrency groups, a new push cancels the
PR's previous run directly.

A cancelled step can leave its docker container running against the shared
sstate.  Label containers with the runner name and remove them in the cleanup
step. Rename docker-prune-images to docker-cleanup accordingly.

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2026-10-19 04:47:47 +01:00
Andrei Gherzan df3c09e34c ci: reuse docker images across jobs
We were rebuilding Docker images from scratch with --no-cache, tagged by PR
number. With this, we were building multiple images per PR for the same
context.

This change tags the images by the git tree hash of the build context and only
build if the tag is missing. This naturally covers rebuilding on build context
changes.

Finally, this change handles refreshing images every 7 days (for example to
refresh OS packages) and prune by CI label after 14 days. The gap ensures an
image a running job just picked up isn't pruned under it.

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2026-10-19 04:47:45 +01:00
Andrei Gherzan 26ddb68f93 ci: don't persist the checkout token
Nothing after checkout should need the GITHUB_TOKEN so persisting would only be
an extra risk.

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2026-10-19 04:47:44 +01:00
Andrei Gherzan b4dd0415ce ci: pin third-party actions to commit SHAs
Bump actions/checkout from v3 to v7.0.1, as v3 runs on the deprecated node16
runtime. Bump fsfe/reuse-action from v1 to v6.0.0.

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2026-10-19 04:47:43 +01:00
Andrei Gherzan 3efe6589e8 ci: replace tj-actions/changed-files with a local action
Drop the dependency on tj-actions/changed-files and replace it with a local
composite action. Especially given it was compromised in the past - see
CVE-2025-30066.

The action diffs HEAD^1..HEAD of the PR merge commit that actions/checkout
checks out by default. It fails if HEAD is not a merge commit, so a change to
the checkout ref can't silently diff the wrong range.

With this in place, both of the workflows can share a consistent list of paths.

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2026-10-19 04:47:42 +01:00
Andrei Gherzan c29bfe6e74 ci: split machine coverage in tiers
Full builds of 16 machines run serially on one runner and take 5-17h per PR.
Most of them share tune, defconfig and DTBs with another machine.

Build rpi-test-image only for raspberrypi0-wifi, raspberrypi-armv7,
raspberrypi-armv8, raspberrypi3-64, raspberrypi4-64 and raspberrypi5, which
together cover every tune, defconfig and kernel recipe.

Run yocto-check-layer with every machine in conf/machine. Its BSP machine
tests were skipped until now as no machines were passed. The machines are
listed from the layer, so new ones are checked without workflow changes.

Also trigger yocto-layer.yml on changes to itself.

Fixes #1633

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2026-10-19 04:47:41 +01:00
Leon Anavi 2aa34651a7 .github/workflows: Disable apparmor
Add --security-opt apparmor=unconfined to docker cmdline.

Suggested-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
2025-05-09 08:35:55 -07:00
Andrei Gherzan 150d442a9b ci: Bump actions/checkout to v3
This addresses warnings like:

Node.js 12 actions are deprecated. [...] Please update the following
actions to use Node.js 16: actions/checkout, actions/checkout

Signed-off-by: Andrei Gherzan <andrei@gherzan.com>
2022-11-08 08:21:47 +00:00
Zygmunt Krynicki fc5f80a47e ci: fix apparent typo in file patterns
Signed-off-by: Zygmunt Krynicki <me@zygoon.pl>
2022-10-11 18:58:35 +01:00
Andrei Gherzan 70191d3c87 ci: Don't run yocto builds on PRs that don't affect them
Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-07-30 03:46:42 +01:00
Andrei Gherzan 218635ea9e ci: Introduce workflow Yocto operations/builds
We include a workflow for checking yocto compliance using the poky
provided script and also a matrix workflow for building the CI supported
build configurations.

Signed-off-by: Andrei Gherzan <andrei.gherzan@huawei.com>
2022-02-19 09:27:59 +00:00