Skip to content

ci: use sccache on windows instead of ccache #11545

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 31, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ jobs:
uses: hendrikmuhs/[email protected]
with:
key: windows-msys2
variant: sccache
evict-old-files: 1d

- name: Setup ${{ matrix.sys }}
Expand Down Expand Up @@ -763,6 +764,7 @@ jobs:
uses: hendrikmuhs/[email protected]
with:
key: windows-latest-cmake-${{ matrix.build }}
variant: sccache
evict-old-files: 1d

- name: Clone Kompute submodule
Expand Down Expand Up @@ -949,6 +951,7 @@ jobs:
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.cuda }}-${{ matrix.build }}
variant: sccache
evict-old-files: 1d

- name: Install Cuda Toolkit 11.7
Expand Down Expand Up @@ -1090,6 +1093,7 @@ jobs:
uses: hendrikmuhs/[email protected]
with:
key: windows-latest-cmake-sycl
variant: sccache
evict-old-files: 1d

- name: Install
Expand Down Expand Up @@ -1174,6 +1178,7 @@ jobs:
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}
variant: sccache
evict-old-files: 1d

- name: Build
Expand Down Expand Up @@ -1208,6 +1213,7 @@ jobs:
uses: hendrikmuhs/[email protected]
with:
key: windows-latest-cmake-hip-release
variant: sccache
evict-old-files: 1d

- name: Install
Expand Down
12 changes: 9 additions & 3 deletions ggml/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,18 @@ endif()

if (GGML_CCACHE)
find_program(GGML_CCACHE_FOUND ccache)
find_program(GGML_SCCACHE_FOUND sccache)

if (GGML_CCACHE_FOUND)
if (GGML_CCACHE_FOUND OR GGML_SCCACHE_FOUND)
if(GGML_CCACHE_FOUND)
set(GGML_CCACHE_VARIANT ccache)
else()
set(GGML_CCACHE_VARIANT sccache)
endif()
# TODO: should not be set globally
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${GGML_CCACHE_VARIANT}")
set(ENV{CCACHE_SLOPPINESS} time_macros)
message(STATUS "ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.")
message(STATUS "${GGML_CCACHE_VARIANT} found, compilation results will be cached. Disable with GGML_CCACHE=OFF.")
else()
message(STATUS "Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF")
endif ()
Expand Down
Loading