Add build wheels, tarball and deploy to pypi #191
Merged
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.
This PR adds a github actions "workflow" to automate the generation of wheels thanks to cibuildwheel and the upload to pypi thanks to gh-action-pypi-publish.
This workflow is triggered when a release is published in github.
I already did the set-up to use pypi's trusted publishers. As it is you have to publish a github release on a tag starting with
v
to trigger the workflow and click on a button approve the upload to pypi. This can be more automated (e.g., upload when a tag is pushed to the repo but it makes it more sensitive to errors).It build the source distribution and wheels for Python 3.7 to 3.12 for:
universal2
, i.e.,x86_64
andarm64
x86_64
x86_64
,aarch64
andppc64le
Tests are run only on "native" architecture (i.e.,
x86_64
).It could also build for 32bits architecture on Windows and Linux but dependencies like
scipy
are not available for this architecture so it has little interest.Limitations:
ppc64le
: This can be done but not formanylinux2014
as I didn't managed to build a wheel ofnumpy
for python3.12 onppc64le
(yet?).bslz4_to_sparse
, so the solution could be to generate wheels for this project too.I tested the deployment on test.pypi.org