ci: build and publish musllinux wheels - #528
Open
philomath213 wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #524 (docs only). That pull request adds the platform table this change extends.
Issue #526 shows the problem. We publish glibc wheels only. On musl-based distributions,
pip install tensealfinds no wheel and builds from source instead.1. Publish musllinux wheels. Add
musllinux_x86_64to the matrix intests.ymlandpublish_wheels.yml, and pinCIBW_MUSLLINUX_X86_64_IMAGE: musllinux_1_2. The image has the same toolchain as manylinux, so the build needs no other change.2. Link SEAL one time in the C++ test binary.
cmake/tests.cmakelinked the staticseallibrary intotenseal_tests. It also linkedlibtenseal.so, which contains the same static SEAL. The test binary then held two copies of SEAL's global memory pool. Both copies are destroyed at exit, and the second destruction reads freed memory:glibc hides this, because the executable's symbols have priority over the shared library's symbols. musl keeps both copies. The bug is old. This pull request is the first change that runs the C++ tests on musl.
3. Bound make parallelism. The fix above removed a build-graph edge, so
make -jstarted 44 compilers instead of 31. The largest translation unit needs more than 1 GB, and the burst killed the runner. Both the Linux and the macOS commands now usemake -j4.All 17 jobs pass. The musl cp314 cell changed from a segfault to a pass. macOS returned to 22 minutes from 39 minutes.
Cost: each matrix increases from 12 to 16 cells.
Follow-up, not in this pull request:
${SOURCES}is compiled three times. AnOBJECTlibrary shared by the three targets would remove about a third of the compile work.