More sccache optimizations

This commit is contained in:
momo5502
2025-05-29 14:14:46 +02:00
parent 56f48eb1a6
commit bee2f09894

View File

@@ -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 }}