Use ccache in CI (#2414)

* Detect ccache

* Use ccache in CI

* Separate cache for different images

* Test both 12.2 and 12.9 for PRs
This commit is contained in:
Cheng
2025-07-29 08:43:22 +09:00
committed by GitHub
parent 641be9463b
commit 970dbe8e25
3 changed files with 38 additions and 2 deletions

View File

@@ -120,6 +120,9 @@ class CMakeBuild(build_ext):
if "CMAKE_BUILD_PARALLEL_LEVEL" not in os.environ:
build_args += [f"-j{os.cpu_count()}"]
# Avoid cache miss when building from temporary dirs.
os.environ["CCACHE_BASEDIR"] = os.path.abspath(self.build_temp)
subprocess.run(
["cmake", ext.sourcedir, *cmake_args], cwd=build_temp, check=True
)