@@ -176,14 +176,23 @@ jobs:
176
176
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
177
177
arch : ${{ matrix.arch }}
178
178
179
+ - name : Setup sccache
180
+ uses : hendrikmuhs/ccache-action@v1
181
+ with :
182
+ max-size : 100M
183
+ key : sccache-windows-${{ matrix.arch }}-sqlite
184
+ variant : sccache
185
+
179
186
- name : Configure SQLite
180
187
run : |
181
188
cmake -B ${{ github.workspace }}/BinaryCache/sqlite-3.43.2 `
182
189
-D BUILD_SHARED_LIBS=NO `
183
190
-D CMAKE_BUILD_TYPE=Release `
184
191
-D CMAKE_C_COMPILER=cl `
192
+ -D CMAKE_C_COMPILER_LAUNCHER=sccache `
185
193
-D CMAKE_C_FLAGS="${{ needs.context.outputs.CMAKE_C_FLAGS }}" `
186
194
-D CMAKE_CXX_COMPILER=cl `
195
+ -D CMAKE_CXX_COMPILER_LAUNCHER=sccache `
187
196
-D CMAKE_CXX_FLAGS="${{ needs.context.outputs.CMAKE_CXX_FLAGS }}" `
188
197
-D CMAKE_MT=mt `
189
198
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/sqlite-3.43.2/usr `
@@ -227,15 +236,24 @@ jobs:
227
236
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
228
237
arch : amd64
229
238
239
+ - name : Setup sccache
240
+ uses : hendrikmuhs/ccache-action@v1
241
+ with :
242
+ max-size : 100M
243
+ key : sccache-windows-amd64-icu_tools
244
+ variant : sccache
245
+
230
246
- name : Configure ICU Build Tools
231
247
run :
232
248
cmake -B ${{ github.workspace }}/BinaryCache/icu-tools-69.1 `
233
249
-D BUILD_SHARED_LIBS=NO `
234
250
-D BUILD_TOOLS=YES `
235
251
-D CMAKE_BUILD_TYPE=Release `
236
252
-D CMAKE_C_COMPILER=cl `
253
+ -D CMAKE_C_COMPILER_LAUNCHER=sccache `
237
254
-D CMAKE_C_FLAGS="${{ needs.context.outputs.CMAKE_C_FLAGS }}" `
238
255
-D CMAKE_CXX_COMPILER=cl `
256
+ -D CMAKE_CXX_COMPILER_LAUNCHER=sccache `
239
257
-D CMAKE_CXX_FLAGS="${{ needs.context.outputs.CMAKE_CXX_FLAGS }}" `
240
258
-D CMAKE_MT=mt `
241
259
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/icu-69.1/usr `
@@ -303,15 +321,24 @@ jobs:
303
321
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
304
322
arch : ${{ matrix.arch }}
305
323
324
+ - name : Setup sccache
325
+ uses : hendrikmuhs/ccache-action@v1
326
+ with :
327
+ max-size : 100M
328
+ key : sccache-windows-${{ matrix.arch }}-icu
329
+ variant : sccache
330
+
306
331
- name : Configure ICU
307
332
run : |
308
333
cmake -B ${{ github.workspace }}/BinaryCache/icu-69.1 `
309
334
-D BUILD_SHARED_LIBS=NO `
310
335
-D BUILD_TOOLS=${{ matrix.BUILD_TOOLS }} `
311
336
-D CMAKE_BUILD_TYPE=Release `
312
337
-D CMAKE_C_COMPILER=cl `
338
+ -D CMAKE_C_COMPILER_LAUNCHER=sccache `
313
339
-D CMAKE_C_FLAGS="${{ needs.context.outputs.CMAKE_C_FLAGS }}" `
314
340
-D CMAKE_CXX_COMPILER=cl `
341
+ -D CMAKE_CXX_COMPILER_LAUNCHER=sccache `
315
342
-D CMAKE_CXX_FLAGS="${{ needs.context.outputs.CMAKE_CXX_FLAGS }}" `
316
343
-D CMAKE_MT=mt `
317
344
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/icu-69.1/usr `
@@ -367,13 +394,22 @@ jobs:
367
394
368
395
- uses : compnerd/gha-setup-vsdevenv@main
369
396
397
+ - name : Setup sccache
398
+ uses : hendrikmuhs/ccache-action@v1
399
+ with :
400
+ max-size : 100M
401
+ key : sccache-windows-amd64-build_tools
402
+ variant : sccache
403
+
370
404
- name : Configure Tools
371
405
run : |
372
406
cmake -B ${{ github.workspace }}/BinaryCache/0 `
373
407
-D CMAKE_BUILD_TYPE=Release `
374
408
-D CMAKE_C_COMPILER=cl `
409
+ -D CMAKE_C_COMPILER_LAUNCHER=sccache `
375
410
-D CMAKE_C_FLAGS="${{ needs.context.outputs.CMAKE_C_FLAGS }}" `
376
411
-D CMAKE_CXX_COMPILER=cl `
412
+ -D CMAKE_CXX_COMPILER_LAUNCHER=sccache `
377
413
-D CMAKE_CXX_FLAGS="${{ needs.context.outputs.CMAKE_CXX_FLAGS }}" `
378
414
-D CMAKE_MT=mt `
379
415
-G Ninja `
@@ -534,6 +570,13 @@ jobs:
534
570
COMPILE_FLAGS "/Od /Gw /Oi /Oy /Gw /Ob2 /Ot /GF")
535
571
"@
536
572
573
+ - name : Setup sccache
574
+ uses : hendrikmuhs/ccache-action@v1
575
+ with :
576
+ max-size : 500M
577
+ key : sccache-windows-${{ matrix.arch }}-compilers
578
+ variant : sccache
579
+
537
580
- name : Configure Compilers
538
581
run : |
539
582
if ( "${{ matrix.arch }}" -eq "arm64" ) {
@@ -554,8 +597,10 @@ jobs:
554
597
-C ${{ github.workspace }}/SourceCache/swift/cmake/caches/${CACHE} `
555
598
-D CMAKE_BUILD_TYPE=Release `
556
599
-D CMAKE_C_COMPILER=cl `
600
+ -D CMAKE_C_COMPILER_LAUNCHER=sccache `
557
601
-D CMAKE_C_FLAGS="${{ needs.context.outputs.CMAKE_C_FLAGS }}" `
558
602
-D CMAKE_CXX_COMPILER=cl `
603
+ -D CMAKE_CXX_COMPILER_LAUNCHER=sccache `
559
604
-D CMAKE_CXX_FLAGS="${{ needs.context.outputs.CMAKE_CXX_FLAGS }}" `
560
605
-D CMAKE_MT=mt `
561
606
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/Developer/Toolchains/unknown-Asserts-development.xctoolchain/usr `
@@ -653,14 +698,23 @@ jobs:
653
698
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
654
699
arch : ${{ matrix.arch }}
655
700
701
+ - name : Setup sccache
702
+ uses : hendrikmuhs/ccache-action@v1
703
+ with :
704
+ max-size : 100M
705
+ key : sccache-windows-${{ matrix.arch }}-zlib
706
+ variant : sccache
707
+
656
708
- name : Configure zlib
657
709
run : |
658
710
cmake -B ${{ github.workspace }}/BinaryCache/zlib-1.3 `
659
711
-D BUILD_SHARED_LIBS=NO `
660
712
-D CMAKE_BUILD_TYPE=Release `
661
713
-D CMAKE_C_COMPILER=cl `
714
+ -D CMAKE_C_COMPILER_LAUNCHER=sccache `
662
715
-D CMAKE_C_FLAGS="${{ needs.context.outputs.CMAKE_C_FLAGS }}" `
663
716
-D CMAKE_CXX_COMPILER=cl `
717
+ -D CMAKE_CXX_COMPILER_LAUNCHER=sccache `
664
718
-D CMAKE_CXX_FLAGS="${{ needs.context.outputs.CMAKE_CXX_FLAGS }}" `
665
719
-D CMAKE_MT=mt `
666
720
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/zlib-1.3/usr `
@@ -705,14 +759,23 @@ jobs:
705
759
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
706
760
arch : ${{ matrix.arch }}
707
761
762
+ - name : Setup sccache
763
+ uses : hendrikmuhs/ccache-action@v1
764
+ with :
765
+ max-size : 100M
766
+ key : sccache-windows-${{ matrix.arch }}-curl
767
+ variant : sccache
768
+
708
769
- name : Configure curl
709
770
run : |
710
771
cmake -B ${{ github.workspace }}/BinaryCache/curl-7.77.0 `
711
772
-D BUILD_SHARED_LIBS=NO `
712
773
-D CMAKE_BUILD_TYPE=Release `
713
774
-D CMAKE_C_COMPILER=cl `
775
+ -D CMAKE_C_COMPILER_LAUNCHER=sccache `
714
776
-D CMAKE_C_FLAGS="${{ needs.context.outputs.CMAKE_C_FLAGS }}" `
715
777
-D CMAKE_CXX_COMPILER=cl `
778
+ -D CMAKE_CXX_COMPILER_LAUNCHER=sccache `
716
779
-D CMAKE_CXX_FLAGS="${{ needs.context.outputs.CMAKE_CXX_FLAGS }}" `
717
780
-D CMAKE_MT=mt `
718
781
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/curl-7.77.0/usr `
@@ -775,14 +838,23 @@ jobs:
775
838
components : ' Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64'
776
839
arch : ${{ matrix.arch }}
777
840
841
+ - name : Setup sccache
842
+ uses : hendrikmuhs/ccache-action@v1
843
+ with :
844
+ max-size : 100M
845
+ key : sccache-windows-${{ matrix.arch }}-libxml2
846
+ variant : sccache
847
+
778
848
- name : Configure libxml2
779
849
run : |
780
850
cmake -B ${{ github.workspace }}/BinaryCache/libxml2-2.11.5 `
781
851
-D BUILD_SHARED_LIBS=NO `
782
852
-D CMAKE_BUILD_TYPE=Release `
783
853
-D CMAKE_C_COMPILER=cl `
854
+ -D CMAKE_C_COMPILER_LAUNCHER=sccache `
784
855
-D CMAKE_C_FLAGS="${{ needs.context.outputs.CMAKE_C_FLAGS }}" `
785
856
-D CMAKE_CXX_COMPILER=cl `
857
+ -D CMAKE_CXX_COMPILER_LAUNCHER=sccache `
786
858
-D CMAKE_CXX_FLAGS="${{ needs.context.outputs.CMAKE_CXX_FLAGS }}" `
787
859
-D CMAKE_MT=mt `
788
860
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/libxml2-2.11.5/usr `
0 commit comments