mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-11 08:36:16 +00:00
Better sccache
This commit is contained in:
37
.github/workflows/build.yml
vendored
37
.github/workflows/build.yml
vendored
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user