@@ -245,10 +245,12 @@ jobs:
245245 steps :
246246 - uses : actions/checkout@v7.0.1
247247 - name : ccache
248- if : matrix.name != 'vs-x64' && matrix.name != ' emscripten'
248+ if : matrix.name != 'emscripten'
249249 uses : hendrikmuhs/ccache-action@v1.2.24
250250 with :
251251 key : cmake-${{ matrix.name }}
252+ variant : ${{ matrix.name == 'vs-x64' && 'sccache' || 'ccache' }}
253+ max-size : 1G
252254
253255 - name : Libs, dependencies and projectGenerator (linux64)
254256 if : matrix.name == 'linux64'
@@ -326,6 +328,15 @@ jobs:
326328 if : matrix.name == 'vs-x64'
327329 shell : msys2 {0}
328330 run : ./scripts/ci/vs/install.sh -a x64
331+ - uses : ilammy/msvc-dev-cmd@v1.13.0
332+ if : matrix.name == 'vs-x64'
333+ with :
334+ arch : x64
335+ vsversion : " 2022"
336+ - name : sccache cl wrapper (vs-x64)
337+ if : matrix.name == 'vs-x64'
338+ shell : pwsh
339+ run : ./scripts/ci/vs/setup_sccache_cl.ps1
329340 - name : Build (vs-x64)
330341 if : matrix.name == 'vs-x64'
331342 shell : bash
@@ -352,6 +363,12 @@ jobs:
352363 steps :
353364 - name : Clone repository
354365 uses : actions/checkout@v7.0.1
366+ - name : sccache
367+ uses : hendrikmuhs/ccache-action@v1.2.24
368+ with :
369+ variant : sccache
370+ key : vs-${{ matrix.vsYear }}-${{ matrix.platform }}-${{ matrix.toolset }}
371+ max-size : 1G
355372 - uses : msys2/setup-msys2@v2.33.0
356373 with :
357374 update : true
@@ -376,17 +393,28 @@ jobs:
376393 run : ./scripts/ci/vs/install.sh ${{ matrix.installFlag }} -a ${{ matrix.platform }}
377394 - name : Setup MSBuild
378395 uses : microsoft/setup-msbuild@v3
396+ - uses : ilammy/msvc-dev-cmd@v1.13.0
397+ with :
398+ arch : ${{ matrix.platform == 'x64' && 'x64' || matrix.platform == 'ARM64' && 'amd64_arm64' || 'amd64_arm64ec' }}
399+ vsversion : " ${{ matrix.vsYear }}"
400+ - name : sccache cl wrapper
401+ shell : pwsh
402+ run : ./scripts/ci/vs/setup_sccache_cl.ps1
379403
380404 - name : Build DEBUG and RELEASE emptyExample
381405 working-directory : ${{env.GITHUB_WORKSPACE}}
406+ shell : pwsh
382407 run : |
383- msbuild examples/templates/emptyExample/emptyExample.vcxproj /p:Configuration=Debug /p:Platform=${{ matrix.platform }} /p:PlatformToolset=${{ matrix.toolset }}
384- msbuild examples/templates/emptyExample/emptyExample.vcxproj /p:Configuration=Release /p:Platform=${{ matrix.platform }} /p:PlatformToolset=${{ matrix.toolset }}
408+ $extra = $env:MSBUILD_SCCACHE_PROPS.Split(' ', [System.StringSplitOptions]::RemoveEmptyEntries)
409+ msbuild examples/templates/emptyExample/emptyExample.vcxproj /p:Configuration=Debug /p:Platform=${{ matrix.platform }} /p:PlatformToolset=${{ matrix.toolset }} @extra
410+ msbuild examples/templates/emptyExample/emptyExample.vcxproj /p:Configuration=Release /p:Platform=${{ matrix.platform }} /p:PlatformToolset=${{ matrix.toolset }} @extra
385411 - name : Build DEBUG and RELEASE allAddonsExample
386412 working-directory : ${{env.GITHUB_WORKSPACE}}
413+ shell : pwsh
387414 run : |
388- msbuild examples/templates/allAddonsExample/allAddonsExample.vcxproj /p:Configuration=Debug /p:Platform=${{ matrix.platform }} /p:PlatformToolset=${{ matrix.toolset }}
389- msbuild examples/templates/allAddonsExample/allAddonsExample.vcxproj /p:Configuration=Release /p:Platform=${{ matrix.platform }} /p:PlatformToolset=${{ matrix.toolset }}
415+ $extra = $env:MSBUILD_SCCACHE_PROPS.Split(' ', [System.StringSplitOptions]::RemoveEmptyEntries)
416+ msbuild examples/templates/allAddonsExample/allAddonsExample.vcxproj /p:Configuration=Debug /p:Platform=${{ matrix.platform }} /p:PlatformToolset=${{ matrix.toolset }} @extra
417+ msbuild examples/templates/allAddonsExample/allAddonsExample.vcxproj /p:Configuration=Release /p:Platform=${{ matrix.platform }} /p:PlatformToolset=${{ matrix.toolset }} @extra
390418 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
391419 rpi-build :
392420 needs : changes
0 commit comments