@@ -406,6 +406,10 @@ jobs:
406
406
path : ~/AppData/Local/vcpkg/archives
407
407
key : ${{ runner.os }}-${{ runner.arch }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
408
408
409
+ - name : Install Ccache
410
+ run : |
411
+ choco install --yes --no-progress ccache
412
+
409
413
- name : Generate build system
410
414
run : |
411
415
cmake -B build --preset vs2022
@@ -417,10 +421,31 @@ jobs:
417
421
path : ~/AppData/Local/vcpkg/archives
418
422
key : ${{ runner.os }}-${{ runner.arch }}-vcpkg-binary-${{ hashFiles('cmake_version', 'msbuild_version', 'toolset_version', 'vcpkg.json') }}
419
423
424
+ - name : Restore Ccache cache
425
+ id : ccache-cache
426
+ uses : actions/cache/restore@v4
427
+ with :
428
+ path : ~/AppData/Local/ccache
429
+ key : ${{ github.job }}-ccache-${{ github.run_id }}
430
+ restore-keys : ${{ github.job }}-ccache-
431
+
420
432
- name : Build Release configuration
421
433
run : |
434
+ ccache --zero-stats
422
435
cmake --build build -j $env:NUMBER_OF_PROCESSORS --config Release
423
436
437
+ - name : Ccache stats
438
+ run : |
439
+ ccache --version | head -n 1
440
+ ccache --show-stats --verbose
441
+
442
+ - name : Save Ccache cache
443
+ uses : actions/cache/save@v4
444
+ if : github.event_name != 'pull_request' && steps.ccache-cache.outputs.cache-hit != 'true'
445
+ with :
446
+ path : ~/AppData/Local/ccache
447
+ key : ${{ github.job }}-ccache-${{ github.run_id }}
448
+
424
449
- name : Test Release configuration
425
450
run : |
426
451
ctest --test-dir build -j $env:NUMBER_OF_PROCESSORS -C Release
0 commit comments