mirror of
https://github.com/momo5502/emulator.git
synced 2026-01-28 15:31:02 +00:00
More sccache optimizations
This commit is contained in:
39
.github/workflows/build.yml
vendored
39
.github/workflows/build.yml
vendored
@@ -90,22 +90,6 @@ jobs:
|
|||||||
- name: Enable Developer Command Prompt
|
- name: Enable Developer Command Prompt
|
||||||
uses: ilammy/msvc-dev-cmd@v1.13.0
|
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
|
- name: Install sccache
|
||||||
uses: mozilla-actions/sccache-action@v0.0.9
|
uses: mozilla-actions/sccache-action@v0.0.9
|
||||||
with:
|
with:
|
||||||
@@ -114,12 +98,6 @@ jobs:
|
|||||||
- name: CMake Build
|
- name: CMake Build
|
||||||
run: cmake --preset=release && cmake --build --preset=release -t dump-apiset
|
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
|
- name: Upload Artifacts
|
||||||
uses: pyTooling/upload-artifact@v4
|
uses: pyTooling/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -292,7 +270,7 @@ jobs:
|
|||||||
WORKSPACE_PATH="${{github.workspace}}"
|
WORKSPACE_PATH="${{github.workspace}}"
|
||||||
WORKSPACE_PATH="${WORKSPACE_PATH//\\//}"
|
WORKSPACE_PATH="${WORKSPACE_PATH//\\//}"
|
||||||
echo "SCCACHE_DIR=${WORKSPACE_PATH}/sccache" >> $GITHUB_ENV
|
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
|
- name: Recover sccache
|
||||||
uses: actions/cache/restore@v3
|
uses: actions/cache/restore@v3
|
||||||
@@ -317,12 +295,6 @@ jobs:
|
|||||||
- name: CMake Build
|
- name: CMake Build
|
||||||
run: cmake --preset=${{matrix.preset}} ${{matrix.cmake-options}} && cmake --build --preset=${{matrix.preset}}
|
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
|
- name: Upload Artifacts
|
||||||
uses: pyTooling/upload-artifact@v4
|
uses: pyTooling/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -338,6 +310,15 @@ jobs:
|
|||||||
path: "build/${{matrix.preset}}/**/CTestTestfile.cmake"
|
path: "build/${{matrix.preset}}/**/CTestTestfile.cmake"
|
||||||
retention-days: 1
|
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:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
|
|||||||
Reference in New Issue
Block a user