Use ccache to speed up build
This commit is contained in:
parent
abf08d443d
commit
d77950de65
|
@ -58,6 +58,8 @@ jobs:
|
||||||
env:
|
env:
|
||||||
CIBW_PRERELEASE_PYTHONS: True
|
CIBW_PRERELEASE_PYTHONS: True
|
||||||
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
|
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}
|
||||||
|
CIBW_ENVIRONMENT: USE_CCACHE=1 CCACHE_DIR=/.ccache
|
||||||
|
CIBW_CONTAINER_ENGINE: "docker; create_args: '--volume=${{ github.workspace }}/.ccache:/.ccache'"
|
||||||
|
|
||||||
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -76,6 +76,9 @@ class ExtensionBuilder(build_ext):
|
||||||
install_dir = os.path.join(extdir, 'Coriolis')
|
install_dir = os.path.join(extdir, 'Coriolis')
|
||||||
os.makedirs(build_dir,exist_ok=True)
|
os.makedirs(build_dir,exist_ok=True)
|
||||||
|
|
||||||
|
if "USE_CCACHE" in env:
|
||||||
|
cmake_args += ["-DCMAKE_CXX_COMPILER_LAUNCHER=ccache"]
|
||||||
|
|
||||||
cmake_args += [f"-DCMAKE_MODULE_PATH={os.path.abspath('bootstrap/cmake_modules')};"
|
cmake_args += [f"-DCMAKE_MODULE_PATH={os.path.abspath('bootstrap/cmake_modules')};"
|
||||||
f"{os.path.join(install_dir, 'share/cmake/Modules')}"]
|
f"{os.path.join(install_dir, 'share/cmake/Modules')}"]
|
||||||
cmake_args += [f"-DCMAKE_INSTALL_PREFIX={install_dir}"]
|
cmake_args += [f"-DCMAKE_INSTALL_PREFIX={install_dir}"]
|
||||||
|
|
|
@ -53,6 +53,7 @@ before-all = '''
|
||||||
boost-python boost-filesystem \
|
boost-python boost-filesystem \
|
||||||
boost-regex boost-wave \
|
boost-regex boost-wave \
|
||||||
python36-devel libxml2-devel \
|
python36-devel libxml2-devel \
|
||||||
qwt-devel
|
qwt-devel \
|
||||||
|
ccache
|
||||||
'''
|
'''
|
||||||
build-verbosity=2
|
build-verbosity=2
|
||||||
|
|
Loading…
Reference in New Issue