diff --git a/.forgejo/workflows/ci.yaml b/.forgejo/workflows/ci.yaml index daaafd6..0c5d79a 100644 --- a/.forgejo/workflows/ci.yaml +++ b/.forgejo/workflows/ci.yaml @@ -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 \ diff --git a/packaging/flatpak/net.catcrafts.CrafterBuild.yaml b/packaging/flatpak/net.catcrafts.CrafterBuild.yaml index a8b769a..9eeb64f 100644 --- a/packaging/flatpak/net.catcrafts.CrafterBuild.yaml +++ b/packaging/flatpak/net.catcrafts.CrafterBuild.yaml @@ -28,15 +28,6 @@ finish-args: # gdb and friends from the Sdk - --allow=devel - --env=PATH=/app/bin:/usr/bin -build-options: - env: - CRAFTER_BUILD_LLVM_DIR: /app - # The shipped binary runs on any x86_64 from the last decade; user - # projects still build with -march=native by default. - CRAFTER_BUILD_MARCH: x86-64-v2 - CRAFTER_BUILD_MTUNE: generic - # CI replaces this with the tag; a local build is a development build. - CRAFTER_BUILD_VERSION: 0.0.0-dev cleanup: - /share/man - /share/doc @@ -188,6 +179,18 @@ modules: # (sibling repos tracking their default branch, see AGENTS.md). build-args: - --share=network + # On this module, not at the top of the manifest: top-level build + # options are part of every module's cache key, and the version changes + # with every commit, which made flatpak-builder rebuild LLVM each run. + env: + CRAFTER_BUILD_LLVM_DIR: /app + # The shipped binary runs on any x86_64 from the last decade; user + # projects still build with -march=native by default. + CRAFTER_BUILD_MARCH: x86-64-v2 + CRAFTER_BUILD_MTUNE: generic + # CI replaces this with the version; a local build is a development + # build. + CRAFTER_BUILD_VERSION: 0.0.0-dev build-commands: # Bootstrap by hand, then let the result build itself: only the # self-hosted binary has asset support and ThinLTO.