-
Notifications
You must be signed in to change notification settings - Fork 92
Build wheels across Python 3.9–3.11 for Linux, macOS, and Windows #1077
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
Conversation
4fa4f41 to
2915edb
Compare
|
Hi @ReeceHumphreys , Apologies for jumping in on this review, but thank you very much for your efforts on this! I wanted to just recommend the following option, since in my previous experience it greatly reduced the size of the compiled Basilisk wheel file for Linux (down to ~200MB): Also, you're probably already aware, but you can run tests directly after building each wheel to ensure they install and run correctly. For example: |
|
Howdy @dpad , good to hear from you. @ReeceHumphreys just joined my lab this fall and has excellent software development skills. He is helping me get these pip wheels onto PyPi and improve the CI test build scripts. We appreciate any feedback or suggestions you want to share. |
Hello @dpad! Thanks for the suggestion! I did notice that the Linux wheels were fairly large during testing, but I haven’t looked into it yet since I’ve mainly been testing on macOS and Windows. Once I move on to Linux testing, I’ll incorporate your suggestion and verify everything still works as expected.
This is essentially how I have been testing the wheels myself locally! I am not sure yet if it needs to be a part of our CI/CD pipeline as we already test all of the code across all OSes as part of another workflow. Once the wheel builds are working fully as expected adding this to the CI would do is be verifying is that This feels like we would be verifying |
72352ab to
9dd7f07
Compare
|
Here is a test of the workflow that I triggered. Looks like all of the wheels are much more reasonable in size after an optimization pass. Linux is now around 75 MB per wheel: |
33d0a3a to
2b5a741
Compare
2b5a741 to
e07c87d
Compare
280516e to
3ea0483
Compare
schaubh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great changes. I like how you refactored the commit to make the review much easier. Good work :-)
System setup needs to occur both for building bsk when peforming PR testing AND when building wheels. To avoid code duplication this setup has been moved to its own composite action.
Create an sdist and add a step to publish wheels in the workflow
- Tags starting with v* (e.g., v2.3.1) publish to PyPI’s main
index.
- Tags starting with test* publish to PyPI’s test index.
The version bump script was also updated to export the new
version to GitHub runners, enabling automatic tagging on patch
releases. This ensures PyPI releases are triggered on merge.
The built windows wheels did not contain all of the necessary dlls to run. This commit ensures the built wheels contains them.
PyPi requires that files are below 100 MB. If we include docs, examples, and tests we will exceed this limit. As such, we remove these files from the sdist artifact as they are not necessary for performing a build of bsk.
Update test to source ONNX files relative to repo root instead of the Basilisk executable. Using the executable path was fragile, since BSK wheels do not ship tests or helpers.
3ea0483 to
15ea56a
Compare
Description
This PR adds a new workflow which uses
cibuildwheelto build wheels for multiple python versions across a variety of operating systems.Verification
I temporarily had the workflow execute on pushes to this brach for testing. Here is a link which shows the bundled wheels for each os:
https://github.com/AVSLab/basilisk/actions/runs/17392301611
NOTE: Some of these wheel distributions do not include all of our "supported" Python versions. For example, we technically support Python 3.8 on macOS but the ARM builds of wheels require at least python 3.9.
Documentation
N/A
Future work
Publish these wheels whenever we release a new version to PyPI.