Better sccache

This commit is contained in:
momo5502
2025-05-29 11:33:02 +02:00
parent 1b06e65e1f
commit 1605d48a18

View File

@@ -52,14 +52,6 @@ jobs:
sudo update-alternatives --set cc /usr/bin/clang-${{ env.LLVM_VERSION }}
sudo update-alternatives --set c++ /usr/bin/clang++-${{ env.LLVM_VERSION }}
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Setup Environment Variables
shell: bash
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
- name: CMake Build
run: cmake --preset=release -DMOMO_ENABLE_CLANG_TIDY=On && cmake --build --preset=release
@@ -94,14 +86,6 @@ jobs:
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.13.0
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Setup Environment Variables
shell: bash
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
- name: CMake Build
run: cmake --preset=release && cmake --build --preset=release -t dump-apiset
@@ -274,10 +258,22 @@ jobs:
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.9
- name: Setup Environment Variables
- name: Initialize sccache environnement
shell: bash
run: |
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
echo SCCACHE_CACHE=$(sccache --show-stats | grep Local | cut -d '"' -f2) >> $GITHUB_ENV
sccache --stop-server || true
- name: Recover sccache cache
uses: actions/cache@v3
with:
path: ${{env.SCCACHE_CACHE}}
key: sccache-cache-${{runner.os}}
- name: Start sccache
shell: bash
working-directory: ${{github.workspace}}
run: sccache --start-server
- name: Setup Android Environment Variables
shell: bash
@@ -304,6 +300,11 @@ jobs:
path: "build/${{matrix.preset}}/**/CTestTestfile.cmake"
retention-days: 1
- name: Cleanup sccache
working-directory: ${{github.workspace}}
shell: bash
run: sccache --stop-server
test:
name: Test
runs-on: ${{ matrix.runner }}