Skip to content

chore: update cibuildwheel config #478

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 2 commits into from
Apr 5, 2024
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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if(CMakePythonDistributions_SUPERBUILD)

option(BUILD_VERBOSE "Build reporting additional information (e.g download progress, ...)" ON)

option(RUN_CMAKE_TEST "Run CMake test suite when built from sources" ON)
option(RUN_CMAKE_TEST "Run CMake test suite when built from sources" OFF)

set(RUN_CMAKE_TEST_EXCLUDE "BootstrapTest" CACHE STRING "CMake test suite exclusion regex")

Expand Down
34 changes: 19 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,31 +70,35 @@ test-extras = "test"
test-command = "pytest {project}/tests"
build-verbosity = 1

[tool.cibuildwheel.macos.environment]
MACOSX_DEPLOYMENT_TARGET = "10.10"

[tool.cibuildwheel.linux]
before-all = [
'./scripts/manylinux-build-and-install-openssl.sh',
]
environment = { CMAKE_ARGS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=4;link=1 -DCMAKE_CXX_STANDARD:STRING=11" }
before-all = "./scripts/manylinux-build-and-install-openssl.sh"

[[tool.cibuildwheel.overrides]]
select = ["*-manylinux_aarch64", "*-manylinux_ppc64le", "*-manylinux_s390x"]
# disable tests on those platforms, QEMU is taking to long for jobs to pass on GHA
environment = { CMAKE_ARGS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=4;link=1 -DCMAKE_CXX_STANDARD:STRING=11 -DRUN_CMAKE_TEST:BOOL=OFF" }
[tool.cibuildwheel.config-settings]
"cmake.define.RUN_CMAKE_TEST" = "ON"

[tool.cibuildwheel.linux.config-settings]
"cmake.define.OPENSSL_ROOT_DIR" = "/usr/local/ssl"
"cmake.define.CMAKE_JOB_POOL_COMPILE" = "compile"
"cmake.define.CMAKE_JOB_POOL_LINK" = "link"
"cmake.define.CMAKE_JOB_POOLS" = "compile=4;link=1"
"cmake.define.RUN_CMAKE_TEST" = "ON"

[[tool.cibuildwheel.overrides]]
select = ["*-musllinux_x86_64", "*-musllinux_i686"]
select = ["*-musllinux_*",]
inherit.config-settings = "append"
# disable some tests
# - BootstrapTest fails with custom OpenSSL and probably does not make much sense for this project
# - ExportImport|RunCMake.install|RunCMake.file-GET_RUNTIME_DEPENDENCIES: c.f. https://discourse.cmake.org/t/cmake-test-suite-failing-on-alpine-linux/5064
environment = { CMAKE_ARGS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=4;link=1 -DRUN_CMAKE_TEST_EXCLUDE:STRING='BootstrapTest|ExportImport|RunCMake.install|RunCMake.RuntimePath|RunCMake.file-GET_RUNTIME_DEPENDENCIES'" }
config-settings."cmake.define.RUN_CMAKE_TEST_EXCLUDE" = "BootstrapTest|ExportImport|RunCMake.install|RunCMake.RuntimePath|RunCMake.file-GET_RUNTIME_DEPENDENCIES"

[[tool.cibuildwheel.overrides]]
select = ["*-musllinux_aarch64", "*-musllinux_ppc64le", "*-musllinux_s390x"]
select = ["*linux_aarch64", "*linux_ppc64le", "*linux_s390x"]
inherit.config-settings = "append"
# disable tests on those platforms, QEMU is taking to long for jobs to pass on GHA
environment = { CMAKE_ARGS = "-DOPENSSL_ROOT_DIR:PATH=/usr/local/ssl -DCMAKE_JOB_POOL_COMPILE:STRING=compile -DCMAKE_JOB_POOL_LINK:STRING=link -DCMAKE_JOB_POOLS:STRING=compile=4;link=1 -DRUN_CMAKE_TEST:BOOL=OFF" }

[tool.cibuildwheel.macos.environment]
MACOSX_DEPLOYMENT_TARGET = "10.10"
config-settings."cmake.define.RUN_CMAKE_TEST" = "OFF"


[tool.ruff]
Expand Down