Skip to content

Commit f50ca09

Browse files
committed
[CI] Don't use cache fallback when presets are modified
1 parent 7e18d29 commit f50ca09

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/build-toolchain.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@ jobs:
4747
id: cache-cmake-deps
4848
uses: actions/cache@v4
4949
with:
50-
path: build\${{ inputs.preset }}\_deps
51-
key: cmake-deps-${{ inputs.preset }}-${{ hashFiles('cmake/**/*.cmake', '**/CMakeLists.txt') }}
52-
restore-keys: |
53-
cmake-deps-${{ inputs.preset }}-
50+
key: cmake-deps-${{ inputs.preset }}-${{ hashFiles('CMakePresets.json','**/CMakeLists.txt','cmake/**/*.cmake') }}
51+
restore-keys: |
52+
# fallback if *only* CMakeLists or .cmake files changed, but presets didn't:
53+
cmake-deps-${{ inputs.preset }}-${{ hashFiles('**/CMakeLists.txt','cmake/**/*.cmake') }}
54+
# last-resort fallback for any earlier version of this preset:
55+
cmake-deps-${{ inputs.preset }}-
5456
5557
- name: Download VC6 Portable from Cloudflare R2
5658
if: ${{ startsWith(inputs.preset, 'vc6') && steps.cache-vc6.outputs.cache-hit != 'true' }}

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)