Use ccache in CI

This commit is contained in:
Cheng
2025-07-24 15:39:09 +09:00
parent dd6beb0a4a
commit 1ae2f817bf
2 changed files with 25 additions and 2 deletions

View File

@@ -113,6 +113,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
)