Limit sccache caches and improve PCH (#4727)

This also enables PCH on all but one Windows builds
This commit is contained in:
nerix
2023-07-19 22:29:17 +02:00
committed by GitHub
parent c8f390d558
commit 7fd01ac575
2 changed files with 8 additions and 27 deletions
+6 -1
View File
@@ -140,6 +140,8 @@ jobs:
if: startsWith(matrix.os, 'windows')
with:
variant: sccache
# only save on on the default (master) branch
save: ${{ github.event_name == 'push' }}
key: sccache-build-${{ matrix.os }}-${{ matrix.qt-version }}-${{ matrix.skip-crashpad }}
restore-keys: |
sccache-build-${{ matrix.os }}-${{ matrix.qt-version }}
@@ -181,13 +183,16 @@ jobs:
- name: Build (Windows)
if: startsWith(matrix.os, 'windows')
shell: pwsh
env:
# Enable PCH on Windows when crashpad is enabled
C2_WINDOWS_USE_PCH: ${{ matrix.skip-crashpad && 'OFF' || 'ON' }}
run: |
cd build
cmake `
-G"NMake Makefiles" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_TOOLCHAIN_FILE="conan_toolchain.cmake" `
-DUSE_PRECOMPILED_HEADERS=OFF `
-DUSE_PRECOMPILED_HEADERS=${{ env.C2_WINDOWS_USE_PCH }} `
-DBUILD_WITH_CRASHPAD="$Env:C2_ENABLE_CRASHPAD" `
-DCHATTERINO_LTO="$Env:C2_ENABLE_LTO" `
-DCHATTERINO_PLUGINS="$Env:C2_PLUGINS" `