From 983f053d99f319266526a8fcfb66c5caf8845066 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 21 Mar 2026 17:27:12 +0100 Subject: [PATCH 1/7] Remove redundant soc from name --- .github/workflows/desktop-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 02c3f7aec..332005452 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -357,8 +357,8 @@ jobs: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} with: path: ${{env.CCACHE_DIR}} - key: ccache-${{matrix.runner}}-${{matrix.soc}}-${{matrix.type}}-${{env.BRANCH_NAME}} - restore-keys: ccache-${{matrix.runner}}-${{matrix.soc}}-${{matrix.type}}- + key: ccache-${{matrix.os}}${{matrix.target}}${{matrix.soc == 'Intel' && '_Intel' || ''}}-${{matrix.type}}-${{env.BRANCH_NAME}} + restore-keys: ccache-${{matrix.os}}${{matrix.target}}${{matrix.soc == 'Intel' && '_Intel' || ''}}-${{matrix.type}}- - name: Install aqtinstall run: pipx install aqtinstall From d3cfe6e64b7de5040983aa51e2ef3cf2257613b6 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 21 Mar 2026 18:11:03 +0100 Subject: [PATCH 2/7] namings --- .github/workflows/desktop-build.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 332005452..d124dc799 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -369,18 +369,18 @@ jobs: shell: bash run: .ci/resolve_latest_aqt_qt_version.sh "${{matrix.qt_version}}" - - name: Restore thin Qt ${{ steps.resolve_qt_version.outputs.version }} libraries (${{ matrix.soc }} macOS) + - name: Restore thin Qt ${{ steps.resolve_qt_version.outputs.version }} libraries (macOS${{matrix.soc == 'Intel' && ', Intel' || ''}}) if: matrix.os == 'macOS' - id: restore_qt + id: qt_restore uses: actions/cache/restore@v5 with: path: ${{ github.workspace }}/Qt - key: thin-qt-macos-${{ matrix.soc }}-${{ steps.resolve_qt_version.outputs.version }} + key: Qt-${{ steps.resolve_qt_version.outputs.version }}-thin-${{matrix.os}}${{matrix.soc == 'Intel' && '_Intel' || '_Apple'}} # Using jurplel/install-qt-action to install Qt without using brew # qt build using vcpkg either just fails or takes too long to build - - name: Install fat Qt ${{ steps.resolve_qt_version.outputs.version }} (${{ matrix.soc }} macOS) - if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true' + - name: Install fat Qt ${{ steps.resolve_qt_version.outputs.version }} (macOS${{matrix.soc == 'Intel' && ', Intel' || ''}}) + if: matrix.os == 'macOS' && steps.qt_restore.outputs.cache-hit != 'true' uses: jurplel/install-qt-action@v4 with: version: ${{ steps.resolve_qt_version.outputs.version }} @@ -389,16 +389,16 @@ jobs: cache: false dir: ${{github.workspace}} - - name: Thin Qt libraries (${{ matrix.soc }} macOS) - if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true' + - name: Thin Qt libraries (macOS${{matrix.soc == 'Intel' && ', Intel' || ''}}) + if: matrix.os == 'macOS' && steps.qt_restore.outputs.cache-hit != 'true' run: .ci/thin_macos_qtlib.sh - - name: Cache thin Qt libraries (${{ matrix.soc }} macOS) - if: matrix.os == 'macOS' && steps.restore_qt.outputs.cache-hit != 'true' + - name: Cache thin Qt libraries (macOS${{matrix.soc == 'Intel' && ', Intel' || ''}}) + if: matrix.os == 'macOS' && steps.qt_restore.outputs.cache-hit != 'true' uses: actions/cache/save@v5 with: path: ${{ github.workspace }}/Qt - key: thin-qt-macos-${{ matrix.soc }}-${{ steps.resolve_qt_version.outputs.version }} + key: ${{ steps.qt_restore.outputs.cache-primary-key }} - name: Install Qt ${{matrix.qt_version}} (Windows) if: matrix.os == 'Windows' From 6e923a4ac5f25a87fdec5a6f27fce41b09e2504e Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 21 Mar 2026 18:19:47 +0100 Subject: [PATCH 3/7] qt cache name --- .github/workflows/desktop-build.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index d124dc799..b318674a1 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -375,10 +375,10 @@ jobs: uses: actions/cache/restore@v5 with: path: ${{ github.workspace }}/Qt - key: Qt-${{ steps.resolve_qt_version.outputs.version }}-thin-${{matrix.os}}${{matrix.soc == 'Intel' && '_Intel' || '_Apple'}} + key: qt-${{matrix.os}}${{matrix.soc == 'Intel' && '_Intel' || '_Apple'}}-${{ steps.resolve_qt_version.outputs.version }}-thin # Using jurplel/install-qt-action to install Qt without using brew - # qt build using vcpkg either just fails or takes too long to build + # Qt build using vcpkg either just fails or takes too long to build - name: Install fat Qt ${{ steps.resolve_qt_version.outputs.version }} (macOS${{matrix.soc == 'Intel' && ', Intel' || ''}}) if: matrix.os == 'macOS' && steps.qt_restore.outputs.cache-hit != 'true' uses: jurplel/install-qt-action@v4 @@ -408,6 +408,7 @@ jobs: arch: ${{matrix.qt_arch}} modules: ${{matrix.qt_modules}} cache: true + cache-key-prefix: qt - name: Install NSIS if: matrix.os == 'Windows' From 33d34004c6764febc421373fa817edd6b973b4b7 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 21 Mar 2026 18:38:53 +0100 Subject: [PATCH 4/7] vcpkg cache name --- .github/workflows/desktop-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index b318674a1..87b12bf6a 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -420,6 +420,7 @@ jobs: uses: TAServers/vcpkg-cache@v3 with: token: ${{ secrets.GITHUB_TOKEN }} + prefix: vcpkg- # uses environment variables, see compile.sh for more details - name: Build Cockatrice From a5a7d5023da0dac969a9074ee2f3aaa14c182308 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 21 Mar 2026 23:23:10 +0100 Subject: [PATCH 5/7] Only save docker cache from master --- .github/workflows/docker-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 2a4aab1ea..a560fe7c1 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -64,4 +64,4 @@ jobs: labels: ${{ steps.metadata.outputs.labels }} annotations: ${{ steps.metadata.outputs.annotations }} cache-from: type=gha,scope=servatrice - cache-to: type=gha,mode=max,scope=servatrice + cache-to: ${{ github.ref == 'refs/heads/master' && 'type=gha,mode=max,scope=servatrice' || '' }} From de508ba9ac51e77463d988444d47b32746712fa4 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 21 Mar 2026 23:53:58 +0100 Subject: [PATCH 6/7] Only save Qt caches from master --- .github/workflows/desktop-build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 87b12bf6a..4b4f74bfd 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -394,7 +394,7 @@ jobs: run: .ci/thin_macos_qtlib.sh - name: Cache thin Qt libraries (macOS${{matrix.soc == 'Intel' && ', Intel' || ''}}) - if: matrix.os == 'macOS' && steps.qt_restore.outputs.cache-hit != 'true' + if: matrix.os == 'macOS' && steps.qt_restore.outputs.cache-hit != 'true' && github.ref == 'refs/heads/master' uses: actions/cache/save@v5 with: path: ${{ github.workspace }}/Qt @@ -407,7 +407,7 @@ jobs: version: ${{ steps.resolve_qt_version.outputs.version }} arch: ${{matrix.qt_arch}} modules: ${{matrix.qt_modules}} - cache: true + cache: ${{ github.ref == 'refs/heads/master' }} cache-key-prefix: qt - name: Install NSIS From afa881d029b1f26bb45bac5c0dae7c978f61ec49 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sun, 22 Mar 2026 11:15:16 +0100 Subject: [PATCH 7/7] Only save vcpkg caches from master --- .github/workflows/desktop-build.yml | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 4b4f74bfd..fbf7a2214 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -427,20 +427,21 @@ jobs: id: build shell: bash env: - BUILDTYPE: '${{matrix.type}}' - MAKE_PACKAGE: '${{matrix.make_package}}' - PACKAGE_SUFFIX: '${{matrix.package_suffix}}' - CMAKE_GENERATOR: ${{matrix.cmake_generator}} - CMAKE_GENERATOR_PLATFORM: ${{matrix.cmake_generator_platform}} - USE_CCACHE: ${{matrix.use_ccache}} - VCPKG_DISABLE_METRICS: 1 - VCPKG_BINARY_SOURCES: 'clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite' + BUILDTYPE: ${{ matrix.type }} + MAKE_PACKAGE: ${{ matrix.make_package }} + PACKAGE_SUFFIX: ${{ matrix.package_suffix }} + CMAKE_GENERATOR: ${{ matrix.cmake_generator }} + CMAKE_GENERATOR_PLATFORM: ${{ matrix.cmake_generator_platform }} + USE_CCACHE: ${{ matrix.use_ccache }} + VCPKG_DISABLE_METRICS: true + VCPKG_FEATURE_FLAGS: "binarycaching" + VCPKG_BINARY_SOURCES: "clear;files,${{ steps.vcpkg-cache.outputs.path }},${{ github.ref == 'refs/heads/master' && 'readwrite' || 'read' }}" # macOS-specific environment variables, will be ignored on Windows MACOS_CERTIFICATE: ${{ secrets.PROD_MACOS_CERTIFICATE }} MACOS_CERTIFICATE_PWD: ${{ secrets.PROD_MACOS_CERTIFICATE_PWD }} MACOS_CERTIFICATE_NAME: ${{ secrets.PROD_MACOS_CERTIFICATE_NAME }} MACOS_CI_KEYCHAIN_PWD: ${{ secrets.PROD_MACOS_CI_KEYCHAIN_PWD }} - DEVELOPER_DIR: '/Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer' + DEVELOPER_DIR: "/Applications/Xcode_${{matrix.xcode}}.app/Contents/Developer" TARGET_MACOS_VERSION: ${{ matrix.override_target }} run: .ci/compile.sh --server --test --vcpkg