@@ -254,11 +254,23 @@ jobs:
254
254
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
255
255
arch : ${{ matrix.arch }}
256
256
257
+ - name : Compute workspace hash
258
+ id : workspace_hash
259
+ shell : pwsh
260
+ run : |
261
+ $stringAsStream = [System.IO.MemoryStream]::new()
262
+ $writer = [System.IO.StreamWriter]::new($stringAsStream)
263
+ $writer.write("${{ github.workspace }}")
264
+ $writer.Flush()
265
+ $stringAsStream.Position = 0
266
+ $hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
267
+ echo "hash=$hash" >> $env:GITHUB_OUTPUT
268
+
257
269
- name : Setup sccache
258
270
uses : hendrikmuhs/ccache-action@2e0e89e8d74340a03f75d58d02aae4c5ee1b15c6
259
271
with :
260
272
max-size : 100M
261
- key : ${{ matrix.os }}-${{ matrix.arch }}-sqlite
273
+ key : ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-sqlite
262
274
variant : sccache
263
275
264
276
- name : Configure SQLite
@@ -311,11 +323,23 @@ jobs:
311
323
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
312
324
arch : ${{ matrix.arch }}
313
325
326
+ - name : Compute workspace hash
327
+ id : workspace_hash
328
+ shell : pwsh
329
+ run : |
330
+ $stringAsStream = [System.IO.MemoryStream]::new()
331
+ $writer = [System.IO.StreamWriter]::new($stringAsStream)
332
+ $writer.write("${{ github.workspace }}")
333
+ $writer.Flush()
334
+ $stringAsStream.Position = 0
335
+ $hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
336
+ echo "hash=$hash" >> $env:GITHUB_OUTPUT
337
+
314
338
- name : Setup sccache
315
339
uses : hendrikmuhs/ccache-action@2e0e89e8d74340a03f75d58d02aae4c5ee1b15c6
316
340
with :
317
341
max-size : 1M
318
- key : windows-${{ matrix.arch }}-cmark-gfm
342
+ key : ${{ steps.workspace_hash.outputs.hash }}- windows-${{ matrix.arch }}-cmark-gfm
319
343
variant : sccache
320
344
321
345
- name : Configure cmark-gfm
@@ -371,11 +395,23 @@ jobs:
371
395
372
396
- uses : compnerd/gha-setup-vsdevenv@main
373
397
398
+ - name : Compute workspace hash
399
+ id : workspace_hash
400
+ shell : pwsh
401
+ run : |
402
+ $stringAsStream = [System.IO.MemoryStream]::new()
403
+ $writer = [System.IO.StreamWriter]::new($stringAsStream)
404
+ $writer.write("${{ github.workspace }}")
405
+ $writer.Flush()
406
+ $stringAsStream.Position = 0
407
+ $hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
408
+ echo "hash=$hash" >> $env:GITHUB_OUTPUT
409
+
374
410
- name : Setup sccache
375
411
uses : hendrikmuhs/ccache-action@2e0e89e8d74340a03f75d58d02aae4c5ee1b15c6
376
412
with :
377
413
max-size : 100M
378
- key : windows-amd64-build_tools
414
+ key : ${{ steps.workspace_hash.outputs.hash }}- windows-amd64-build_tools
379
415
variant : sccache
380
416
381
417
- name : Configure Tools
@@ -554,11 +590,23 @@ jobs:
554
590
with :
555
591
ndk-version : r26b
556
592
593
+ - name : Compute workspace hash
594
+ id : workspace_hash
595
+ shell : pwsh
596
+ run : |
597
+ $stringAsStream = [System.IO.MemoryStream]::new()
598
+ $writer = [System.IO.StreamWriter]::new($stringAsStream)
599
+ $writer.write("${{ github.workspace }}")
600
+ $writer.Flush()
601
+ $stringAsStream.Position = 0
602
+ $hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
603
+ echo "hash=$hash" >> $env:GITHUB_OUTPUT
604
+
557
605
- name : Setup sccache
558
606
uses : hendrikmuhs/ccache-action@2e0e89e8d74340a03f75d58d02aae4c5ee1b15c6
559
607
with :
560
608
max-size : 500M
561
- key : windows-${{ matrix.arch }}-compilers
609
+ key : ${{ steps.workspace_hash.outputs.hash }}- windows-${{ matrix.arch }}-compilers
562
610
variant : sccache
563
611
564
612
- name : Configure Compilers
@@ -786,11 +834,23 @@ jobs:
786
834
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
787
835
arch : ${{ matrix.arch }}
788
836
837
+ - name : Compute workspace hash
838
+ id : workspace_hash
839
+ shell : pwsh
840
+ run : |
841
+ $stringAsStream = [System.IO.MemoryStream]::new()
842
+ $writer = [System.IO.StreamWriter]::new($stringAsStream)
843
+ $writer.write("${{ github.workspace }}")
844
+ $writer.Flush()
845
+ $stringAsStream.Position = 0
846
+ $hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
847
+ echo "hash=$hash" >> $env:GITHUB_OUTPUT
848
+
789
849
- name : Setup sccache
790
850
uses : hendrikmuhs/ccache-action@2e0e89e8d74340a03f75d58d02aae4c5ee1b15c6
791
851
with :
792
852
max-size : 100M
793
- key : ${{ matrix.os }}-${{ matrix.arch }}-zlib
853
+ key : ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-zlib
794
854
variant : sccache
795
855
796
856
- uses : nttld/setup-ndk@v1
@@ -914,11 +974,23 @@ jobs:
914
974
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
915
975
arch : ${{ matrix.arch }}
916
976
977
+ - name : Compute workspace hash
978
+ id : workspace_hash
979
+ shell : pwsh
980
+ run : |
981
+ $stringAsStream = [System.IO.MemoryStream]::new()
982
+ $writer = [System.IO.StreamWriter]::new($stringAsStream)
983
+ $writer.write("${{ github.workspace }}")
984
+ $writer.Flush()
985
+ $stringAsStream.Position = 0
986
+ $hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
987
+ echo "hash=$hash" >> $env:GITHUB_OUTPUT
988
+
917
989
- name : Setup sccache
918
990
uses : hendrikmuhs/ccache-action@2e0e89e8d74340a03f75d58d02aae4c5ee1b15c6
919
991
with :
920
992
max-size : 100M
921
- key : ${{ matrix.os }}-${{ matrix.arch }}-curl
993
+ key : ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-curl
922
994
variant : sccache
923
995
924
996
- uses : nttld/setup-ndk@v1
@@ -1113,11 +1185,23 @@ jobs:
1113
1185
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
1114
1186
arch : ${{ matrix.arch }}
1115
1187
1188
+ - name : Compute workspace hash
1189
+ id : workspace_hash
1190
+ shell : pwsh
1191
+ run : |
1192
+ $stringAsStream = [System.IO.MemoryStream]::new()
1193
+ $writer = [System.IO.StreamWriter]::new($stringAsStream)
1194
+ $writer.write("${{ github.workspace }}")
1195
+ $writer.Flush()
1196
+ $stringAsStream.Position = 0
1197
+ $hash = (Get-FileHash -Algorithm SHA256 -InputStream $stringAsStream).Hash
1198
+ echo "hash=$hash" >> $env:GITHUB_OUTPUT
1199
+
1116
1200
- name : Setup sccache
1117
1201
uses : hendrikmuhs/ccache-action@2e0e89e8d74340a03f75d58d02aae4c5ee1b15c6
1118
1202
with :
1119
1203
max-size : 100M
1120
- key : ${{ matrix.os }}-${{ matrix.arch }}-libxml2
1204
+ key : ${{ steps.workspace_hash.outputs.hash }}-${{ matrix.os }}-${{ matrix.arch }}-libxml2
1121
1205
variant : sccache
1122
1206
1123
1207
- uses : nttld/setup-ndk@v1
0 commit comments