diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index f99c91abb..021bf9e81 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -153,10 +153,10 @@ jobs: continue-on-error: ${{matrix.allow-failure == 'yes'}} env: NAME: ${{matrix.distro}}${{matrix.version}} - CACHE: ${{github.workspace}}/.cache/${{matrix.distro}}${{matrix.version}} # directory for caching docker image and ccache + CACHE_DIR: ${{github.workspace}}/.cache/${{matrix.distro}}${{matrix.version}} # directory for caching docker image and ccache # Cache size over the entire repo is 10Gi: # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy - CCACHE_SIZE: 500M + CCACHE_SIZE: 550M CMAKE_GENERATOR: 'Ninja' steps: @@ -169,7 +169,7 @@ jobs: env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} with: - path: ${{env.CACHE}} + path: ${{env.CACHE_DIR}} key: ccache-${{matrix.distro}}${{matrix.version}}-${{env.BRANCH_NAME}} restore-keys: ccache-${{matrix.distro}}${{matrix.version}}- @@ -202,18 +202,18 @@ jobs: --ccache "$CCACHE_SIZE" $NO_CLIENT .ci/name_build.sh - # Delete used cache to emulate a cache update. See https://github.com/actions/cache/issues/342. - - name: Delete old compiler cache (ccache) - if: github.ref == 'refs/heads/master' && steps.ccache_restore.outputs.cache-hit && steps.build.outcome == 'success' + # Delete used cache to emulate a ccache update. See https://github.com/actions/cache/issues/342. + - name: Delete remote compiler cache (ccache) + if: github.ref == 'refs/heads/master' && steps.ccache_restore.outputs.cache-hit env: GH_TOKEN: ${{ github.token }} run: gh cache delete --repo ${{ github.repository }} ${{ steps.ccache_restore.outputs.cache-primary-key }} - - name: Save compiler cache (ccache) + - name: Save updated compiler cache (ccache) if: github.ref == 'refs/heads/master' uses: actions/cache/save@v5 with: - path: ${{env.CACHE}} + path: ${{env.CACHE_DIR}} key: ${{ steps.ccache_restore.outputs.cache-primary-key }} - name: Upload artifact @@ -330,7 +330,7 @@ jobs: CCACHE_DIR: ${{github.workspace}}/.cache/ # Cache size over the entire repo is 10Gi: # https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#usage-limits-and-eviction-policy - CCACHE_SIZE: 500M + CCACHE_SIZE: 550M steps: - name: Checkout @@ -445,21 +445,19 @@ jobs: TARGET_MACOS_VERSION: ${{ matrix.override_target }} run: .ci/compile.sh --server --test --vcpkg - # Delete used cache to emulate a cache update. See https://github.com/actions/cache/issues/342. - - name: Delete old compiler cache (ccache) - if: github.ref == 'refs/heads/master' && matrix.use_ccache == 1 && steps.ccache_restore.outputs.cache-hit && steps.build.outcome == 'success' + # Delete used cache to emulate a ccache update. See https://github.com/actions/cache/issues/342. + - name: Delete remote compiler cache (ccache) + if: github.ref == 'refs/heads/master' && matrix.use_ccache == 1 && steps.ccache_restore.outputs.cache-hit env: GH_TOKEN: ${{ github.token }} run: gh cache delete --repo ${{ github.repository }} ${{ steps.ccache_restore.outputs.cache-primary-key }} - - name: Save compiler cache (ccache) + - name: Save updated compiler cache (ccache) if: github.ref == 'refs/heads/master' && matrix.use_ccache == 1 uses: actions/cache/save@v5 - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} with: path: ${{env.CCACHE_DIR}} - key: ccache-${{matrix.runner}}-${{matrix.soc}}-${{matrix.type}}-${{env.BRANCH_NAME}} + key: ${{ steps.ccache_restore.outputs.cache-primary-key }} - name: Sign app bundle if: matrix.os == 'macOS' && matrix.make_package && needs.configure.outputs.tag != null