From eb25e30f86b282fa0c4e112e5e715abac329da7e Mon Sep 17 00:00:00 2001 From: tooomm Date: Fri, 13 Mar 2026 21:48:31 +0100 Subject: [PATCH 1/8] Update desktop-build.yml --- .github/workflows/desktop-build.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 233d9e488..23be4fc14 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -324,6 +324,7 @@ jobs: # 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 + SCCACHE_GHA_ENABLED: "true" steps: - name: Checkout @@ -338,12 +339,15 @@ jobs: with: msbuild-architecture: x64 - - name: Setup ccache + - name: Setup ccache (macOS) if: matrix.use_ccache == 1 && matrix.os == 'macOS' run: brew install ccache + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.9 + - name: Restore compiler cache (ccache) - if: matrix.use_ccache == 1 + if: matrix.use_ccache == 1 && matrix.os == 'macOS' id: ccache_restore uses: actions/cache/restore@v5 env: @@ -439,7 +443,7 @@ jobs: run: .ci/compile.sh --server --test --vcpkg - name: Save compiler cache (ccache) - if: github.ref == 'refs/heads/master' && matrix.use_ccache == 1 + if: github.ref == 'refs/heads/master' && matrix.use_ccache == 1 && matrix.os == 'macOS' uses: actions/cache/save@v5 env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} From 2a076d1b095bf5b8de79d4f1c4cc24e95867af02 Mon Sep 17 00:00:00 2001 From: tooomm Date: Fri, 13 Mar 2026 21:52:27 +0100 Subject: [PATCH 2/8] Update desktop-build.yml --- .github/workflows/desktop-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 23be4fc14..4647a5f9a 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -343,7 +343,8 @@ jobs: if: matrix.use_ccache == 1 && matrix.os == 'macOS' run: brew install ccache - - name: Run sccache-cache + - name: Run sccache-cache (Windows) + if: matrix.os == 'Windows' uses: mozilla-actions/sccache-action@v0.0.9 - name: Restore compiler cache (ccache) From f441ad58c3b28d84eae26a94733cfe52f0d19153 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 14 Mar 2026 07:23:51 +0100 Subject: [PATCH 3/8] Update desktop-build.yml --- .github/workflows/desktop-build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 4647a5f9a..67340529b 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -315,6 +315,7 @@ jobs: qt_modules: qtimageformats qtmultimedia qtwebsockets cmake_generator: "Visual Studio 17 2022" cmake_generator_platform: x64 + use_sccache: 1 name: ${{matrix.os}} ${{matrix.target}}${{ matrix.soc == 'Intel' && ' Intel' || '' }}${{ matrix.type == 'Debug' && ' Debug' || '' }} needs: configure @@ -344,7 +345,7 @@ jobs: run: brew install ccache - name: Run sccache-cache (Windows) - if: matrix.os == 'Windows' + if: matrix.use_sccache == 1 && matrix.os == 'Windows' uses: mozilla-actions/sccache-action@v0.0.9 - name: Restore compiler cache (ccache) @@ -432,6 +433,7 @@ jobs: CMAKE_GENERATOR: ${{matrix.cmake_generator}} CMAKE_GENERATOR_PLATFORM: ${{matrix.cmake_generator_platform}} USE_CCACHE: ${{matrix.use_ccache}} + USE_SCCACHE: ${{matrix.use_sccache}} VCPKG_DISABLE_METRICS: 1 VCPKG_BINARY_SOURCES: 'clear;files,${{ steps.vcpkg-cache.outputs.path }},readwrite' # macOS-specific environment variables, will be ignored on Windows From 1f439a29b0def8a25e7c22eb4fa11a86de1005be Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 14 Mar 2026 07:58:48 +0100 Subject: [PATCH 4/8] Update compile.sh --- .ci/compile.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.ci/compile.sh b/.ci/compile.sh index 424527f96..427cc0438 100755 --- a/.ci/compile.sh +++ b/.ci/compile.sh @@ -134,6 +134,10 @@ if [[ $USE_CCACHE ]]; then ccache --max-size "$CCACHE_SIZE" fi fi +if [[ $USE_SCCACHE ]]; then + flags+=("-DCMAKE_C_COMPILER_LAUNCHER=sccache") + flags+=("-DCMAKE_CXX_COMPILER_LAUNCHER=sccache") +fi if [[ $PACKAGE_TYPE ]]; then flags+=("-DCPACK_GENERATOR=$PACKAGE_TYPE") fi From d869598aaa2bb8567250a1d7c9b1d1cbbdb3ad33 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 14 Mar 2026 12:27:03 +0100 Subject: [PATCH 5/8] Update desktop-build.yml --- .github/workflows/desktop-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 67340529b..4245b95e5 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -325,7 +325,7 @@ jobs: # 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 - SCCACHE_GHA_ENABLED: "true" + SCCACHE_GHA_ENABLED: true steps: - name: Checkout From 80cc2ba87af9a710313405a6f79f5cb568fc63dc Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 14 Mar 2026 13:01:59 +0100 Subject: [PATCH 6/8] Update desktop-build.yml --- .github/workflows/desktop-build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 4245b95e5..14ff8a6be 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -340,15 +340,15 @@ jobs: with: msbuild-architecture: x64 + - name: Run sccache-cache (Windows, sccache) + if: matrix.use_sccache == 1 && matrix.os == 'Windows' + uses: mozilla-actions/sccache-action@v0.0.9 + - name: Setup ccache (macOS) if: matrix.use_ccache == 1 && matrix.os == 'macOS' run: brew install ccache - - name: Run sccache-cache (Windows) - if: matrix.use_sccache == 1 && matrix.os == 'Windows' - uses: mozilla-actions/sccache-action@v0.0.9 - - - name: Restore compiler cache (ccache) + - name: Restore compiler cache (macOS, ccache) if: matrix.use_ccache == 1 && matrix.os == 'macOS' id: ccache_restore uses: actions/cache/restore@v5 @@ -445,7 +445,7 @@ jobs: TARGET_MACOS_VERSION: ${{ matrix.override_target }} run: .ci/compile.sh --server --test --vcpkg - - name: Save compiler cache (ccache) + - name: Save compiler cache (macOS, ccache) if: github.ref == 'refs/heads/master' && matrix.use_ccache == 1 && matrix.os == 'macOS' uses: actions/cache/save@v5 env: From 8f757e8de2a860aecedb2f6948e3cf0b3af826cc Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 14 Mar 2026 13:16:42 +0100 Subject: [PATCH 7/8] Update desktop-build.yml --- .github/workflows/desktop-build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 14ff8a6be..4ac9794da 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -344,6 +344,11 @@ jobs: if: matrix.use_sccache == 1 && matrix.os == 'Windows' uses: mozilla-actions/sccache-action@v0.0.9 + # workaround, see https://github.com/Mozilla-Actions/sccache-action/issues/177 + - name: Ensure sccache is using GHA cache (Windows) + if: matrix.use_sccache == 1 && matrix.os == 'Windows' + run: Add-Content -Path $env:GITHUB_ENV -Value "SCCACHE_GHA_ENABLED=true" + - name: Setup ccache (macOS) if: matrix.use_ccache == 1 && matrix.os == 'macOS' run: brew install ccache From 338312b29e26fdfb373ef8bd8627a49cc40a89d6 Mon Sep 17 00:00:00 2001 From: tooomm Date: Sat, 14 Mar 2026 13:55:31 +0100 Subject: [PATCH 8/8] Update desktop-build.yml --- .github/workflows/desktop-build.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 4ac9794da..1dba3774c 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -325,7 +325,7 @@ jobs: # 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 - SCCACHE_GHA_ENABLED: true + SCCACHE_GHA_ENABLED: on steps: - name: Checkout @@ -344,11 +344,6 @@ jobs: if: matrix.use_sccache == 1 && matrix.os == 'Windows' uses: mozilla-actions/sccache-action@v0.0.9 - # workaround, see https://github.com/Mozilla-Actions/sccache-action/issues/177 - - name: Ensure sccache is using GHA cache (Windows) - if: matrix.use_sccache == 1 && matrix.os == 'Windows' - run: Add-Content -Path $env:GITHUB_ENV -Value "SCCACHE_GHA_ENABLED=true" - - name: Setup ccache (macOS) if: matrix.use_ccache == 1 && matrix.os == 'macOS' run: brew install ccache