From 2ce3a004ba7cca07aa5b7cd29e3984e7a40e40df Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Wed, 11 Aug 2021 14:55:14 -0500 Subject: [PATCH] GHActions: Add buildcache on windows --- .github/workflows/windows-workflow.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/windows-workflow.yml b/.github/workflows/windows-workflow.yml index 313bdf06f6..00a598ad5a 100644 --- a/.github/workflows/windows-workflow.yml +++ b/.github/workflows/windows-workflow.yml @@ -75,10 +75,15 @@ jobs: runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.experimental }} # Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them. - timeout-minutes: 30 + timeout-minutes: 60 env: POWERSHELL_TELEMETRY_OPTOUT: 1 + BUILDCACHE_COMPRESS_FORMAT: ZSTD + BUILDCACHE_COMPRESS_LEVEL: 19 + BUILDCACHE_MAX_CACHE_SIZE: 134217728 # 128MB + BUILDCACHE_DIRECT_MODE: true + BUILDCACHE_LOG_FILE: ${{ github.workspace }}\buildcache.log steps: # NOTE - useful for debugging @@ -94,6 +99,12 @@ jobs: if: steps.cache-submodules.outputs.cache-hit != 'true' run: git submodule update --init --recursive -j $env:NUMBER_OF_PROCESSORS + - name: Setup Buildcache + uses: mikehardy/buildcache-action@v1.2.1 + with: + cache_key: ${{ matrix.os }} ${{ matrix.platform }} ${{ matrix.configuration }} + if: matrix.configuration == 'CMake' # TODO: buildcache on VS + - name: Verify VS Project Files run: .github\workflows\scripts\windows\validate-vs-filters.ps1 if: matrix.configuration != 'CMake' @@ -111,7 +122,7 @@ jobs: call "%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\%vcvars%" echo ::set-output name=buildtype::%type% echo ::set-output name=vcvars::%vcvars% - cmake . -B build -DCMAKE_BUILD_TYPE=%type% -G Ninja + cmake . -B build -DCMAKE_BUILD_TYPE=%type% -G Ninja -DCMAKE_C_COMPILER_LAUNCHER=..\buildcache\bin\buildcache.exe -DCMAKE_CXX_COMPILER_LAUNCHER=..\buildcache\bin\buildcache.exe -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON if: matrix.configuration == 'CMake' - name: Build PCSX2