From bee2f0989439c83601db9d3ccf3a40a9ac652bf7 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Thu, 29 May 2025 14:14:46 +0200 Subject: [PATCH] More sccache optimizations --- .github/workflows/build.yml | 39 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 29 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8209a58d..5eb98ca5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,22 +90,6 @@ jobs: - name: Enable Developer Command Prompt uses: ilammy/msvc-dev-cmd@v1.13.0 - - name: Setup sccache environment - shell: bash - run: | - WORKSPACE_PATH="${{github.workspace}}" - WORKSPACE_PATH="${WORKSPACE_PATH//\\//}" - echo "SCCACHE_DIR=${WORKSPACE_PATH}/sccache" >> $GITHUB_ENV - echo "SCCACHE_CACHE_SIZE=300M" >> $GITHUB_ENV - - - name: Recover sccache - uses: actions/cache/restore@v3 - with: - path: ${{env.SCCACHE_DIR}} - key: sccache-${{github.job}}-${{ github.head_ref || github.ref_name }}- - restore-keys: | - sccache-${{github.job}}-${{ github.event.repository.default_branch }}- - - name: Install sccache uses: mozilla-actions/sccache-action@v0.0.9 with: @@ -114,12 +98,6 @@ jobs: - name: CMake Build run: cmake --preset=release && cmake --build --preset=release -t dump-apiset - - name: Save sccache - uses: actions/cache/save@v3 - with: - path: ${{env.SCCACHE_DIR}} - key: sccache-${{github.job}}-${{ github.head_ref || github.ref_name }}-${{github.run_id}}-${{github.run_attempt}} - - name: Upload Artifacts uses: pyTooling/upload-artifact@v4 with: @@ -292,7 +270,7 @@ jobs: WORKSPACE_PATH="${{github.workspace}}" WORKSPACE_PATH="${WORKSPACE_PATH//\\//}" echo "SCCACHE_DIR=${WORKSPACE_PATH}/sccache" >> $GITHUB_ENV - echo "SCCACHE_CACHE_SIZE=300M" >> $GITHUB_ENV + echo "SCCACHE_CACHE_SIZE=200M" >> $GITHUB_ENV - name: Recover sccache uses: actions/cache/restore@v3 @@ -317,12 +295,6 @@ jobs: - name: CMake Build run: cmake --preset=${{matrix.preset}} ${{matrix.cmake-options}} && cmake --build --preset=${{matrix.preset}} - - name: Save sccache - uses: actions/cache/save@v3 - with: - path: ${{env.SCCACHE_DIR}} - key: sccache-${{github.job}}-${{matrix.platform}}-${{matrix.configuration}}-${{ github.head_ref || github.ref_name }}-${{github.run_id}}-${{github.run_attempt}} - - name: Upload Artifacts uses: pyTooling/upload-artifact@v4 with: @@ -338,6 +310,15 @@ jobs: path: "build/${{matrix.preset}}/**/CTestTestfile.cmake" retention-days: 1 + - name: Print sccache stats + run: sccache -s && sccache --stop-server + + - name: Save sccache + uses: actions/cache/save@v3 + with: + path: ${{env.SCCACHE_DIR}} + key: sccache-${{github.job}}-${{matrix.platform}}-${{matrix.configuration}}-${{ github.head_ref || github.ref_name }}-${{github.run_id}}-${{github.run_attempt}} + test: name: Test runs-on: ${{ matrix.runner }}