Skip to content

Commit 106d2b3

Browse files
author
ochafik
committed
Only write ccache when pushing to master, and evict files after 12h of unused
1 parent 4d0598e commit 106d2b3

File tree

1 file changed

+44
-22
lines changed

1 file changed

+44
-22
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ jobs:
4747
uses: hendrikmuhs/[email protected]
4848
with:
4949
key: macOS-latest-cmake-arm64
50-
evict-old-files: 1d
50+
evict-old-files: 12h
51+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
5152

5253
- name: Dependencies
5354
id: depends
@@ -116,7 +117,8 @@ jobs:
116117
uses: hendrikmuhs/[email protected]
117118
with:
118119
key: macOS-latest-cmake-x64
119-
evict-old-files: 1d
120+
evict-old-files: 12h
121+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
120122

121123
- name: Dependencies
122124
id: depends
@@ -186,7 +188,8 @@ jobs:
186188
uses: hendrikmuhs/[email protected]
187189
with:
188190
key: ubuntu-cpu-cmake
189-
evict-old-files: 1d
191+
evict-old-files: 12h
192+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
190193

191194
- name: Dependencies
192195
id: depends
@@ -267,7 +270,8 @@ jobs:
267270
uses: hendrikmuhs/[email protected]
268271
with:
269272
key: ubuntu-latest-cmake-sanitizer-${{ matrix.sanitizer }}
270-
evict-old-files: 1d
273+
evict-old-files: 12h
274+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
271275

272276
- name: Dependencies
273277
id: depends
@@ -346,7 +350,8 @@ jobs:
346350
uses: hendrikmuhs/[email protected]
347351
with:
348352
key: ubuntu-latest-cmake-rpc
349-
evict-old-files: 1d
353+
evict-old-files: 12h
354+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
350355

351356
- name: Dependencies
352357
id: depends
@@ -379,7 +384,8 @@ jobs:
379384
uses: hendrikmuhs/[email protected]
380385
with:
381386
key: ubuntu-22-cmake-vulkan
382-
evict-old-files: 1d
387+
evict-old-files: 12h
388+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
383389

384390
- name: Dependencies
385391
id: depends
@@ -422,7 +428,8 @@ jobs:
422428
uses: hendrikmuhs/[email protected]
423429
with:
424430
key: ubuntu-22-cmake-hip
425-
evict-old-files: 1d
431+
evict-old-files: 12h
432+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
426433

427434
- name: Build with native CMake HIP support
428435
id: cmake_build
@@ -460,7 +467,8 @@ jobs:
460467
uses: hendrikmuhs/[email protected]
461468
with:
462469
key: ubuntu-22-cmake-musa
463-
evict-old-files: 1d
470+
evict-old-files: 12h
471+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
464472

465473
- name: Build with native CMake MUSA support
466474
id: cmake_build
@@ -505,7 +513,8 @@ jobs:
505513
uses: hendrikmuhs/[email protected]
506514
with:
507515
key: ubuntu-22-cmake-sycl
508-
evict-old-files: 1d
516+
evict-old-files: 12h
517+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
509518

510519
- name: Build
511520
id: cmake_build
@@ -553,7 +562,8 @@ jobs:
553562
uses: hendrikmuhs/[email protected]
554563
with:
555564
key: ubuntu-22-cmake-sycl-fp16
556-
evict-old-files: 1d
565+
evict-old-files: 12h
566+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
557567

558568
- name: Build
559569
id: cmake_build
@@ -578,7 +588,8 @@ jobs:
578588
uses: hendrikmuhs/[email protected]
579589
with:
580590
key: macOS-latest-cmake-ios
581-
evict-old-files: 1d
591+
evict-old-files: 12h
592+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
582593

583594
- name: Dependencies
584595
id: depends
@@ -613,7 +624,8 @@ jobs:
613624
uses: hendrikmuhs/[email protected]
614625
with:
615626
key: macOS-latest-cmake-tvos
616-
evict-old-files: 1d
627+
evict-old-files: 12h
628+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
617629

618630
- name: Dependencies
619631
id: depends
@@ -652,7 +664,8 @@ jobs:
652664
uses: hendrikmuhs/[email protected]
653665
with:
654666
key: macOS-latest-swift
655-
evict-old-files: 1d
667+
evict-old-files: 12h
668+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
656669

657670
- name: Dependencies
658671
id: depends
@@ -698,7 +711,8 @@ jobs:
698711
with:
699712
key: windows-msys2
700713
variant: sccache
701-
evict-old-files: 1d
714+
evict-old-files: 12h
715+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
702716

703717
- name: Setup ${{ matrix.sys }}
704718
uses: msys2/setup-msys2@v2
@@ -773,7 +787,8 @@ jobs:
773787
with:
774788
key: windows-latest-cmake-${{ matrix.build }}
775789
variant: sccache
776-
evict-old-files: 1d
790+
evict-old-files: 12h
791+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
777792

778793
- name: Clone Kompute submodule
779794
id: clone_kompute
@@ -925,7 +940,8 @@ jobs:
925940
uses: hendrikmuhs/[email protected]
926941
with:
927942
key: ubuntu-latest-cmake-cuda
928-
evict-old-files: 1d
943+
evict-old-files: 12h
944+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
929945

930946
- name: Build with CMake
931947
run: |
@@ -958,7 +974,8 @@ jobs:
958974
with:
959975
key: ${{ github.job }}-${{ matrix.cuda }}-${{ matrix.build }}
960976
variant: sccache
961-
evict-old-files: 1d
977+
evict-old-files: 12h
978+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
962979

963980
- name: Install Cuda Toolkit 11.7
964981
if: ${{ matrix.cuda == '11.7' }}
@@ -1100,7 +1117,8 @@ jobs:
11001117
with:
11011118
key: windows-latest-cmake-sycl
11021119
variant: sccache
1103-
evict-old-files: 1d
1120+
evict-old-files: 12h
1121+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
11041122

11051123
- name: Install
11061124
run: |
@@ -1184,7 +1202,8 @@ jobs:
11841202
uses: hendrikmuhs/[email protected]
11851203
with:
11861204
key: ${{ github.job }}
1187-
evict-old-files: 1d
1205+
evict-old-files: 12h
1206+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
11881207

11891208
- name: Build
11901209
id: cmake_build
@@ -1218,7 +1237,8 @@ jobs:
12181237
uses: hendrikmuhs/[email protected]
12191238
with:
12201239
key: windows-latest-cmake-hip-release
1221-
evict-old-files: 1d
1240+
evict-old-files: 12h
1241+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
12221242

12231243
- name: Install
12241244
id: depends
@@ -1319,7 +1339,8 @@ jobs:
13191339
uses: hendrikmuhs/[email protected]
13201340
with:
13211341
key: android-build
1322-
evict-old-files: 1d
1342+
evict-old-files: 12h
1343+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
13231344

13241345
- name: Set up JDK
13251346
uses: actions/setup-java@v3
@@ -1362,7 +1383,8 @@ jobs:
13621383
uses: hendrikmuhs/[email protected]
13631384
with:
13641385
key: release
1365-
evict-old-files: 1d
1386+
evict-old-files: 12h
1387+
save: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
13661388

13671389
- name: Determine tag name
13681390
id: tag

0 commit comments

Comments
 (0)