From 314a23ef527ee56c230f98352c6e85b484140cb6 Mon Sep 17 00:00:00 2001 From: Xenolphthalein <21215869+Xenolphthalein@users.noreply.github.com> Date: Wed, 25 Nov 2026 13:31:32 +0100 Subject: [PATCH] ci: a headset's ccache falls back to the caches of the other headsets on its SoC's layer, so that a new one's first build starts from theirs (the default branch's for the PICO 4's SoC) --- .github/workflows/build.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48e34a67c06a..0a03a817a77c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -243,14 +243,30 @@ jobs: uv run python -m overpressure container pull # A check build compiles through ccache (build-tree.sh's CCACHE_DIR), whose objects carry over from the # newest cache this run may read: its own branch's, its base's, the default branch's. A tag's two - # builds start clean: they are the test that the kernel is reproducible. + # builds start clean: they are the test that the kernel is reproducible. A headset's own cache comes + # first. A new headset, which has none yet, starts from the cache of another headset on its SoC's layer + # (.github/layers) that the run may read, such as the default branch's: the same compiler and paths, so + # every file both configurations compile alike is a hit. The build's ccache statistics show how many. + - name: The headsets on its SoC + id: caches + if: steps.key.outputs.name && steps.earlier.outputs.found != 'true' && github.ref_type != 'tag' + env: + BRANCH: ${{ matrix.headset.branch }} + run: | + soc=$(awk -v b="$BRANCH" '!/^#/ && $2 == b {print $1}' .ci/.github/layers) + { + echo "keys<