Skip to content

Commit 4ebed30

Browse files
committed
[CI] Include CMakePresets.json in cache key hash
Previously our CI only hashed CMakeLists.txt and cmake/*.cmake files, so changing the generator in CMakePresets.json didn’t invalidate the build/<preset>/_deps cache. Now CMakePresets.json is added to the hashFiles() call, ensuring the cache is bumped anytime the preset is modified.
1 parent 7e18d29 commit 4ebed30

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/build-toolchain.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
uses: actions/cache@v4
4949
with:
5050
path: build\${{ inputs.preset }}\_deps
51-
key: cmake-deps-${{ inputs.preset }}-${{ hashFiles('cmake/**/*.cmake', '**/CMakeLists.txt') }}
51+
key: cmake-deps-${{ inputs.preset }}-${{ hashFiles('CMakePresets.json','cmake/**/*.cmake','**/CMakeLists.txt') }}
5252
restore-keys: |
5353
cmake-deps-${{ inputs.preset }}-
5454

CMakePresets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
{
1010
"name": "vc6",
1111
"displayName": "Windows 32bit VC6 Release",
12-
"generator": "NMake Makefiles",
12+
"generator": "Ninja",
1313
"hidden": false,
1414
"binaryDir": "${sourceDir}/build/${presetName}",
1515
"cacheVariables": {
1616
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
1717
"CMAKE_MSVC_RUNTIME_LIBRARY": "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL",
18-
"CMAKE_MSVC_DEBUG_INFORMATION_FORMAT": "$<$<CONFIG:Release,Debug,RelWithDebInfo>:ProgramDatabase>",
18+
"CMAKE_MSVC_DEBUG_INFORMATION_FORMAT": "",
1919
"CMAKE_BUILD_TYPE": "Release",
2020
"RTS_FLAGS": "/W3"
2121
},

0 commit comments

Comments
 (0)