Build wheels for BIOM and modernize package metadata#996
Build wheels for BIOM and modernize package metadata#996wasade merged 28 commits intobiocore:masterfrom
Conversation
|
Do we need to build per PR? We have limited GitHub Action cycles, and it looks to add a lot of time to CI. Why not just at release? |
|
@wasade I suppose it isn't necessary to run for every single PR. We could only build wheels on release, but there might be build issues that aren't caught which are introduced between releases. I think maybe a middle path could be to build wheels on releases, and also build wheels on PR's which affect any files related to the build process ( |
|
I think that's a great idea |
|
@wasade @mataton Regarding macos version: |
This PR builds off of the work done by @schlich in PR #994 . Thank you for the initial effort! The work has been expanded to further fit the build requirements of the scikit-bio team.
There is still some ironing out of details, and general cleanup, but it should be more or less functional at this point.
Wheels are built on every pull request, but only published on pushes with tagged commits (releases).
The workflow builds the wheels, then installs the package from the wheel and runs unit tests to ensure that the code from the wheel works as intended.
UPDATE:
This should be good to go now. Here's what I've done:
wheels.yml
This file contains code for building source distributions and wheels, as well as publishing them to PyPI. The workflow is triggered like so:
meaning it will trigger on PR's, and can also be triggered manually (
workflow_dispatch) or by other workflows (workflow_call). This is important because therelease.ymlfile calls thewheels.ymlworkflow.In the wheels workflow, wheels are built and then unit tests are run against the wheels to ensure everything works correctly.
release.yml
This file is only triggered on pushes with tagged commits (ie. releases). It will simply call the
wheels.ymlworkflow, and theupload_pypijob from that workflow will run because thisif: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')will evaluate to true.pyproject.toml
This file contains configuration options and the metadata information that was formerly stored in
setup.py.Considerations
I'm not sure if it would be better to combine the
release.ymlandwheels.ymlinto a single file. To do so all that would have to happen is add:to the
wheels.ymlfile and deleterelease.yml. For now I've kept them separate.To sum up, wheels are built on each PR to ensure they work, but things are only published on new releases.