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>
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>
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>
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>
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>
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>
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>