mirror of
https://github.com/ml-explore/mlx.git
synced 2025-10-20 01:18:12 +08:00
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:
3
setup.py
3
setup.py
@@ -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
|
||||
)
|
||||
|
Reference in New Issue
Block a user