From d9fadfdb7c1b352292bf3b2ec34fcfb18c61e54e Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Fri, 28 Aug 2026 09:33:16 -0600 Subject: [PATCH] ci(cache): seed release caches from pre-release cx --- .github/workflows/build-qt-linux.yml | 8 ++++---- .github/workflows/qt-gate-windows.yml | 6 +++--- .github/workflows/release-macos.yml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-qt-linux.yml b/.github/workflows/build-qt-linux.yml index abd1f1006..8948da366 100644 --- a/.github/workflows/build-qt-linux.yml +++ b/.github/workflows/build-qt-linux.yml @@ -126,16 +126,16 @@ jobs: uses: dtolnay/rust-toolchain@stable # Cache key split by toolchain/profile and NEVER shared with the old - # `slint-*` keys. Only main writes the cache (it is what serves tag - # runs); nothing here runs from pre-release — that branch triggers - # test-crates.yml and nothing else. + # `slint-*` keys. Trusted manual preflights on pre-release may seed it, + # so release-linux -> Flatpak/Snap and ARM -> Snap do not rebuild the + # identical graph from zero. PR/fork refs remain read-only. - name: Rust cache uses: Swatinem/rust-cache@v2 with: workspaces: crates -> target shared-key: qt-linux-${{ inputs.arch }} cache-on-failure: true - save-if: ${{ github.ref == 'refs/heads/main' }} + save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/pre-release' }} # NEVER `-p qbz`: crates/qbz (the frozen Slint binary) declares the same # bin name in the same target dir and would silently win the file. diff --git a/.github/workflows/qt-gate-windows.yml b/.github/workflows/qt-gate-windows.yml index 4b903004c..55f0633b1 100644 --- a/.github/workflows/qt-gate-windows.yml +++ b/.github/workflows/qt-gate-windows.yml @@ -116,9 +116,9 @@ jobs: workspaces: crates -> target shared-key: qt-gate-windows cache-on-failure: true - # Tag runs are the ones worth seeding the cache from; a manual - # dispatch of a work-in-progress ref should read it, not rewrite it. - save-if: ${{ startsWith(github.ref, 'refs/tags/v') }} + # Tags and the trusted integration branch may seed the cache. A + # manual dispatch on any feature/fork ref remains read-only. + save-if: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/pre-release' }} # QML is not compile-checked. A bad type name or property is a grey # screen at runtime, not an error here, so this runs FIRST: it is the diff --git a/.github/workflows/release-macos.yml b/.github/workflows/release-macos.yml index c2fd346db..64f7efc5f 100644 --- a/.github/workflows/release-macos.yml +++ b/.github/workflows/release-macos.yml @@ -133,7 +133,7 @@ jobs: workspaces: crates -> target shared-key: qt-macos-${{ matrix.target }} cache-on-failure: true - save-if: ${{ github.ref == 'refs/heads/main' }} + save-if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/pre-release' }} # NEVER `-p qbz` (the frozen Slint binary shares the bin name). - name: Build (release)