File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,6 +231,22 @@ jobs:
231231 # an absolute path — use `cache-directories` instead.
232232 cache-directories : ${{ matrix.platform == 'windows-latest' && 'C:/t' || '' }}
233233
234+ # A restored Windows build cache (C:/t) may hold a CMakeCache.txt from an
235+ # older VS generator (e.g. VS 17 2022). When the runner image moves to a
236+ # newer VS (18 2026), CMake aborts: "generator does not match the generator
237+ # used previously". Drop the stale CMake config so whisper-rs-sys
238+ # reconfigures against the current toolchain (sccache still caches the
239+ # actual compiles, so the rebuild cost is minimal).
240+ - name : Clear stale CMake cache (Windows)
241+ if : matrix.platform == 'windows-latest'
242+ shell : pwsh
243+ run : |
244+ if (Test-Path C:/t) {
245+ Get-ChildItem -Path C:/t -Recurse -Force -ErrorAction SilentlyContinue |
246+ Where-Object { $_.Name -eq 'CMakeCache.txt' -or $_.Name -eq 'CMakeFiles' } |
247+ Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
248+ }
249+
234250 - name : Create dist stub for include_dir
235251 shell : bash
236252 run : mkdir -p dist && echo '<html></html>' > dist/index.html
Original file line number Diff line number Diff line change @@ -143,6 +143,22 @@ jobs:
143143 workspaces : ' ./src-tauri -> target'
144144 cache-directories : ${{ matrix.platform == 'windows-latest' && 'C:/t' || '' }}
145145
146+ # A restored Windows build cache (C:/t) may hold a CMakeCache.txt from an
147+ # older VS generator (e.g. VS 17 2022). When the runner image moves to a
148+ # newer VS (18 2026), CMake aborts: "generator does not match the generator
149+ # used previously". Drop the stale CMake config so whisper-rs-sys
150+ # reconfigures against the current toolchain (sccache still caches the
151+ # actual compiles, so the rebuild cost is minimal).
152+ - name : Clear stale CMake cache (Windows)
153+ if : matrix.platform == 'windows-latest'
154+ shell : pwsh
155+ run : |
156+ if (Test-Path C:/t) {
157+ Get-ChildItem -Path C:/t -Recurse -Force -ErrorAction SilentlyContinue |
158+ Where-Object { $_.Name -eq 'CMakeCache.txt' -or $_.Name -eq 'CMakeFiles' } |
159+ Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
160+ }
161+
146162 - name : Install frontend dependencies
147163 run : pnpm install --frozen-lockfile
148164
Original file line number Diff line number Diff line change 8888 workspaces : ' ./src-tauri -> target'
8989 cache-directories : ${{ matrix.platform == 'windows-latest' && 'C:/t' || '' }}
9090
91+ # A restored Windows build cache (C:/t) may hold a CMakeCache.txt from an
92+ # older VS generator (e.g. VS 17 2022). When the runner image moves to a
93+ # newer VS (18 2026), CMake aborts: "generator does not match the generator
94+ # used previously". Drop the stale CMake config so whisper-rs-sys
95+ # reconfigures against the current toolchain (sccache still caches the
96+ # actual compiles, so the rebuild cost is minimal).
97+ - name : Clear stale CMake cache (Windows)
98+ if : matrix.platform == 'windows-latest'
99+ shell : pwsh
100+ run : |
101+ if (Test-Path C:/t) {
102+ Get-ChildItem -Path C:/t -Recurse -Force -ErrorAction SilentlyContinue |
103+ Where-Object { $_.Name -eq 'CMakeCache.txt' -or $_.Name -eq 'CMakeFiles' } |
104+ Remove-Item -Recurse -Force -ErrorAction SilentlyContinue
105+ }
106+
91107 - name : Install frontend dependencies
92108 run : pnpm install --frozen-lockfile
93109
You can’t perform that action at this time.
0 commit comments