diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ac9b1d35..be9506fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -45,6 +45,14 @@ 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 @@ -52,6 +60,12 @@ jobs: 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