Skip to content

Commit

Permalink
Restore/save build outputs for incremental build
Browse files Browse the repository at this point in the history
  • Loading branch information
DanRStevens committed Nov 25, 2024
1 parent 4a1c650 commit 66faf23
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,27 @@ jobs:
path: vcpkg_installed
key: ${{ runner.os }}-${{ matrix.platform }}-${{ hashFiles('vcpkg.json') }}

- name: Restore incremental build cache
uses: actions/cache/restore@v4
if: github.ref != format('refs/heads/{0}', github.event.repository.default_branch)
with:
path: .build
key: buildCache-${{ runner.os }}-${{ matrix.platform }}-${{ github.sha }}
restore-keys: buildCache-${{ runner.os }}-${{ matrix.platform }}-

- name: Build
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: |
vcpkg integrate install
msbuild /maxCpuCount /warnAsError /property:RunCodeAnalysis=true /property:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
- name: Save incremental build cache
uses: actions/cache/save@v4
with:
path: .build
key: buildCache-${{ runner.os }}-${{ matrix.platform }}-${{ github.sha }}

- name: Test
working-directory: ./test/
run: ../.build/${{env.BUILD_CONFIGURATION}}_${{env.PLATFORM}}_test/test.exe
Expand Down

0 comments on commit 66faf23

Please sign in to comment.