Skip to content

Commit 8707d59

Browse files
ochafikmglambda
authored andcommitted
ci: use sccache on windows instead of ccache (ggml-org#11545)
* Use sccache on ci for windows * Detect sccache in cmake
1 parent de5507c commit 8707d59

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,7 @@ jobs:
689689
uses: hendrikmuhs/[email protected]
690690
with:
691691
key: windows-msys2
692+
variant: sccache
692693
evict-old-files: 1d
693694

694695
- name: Setup ${{ matrix.sys }}
@@ -763,6 +764,7 @@ jobs:
763764
uses: hendrikmuhs/[email protected]
764765
with:
765766
key: windows-latest-cmake-${{ matrix.build }}
767+
variant: sccache
766768
evict-old-files: 1d
767769

768770
- name: Clone Kompute submodule
@@ -949,6 +951,7 @@ jobs:
949951
uses: hendrikmuhs/[email protected]
950952
with:
951953
key: ${{ github.job }}-${{ matrix.cuda }}-${{ matrix.build }}
954+
variant: sccache
952955
evict-old-files: 1d
953956

954957
- name: Install Cuda Toolkit 11.7
@@ -1090,6 +1093,7 @@ jobs:
10901093
uses: hendrikmuhs/[email protected]
10911094
with:
10921095
key: windows-latest-cmake-sycl
1096+
variant: sccache
10931097
evict-old-files: 1d
10941098

10951099
- name: Install
@@ -1174,6 +1178,7 @@ jobs:
11741178
uses: hendrikmuhs/[email protected]
11751179
with:
11761180
key: ${{ github.job }}
1181+
variant: sccache
11771182
evict-old-files: 1d
11781183

11791184
- name: Build
@@ -1208,6 +1213,7 @@ jobs:
12081213
uses: hendrikmuhs/[email protected]
12091214
with:
12101215
key: windows-latest-cmake-hip-release
1216+
variant: sccache
12111217
evict-old-files: 1d
12121218

12131219
- name: Install

ggml/src/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,18 @@ endif()
9393

9494
if (GGML_CCACHE)
9595
find_program(GGML_CCACHE_FOUND ccache)
96+
find_program(GGML_SCCACHE_FOUND sccache)
9697

97-
if (GGML_CCACHE_FOUND)
98+
if (GGML_CCACHE_FOUND OR GGML_SCCACHE_FOUND)
99+
if(GGML_CCACHE_FOUND)
100+
set(GGML_CCACHE_VARIANT ccache)
101+
else()
102+
set(GGML_CCACHE_VARIANT sccache)
103+
endif()
98104
# TODO: should not be set globally
99-
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
105+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${GGML_CCACHE_VARIANT}")
100106
set(ENV{CCACHE_SLOPPINESS} time_macros)
101-
message(STATUS "ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.")
107+
message(STATUS "${GGML_CCACHE_VARIANT} found, compilation results will be cached. Disable with GGML_CCACHE=OFF.")
102108
else()
103109
message(STATUS "Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF")
104110
endif ()

0 commit comments

Comments
 (0)