Update caches

This commit is contained in:
momo5502
2025-05-29 13:46:59 +02:00
parent 61806bb9c4
commit 202461c5bd

View File

@@ -99,12 +99,13 @@ jobs:
echo "SCCACHE_CACHE_SIZE=300M" >> $GITHUB_ENV
- name: Recover sccache
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: ${{env.SCCACHE_DIR}}
key: sccache dumper ${{ github.head_ref || github.ref_name }}
key: sccache-dumper-${{ github.head_ref || github.ref_name }}-
restore-keys: |
sccache dumper ${{ github.event.repository.default_branch }}
sccache-dumper-${{ github.event.repository.default_branch }}-
sccache dumper ${{ github.head_ref || github.ref_name }}-
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.9
@@ -114,6 +115,12 @@ 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-dumper-${{ github.head_ref || github.ref_name }}-${{github.run_id}}-${{github.run_attempt}}
- name: Upload Artifacts
uses: pyTooling/upload-artifact@v4
with:
@@ -122,19 +129,6 @@ jobs:
path: "*"
retention-days: 1
- name: Remove old cache
uses: actions/github-script@v7.0.1
continue-on-error: true
with:
script: |
github.rest.actions.deleteActionsCacheByKey({
owner: context.repo.owner,
repo: context.repo.repo,
key: "sccache dumper ${{ github.head_ref || github.ref_name }}",
}).catch(e => {})
create-emulation-root:
name: Create Emulation Root
runs-on: ${{ matrix.runner }}
@@ -302,12 +296,13 @@ jobs:
echo "SCCACHE_CACHE_SIZE=300M" >> $GITHUB_ENV
- name: Recover sccache
uses: actions/cache@v3
uses: actions/cache/restore@v3
with:
path: ${{env.SCCACHE_DIR}}
key: sccache ${{matrix.platform}} ${{matrix.configuration}} ${{ github.head_ref || github.ref_name }}
key: sccache-${{matrix.platform}}-${{matrix.configuration}}-${{ github.head_ref || github.ref_name }}-
restore-keys: |
sccache ${{matrix.platform}} ${{matrix.configuration}} ${{ github.event.repository.default_branch }}
sccache-${{matrix.platform}}-${{matrix.configuration}}-${{ github.event.repository.default_branch }}-
sccache ${{matrix.platform}} ${{matrix.configuration}} ${{ github.head_ref || github.ref_name }}-
- name: Install sccache
uses: mozilla-actions/sccache-action@v0.0.9
@@ -324,6 +319,12 @@ 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 ${{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:
@@ -339,17 +340,6 @@ jobs:
path: "build/${{matrix.preset}}/**/CTestTestfile.cmake"
retention-days: 1
- name: Remove old cache
uses: actions/github-script@v7.0.1
continue-on-error: true
with:
script: |
github.rest.actions.deleteActionsCacheByKey({
owner: context.repo.owner,
repo: context.repo.repo,
key: "sccache ${{matrix.platform}} ${{matrix.configuration}} ${{ github.head_ref || github.ref_name }}",
}).catch(e => {})
test:
name: Test
runs-on: ${{ matrix.runner }}