Skip to content
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

feat: build musllinux_1_1 wheels #193

Merged
merged 3 commits into from
Sep 25, 2021
Merged

Conversation

mayeut
Copy link
Contributor

@mayeut mayeut commented Sep 19, 2021

This adds musllinux wheel builds in CI workflows.

Still a draft while waiting for upstream cibuildwheel support

We can't use pipx install -f --pip-args="-c {project}/constraints-ci.txt" cmake on musllinux for now.
This would require installing openssl-dev as a pre-step.
With pypa/cibuildwheel#799, we could do either one of the following:

[[tool.cibuildwheel.overrides]]
build = "cp39-musllinux*"
before-all = [
    "apk install openssl-dev",
    "pipx install -f --pip-args=\"-c {project}/constraints-ci.txt\" cmake",
    "cmake --version",
    "pipx install -f --pip-args=\"-c {project}/constraints-ci.txt\" ninja",
    "ninja --version",
    "./scripts/manylinux-build-and-install-openssl.sh",
]

or using the pre-installed cmake in musllinux images:

[[tool.cibuildwheel.overrides]]
build = "cp39-musllinux*"
before-all = [
    "cmake --version",
    "pipx install -f --pip-args=\"-c {project}/constraints-ci.txt\" ninja",
    "ninja --version",
    "./scripts/manylinux-build-and-install-openssl.sh",
]

Instead, we rely on manylinux/musllinux images provided cmake, except on manylinux1 where it's not installed. We can go back to forcing a specific version of cmake once we have one batch of musllinux wheels published on PyPI.

@mayeut
Copy link
Contributor Author

mayeut commented Sep 19, 2021

We'll need to split manylinux & musllinux not to reach the 6 hours time limit with emulation: https://github.com/mayeut/cmake-python-distributions/runs/3644678256?check_suite_focus=true

@mayeut
Copy link
Contributor Author

mayeut commented Sep 20, 2021

The build for musllinux is now split on emulated platforms. Let's see how it goes: https://github.com/mayeut/cmake-python-distributions/actions/runs/1255170951
The build could also be split for i686/x86_64 to reduce build time a bit.

cibuildwheel already install the wheel before running tests.
Running test_distribution is thus not necessary in this case.
@mayeut mayeut marked this pull request as ready for review September 25, 2021 08:15
@mayeut mayeut requested a review from henryiii September 25, 2021 08:15
@mayeut
Copy link
Contributor Author

mayeut commented Sep 25, 2021

@henryiii,

we can probably merge as-is to get 3.21.3 out with musllinux support & will improve later on.

@@ -40,27 +40,47 @@ jobs:
include:
- os: ubuntu-20.04
arch: "x86_64"
build: ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines are not necessary, but no harm either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather keep this verbose/explicit but if you find it makes the workflow harder to read I'm fine removing those.

@mayeut mayeut merged commit 4bfcb02 into scikit-build:master Sep 25, 2021
@mayeut mayeut deleted the musllinux branch September 25, 2021 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants