@@ -857,21 +857,43 @@ jobs:
857857 PLATFORM : ${{ matrix.x64 && 'x64' || 'x86' }}
858858 THREAD_SAFE : " ${{ matrix.zts && '1' || '0' }}"
859859 INTRINSICS : " ${{ matrix.zts && 'AVX2' || '' }}"
860- PARALLEL : -j2
860+ PARALLEL : -j4
861861 OPCACHE : " ${{ matrix.opcache && '1' || '0' }}"
862862 ASAN : " ${{ matrix.asan && '1' || '0' }}"
863863 CLANG_TOOLSET : " ${{ matrix.clang && '1' || '0' }}"
864+ SCCACHE_CACHE_SIZE : 1G
865+ SCCACHE_IGNORE_SERVER_IO_ERROR : " 1"
866+ SCCACHE_CACHE_KEY : windows-sccache-v2-php${{ join(fromJson(inputs.branch).version, '.') }}-${{ fromJson(inputs.branch).jobs.WINDOWS.config.vs_crt_version }}-${{ matrix.x64 && 'x64' || 'x86' }}-zts${{ matrix.zts && '1' || '0' }}-asan${{ matrix.asan && '1' || '0' }}-${{ github.sha }}
867+ SCCACHE_CACHE_RESTORE_PREFIX : windows-sccache-v2-php${{ join(fromJson(inputs.branch).version, '.') }}-${{ fromJson(inputs.branch).jobs.WINDOWS.config.vs_crt_version }}-${{ matrix.x64 && 'x64' || 'x86' }}-zts${{ matrix.zts && '1' || '0' }}-asan${{ matrix.asan && '1' || '0' }}-
864868 steps :
865869 - name : git config
866870 run : git config --global core.autocrlf false && git config --global core.eol lf
867871 - name : git checkout
868872 uses : actions/checkout@v6
869873 with :
870874 ref : ${{ fromJson(inputs.branch).ref }}
871- - name : Setup
875+ - name : Setup Windows build tools
872876 uses : ./.github/actions/setup-windows
873- - name : Build
874- run : .github/scripts/windows/build.bat
877+ - name : Restore MSVC compiler cache
878+ if : ${{ !matrix.clang }}
879+ continue-on-error : true
880+ uses : actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
881+ with :
882+ path : ${{ runner.temp }}\sccache
883+ key : ${{ env.SCCACHE_CACHE_KEY }}
884+ restore-keys : ${{ env.SCCACHE_CACHE_RESTORE_PREFIX }}
885+ - name : Build PHP while preparing test databases
886+ shell : pwsh
887+ run : .github/scripts/windows/build_and_setup_test_databases.ps1
888+ # Pull request caches are isolated to the PR merge ref and cannot update
889+ # caches used by the base branch or other pull requests.
890+ - name : Save MSVC compiler cache
891+ if : ${{ !matrix.clang }}
892+ continue-on-error : true
893+ uses : actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 # v5.1.0
894+ with :
895+ path : ${{ runner.temp }}\sccache
896+ key : ${{ env.SCCACHE_CACHE_KEY }}
875897 - name : Test
876898 run : .github/scripts/windows/test.bat
877899 FREEBSD :
0 commit comments