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

Add github action to build and publish wheels #517

Merged
merged 21 commits into from
Mar 7, 2022

Conversation

hardbyte
Copy link
Collaborator

@hardbyte hardbyte commented Feb 28, 2022

Adds a Github Actions workflow to build and optionally publish binary artifacts for major operating systems and Python versions using cibuildwheel.

The action very much follows the example from the cibuildwheel docs - https://cibuildwheel.readthedocs.io/en/stable/setup/#github-actions

The publish step only runs when it sees a tag that starts with v - then this step will publish all the artifacts to pypi. Note there is already a repository secret in this github repo with a tightly scoped PYPI api token that is allowed to upload packages for just anonlink.

You can see the working Github Action here.

I suggest removing the azure build wheel steps - I can do that in this PR if you like?

@hardbyte hardbyte marked this pull request as ready for review February 28, 2022 23:54
@hardbyte hardbyte force-pushed the feature/cibuildwheel-with-github-action branch from 86efe67 to 9dc6c8f Compare February 28, 2022 23:54
@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #517 (ebf4d7c) into main (e2a3322) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #517   +/-   ##
=======================================
  Coverage   94.22%   94.22%           
=======================================
  Files          16       16           
  Lines         797      797           
=======================================
  Hits          751      751           
  Misses         46       46           

Copy link
Collaborator

@wilko77 wilko77 left a comment

Choose a reason for hiding this comment

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

Nice job.

@@ -0,0 +1,54 @@
name: Build and upload to PyPI

on: [push, pull_request]
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we really need to do this on every push? It's about 30 minutes of building wheels and we use the resources for free.
I'm leaning towards building for every pull request and release.
Did you know that github action can be triggered on release?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh I didn't know that about releases - will add.

Agree, we could be more conscientious of the generous free resources github actions is allowing us to use - will change to run on PR and release.

.github/workflows/build_wheels.yml Show resolved Hide resolved
@hardbyte hardbyte merged commit d660e47 into main Mar 7, 2022
@hardbyte hardbyte deleted the feature/cibuildwheel-with-github-action branch March 7, 2022 08:41
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.

None yet

2 participants