fix(packaging): keep the per-commit version out of every module's cache key
flatpak-builder printed "Building module llvm" on every CI run instead of "Cache hit". The build environment, CRAFTER_BUILD_VERSION included, sat in the manifest's top-level build options, and those are part of every module's cache key; the version changes with each commit, so no module ever hit. Runs still took twelve minutes rather than eighty only because ccache made the LLVM rebuild cheap. The variables only matter to crafter-build's own module, so they move there, and CI rewrites the version on that module. LLVM, the WASI sysroot and wasmtime are now keyed on nothing that changes between commits. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
parent
c7f984b95d
commit
adc91ed9e2
2 changed files with 13 additions and 10 deletions
|
|
@ -99,7 +99,7 @@ jobs:
|
|||
VERSION: ${{ steps.meta.outputs.version }}
|
||||
run: |
|
||||
set -eu
|
||||
yq '."build-options".env.CRAFTER_BUILD_VERSION = strenv(VERSION)' "$MANIFEST" > "$CI_MANIFEST"
|
||||
yq '(.modules[] | select(.name == "crafter-build") | ."build-options".env.CRAFTER_BUILD_VERSION) = strenv(VERSION)' "$MANIFEST" > "$CI_MANIFEST"
|
||||
grep -n 'CRAFTER_BUILD_VERSION' "$CI_MANIFEST"
|
||||
flatpak-builder --force-clean --ccache --disable-rofiles-fuse \
|
||||
--state-dir=/root/.cache/flatpak-builder \
|
||||
|
|
|
|||
Loading…
Reference in a new issue