Skip to content

Commit d660d31

Browse files
ochafikmglambda
authored andcommitted
ci: ccache for all github worfklows (ggml-org#11516)
1 parent ef898f1 commit d660d31

File tree

1 file changed

+130
-6
lines changed

1 file changed

+130
-6
lines changed

.github/workflows/build.yml

Lines changed: 130 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ jobs:
4343
with:
4444
fetch-depth: 0
4545

46+
- name: ccache
47+
uses: hendrikmuhs/ccache-action@v1.2.16
48+
with:
49+
key: macOS-latest-cmake-arm64
50+
evict-old-files: 1d
51+
4652
- name: Dependencies
4753
id: depends
4854
continue-on-error: true
@@ -108,6 +114,12 @@ jobs:
108114
with:
109115
fetch-depth: 0
110116

117+
- name: ccache
118+
uses: hendrikmuhs/ccache-action@v1.2.16
119+
with:
120+
key: macOS-latest-cmake-x64
121+
evict-old-files: 1d
122+
111123
- name: Dependencies
112124
id: depends
113125
continue-on-error: true
@@ -172,6 +184,12 @@ jobs:
172184
with:
173185
fetch-depth: 0
174186

187+
- name: ccache
188+
uses: hendrikmuhs/ccache-action@v1.2.16
189+
with:
190+
key: ubuntu-cpu-cmake
191+
evict-old-files: 1d
192+
175193
- name: Dependencies
176194
id: depends
177195
run: |
@@ -249,6 +267,12 @@ jobs:
249267
id: checkout
250268
uses: actions/checkout@v4
251269

270+
- name: ccache
271+
uses: hendrikmuhs/ccache-action@v1.2.16
272+
with:
273+
key: ubuntu-latest-cmake-sanitizer-${{ matrix.sanitizer }}
274+
evict-old-files: 1d
275+
252276
- name: Dependencies
253277
id: depends
254278
run: |
@@ -296,6 +320,12 @@ jobs:
296320
id: checkout
297321
uses: actions/checkout@v4
298322

323+
- name: ccache
324+
uses: hendrikmuhs/ccache-action@v1.2.16
325+
with:
326+
key: ubuntu-latest-cmake-rpc
327+
evict-old-files: 1d
328+
299329
- name: Dependencies
300330
id: depends
301331
run: |
@@ -325,6 +355,12 @@ jobs:
325355
id: checkout
326356
uses: actions/checkout@v4
327357

358+
- name: ccache
359+
uses: hendrikmuhs/ccache-action@v1.2.16
360+
with:
361+
key: ubuntu-22-cmake-vulkan
362+
evict-old-files: 1d
363+
328364
- name: Dependencies
329365
id: depends
330366
run: |
@@ -364,6 +400,12 @@ jobs:
364400
sudo apt-get update
365401
sudo apt-get install -y build-essential git cmake rocblas-dev hipblas-dev
366402
403+
- name: ccache
404+
uses: hendrikmuhs/ccache-action@v1.2.16
405+
with:
406+
key: ubuntu-22-cmake-hip
407+
evict-old-files: 1d
408+
367409
- name: Build with native CMake HIP support
368410
id: cmake_build
369411
run: |
@@ -396,6 +438,12 @@ jobs:
396438
apt-get update
397439
apt-get install -y build-essential git cmake libcurl4-openssl-dev
398440
441+
- name: ccache
442+
uses: hendrikmuhs/ccache-action@v1.2.16
443+
with:
444+
key: ubuntu-22-cmake-musa
445+
evict-old-files: 1d
446+
399447
- name: Build with native CMake MUSA support
400448
id: cmake_build
401449
run: |
@@ -435,6 +483,12 @@ jobs:
435483
id: checkout
436484
uses: actions/checkout@v4
437485

486+
- name: ccache
487+
uses: hendrikmuhs/ccache-action@v1.2.16
488+
with:
489+
key: ubuntu-22-cmake-sycl
490+
evict-old-files: 1d
491+
438492
- name: Build
439493
id: cmake_build
440494
run: |
@@ -479,6 +533,12 @@ jobs:
479533
id: checkout
480534
uses: actions/checkout@v4
481535

536+
- name: ccache
537+
uses: hendrikmuhs/ccache-action@v1.2.16
538+
with:
539+
key: ubuntu-22-cmake-sycl-fp16
540+
evict-old-files: 1d
541+
482542
- name: Build
483543
id: cmake_build
484544
run: |
@@ -500,6 +560,12 @@ jobs:
500560
id: checkout
501561
uses: actions/checkout@v4
502562

563+
- name: ccache
564+
uses: hendrikmuhs/ccache-action@v1.2.16
565+
with:
566+
key: macOS-latest-cmake-ios
567+
evict-old-files: 1d
568+
503569
- name: Dependencies
504570
id: depends
505571
continue-on-error: true
@@ -531,6 +597,12 @@ jobs:
531597
id: checkout
532598
uses: actions/checkout@v4
533599

600+
- name: ccache
601+
uses: hendrikmuhs/ccache-action@v1.2.16
602+
with:
603+
key: macOS-latest-cmake-tvos
604+
evict-old-files: 1d
605+
534606
- name: Dependencies
535607
id: depends
536608
continue-on-error: true
@@ -566,6 +638,12 @@ jobs:
566638
id: checkout
567639
uses: actions/checkout@v4
568640

641+
- name: ccache
642+
uses: hendrikmuhs/ccache-action@v1.2.16
643+
with:
644+
key: macOS-latest-swift
645+
evict-old-files: 1d
646+
569647
- name: Dependencies
570648
id: depends
571649
continue-on-error: true
@@ -607,6 +685,12 @@ jobs:
607685
- name: Clone
608686
uses: actions/checkout@v4
609687

688+
- name: ccache
689+
uses: hendrikmuhs/ccache-action@v1.2.16
690+
with:
691+
key: windows-msys2
692+
evict-old-files: 1d
693+
610694
- name: Setup ${{ matrix.sys }}
611695
uses: msys2/setup-msys2@v2
612696
with:
@@ -675,6 +759,12 @@ jobs:
675759
with:
676760
fetch-depth: 0
677761

762+
- name: ccache
763+
uses: hendrikmuhs/ccache-action@v1.2.16
764+
with:
765+
key: windows-latest-cmake-${{ matrix.build }}
766+
evict-old-files: 1d
767+
678768
- name: Clone Kompute submodule
679769
id: clone_kompute
680770
if: ${{ matrix.build == 'kompute-x64' }}
@@ -813,6 +903,8 @@ jobs:
813903
- name: Clone
814904
id: checkout
815905
uses: actions/checkout@v4
906+
with:
907+
fetch-depth: 0
816908

817909
- name: Install dependencies
818910
env:
@@ -821,6 +913,12 @@ jobs:
821913
apt update
822914
apt install -y cmake build-essential ninja-build libgomp1 git
823915
916+
- name: ccache
917+
uses: hendrikmuhs/ccache-action@v1.2.16
918+
with:
919+
key: ubuntu-latest-cmake-cuda
920+
evict-old-files: 1d
921+
824922
- name: Build with CMake
825923
run: |
826924
cmake -S . -B build -G Ninja \
@@ -847,6 +945,12 @@ jobs:
847945
with:
848946
fetch-depth: 0
849947

948+
- name: Install ccache
949+
uses: hendrikmuhs/ccache-action@v1.2.16
950+
with:
951+
key: ${{ github.job }}-${{ matrix.cuda }}-${{ matrix.build }}
952+
evict-old-files: 1d
953+
850954
- name: Install Cuda Toolkit 11.7
851955
if: ${{ matrix.cuda == '11.7' }}
852956
run: |
@@ -903,11 +1007,6 @@ jobs:
9031007
echo "CUDA_PATH=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
9041008
echo "CUDA_PATH_V12_4=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
9051009
906-
- name: Install ccache
907-
uses: hendrikmuhs/ccache-action@v1.2
908-
with:
909-
key: ${{ github.job }}-${{ matrix.cuda }}-${{ matrix.build }}
910-
9111010
- name: Install Ninja
9121011
id: install_ninja
9131012
run: |
@@ -987,6 +1086,12 @@ jobs:
9871086
with:
9881087
fetch-depth: 0
9891088

1089+
- name: ccache
1090+
uses: hendrikmuhs/ccache-action@v1.2.16
1091+
with:
1092+
key: windows-latest-cmake-sycl
1093+
evict-old-files: 1d
1094+
9901095
- name: Install
9911096
run: |
9921097
scripts/install-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_DPCPP_MKL
@@ -1066,9 +1171,10 @@ jobs:
10661171
& 'C:\Program Files\AMD\ROCm\*\bin\clang.exe' --version
10671172
10681173
- name: Install ccache
1069-
uses: hendrikmuhs/ccache-action@v1.2
1174+
uses: hendrikmuhs/ccache-action@v1.2.16
10701175
with:
10711176
key: ${{ github.job }}
1177+
evict-old-files: 1d
10721178

10731179
- name: Build
10741180
id: cmake_build
@@ -1098,6 +1204,12 @@ jobs:
10981204
with:
10991205
fetch-depth: 0
11001206

1207+
- name: ccache
1208+
uses: hendrikmuhs/ccache-action@v1.2.16
1209+
with:
1210+
key: windows-latest-cmake-hip-release
1211+
evict-old-files: 1d
1212+
11011213
- name: Install
11021214
id: depends
11031215
run: |
@@ -1195,6 +1307,12 @@ jobs:
11951307
- name: Clone
11961308
uses: actions/checkout@v4
11971309

1310+
- name: ccache
1311+
uses: hendrikmuhs/ccache-action@v1.2.16
1312+
with:
1313+
key: android-build
1314+
evict-old-files: 1d
1315+
11981316
- name: Set up JDK
11991317
uses: actions/setup-java@v3
12001318
with:
@@ -1232,6 +1350,12 @@ jobs:
12321350
with:
12331351
fetch-depth: 0
12341352

1353+
- name: ccache
1354+
uses: hendrikmuhs/ccache-action@v1.2.16
1355+
with:
1356+
key: release
1357+
evict-old-files: 1d
1358+
12351359
- name: Determine tag name
12361360
id: tag
12371361
shell: bash

0 commit comments

Comments
 (0)