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 a GitHub Actions workflow for automatically publishing releases to PyPI #141

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

anoadragon453
Copy link
Member

@anoadragon453 anoadragon453 commented Apr 15, 2024

This CI workflow was generated by running maturin generate-ci github (how handy!). But did require a bit of finagling to satisfy the dependency on OpenSSL (boo!). Specifically, I ran into sfackler/rust-openssl#2036 (comment). I also found that I needed to set the vendored feature flag on the openssl dependency in order to get building on Linux working.

To authorise to PyPI, we ended up using PyPI's Trusted Publishers feature, which the maturin publish command supports out of the box. This involved configuring this repo and workflow name in PyPI, and then removing the env: MATURIN_PYPI_TOKEN line from the generated CI config (solution referenced here).

I haven't tested this, but given that the config came from the maturin command directly, I have fairly high confidence. After this merges, I'll run the workflow manually on the v0.1.4 tag.

@anoadragon453 anoadragon453 requested a review from a team as a code owner April 15, 2024 13:00
@anoadragon453 anoadragon453 marked this pull request as draft April 15, 2024 13:08
@anoadragon453 anoadragon453 force-pushed the anoa/pypi_ci branch 3 times, most recently from 6f7be65 to 36eb1cf Compare April 16, 2024 14:08
@anoadragon453 anoadragon453 force-pushed the anoa/pypi_ci branch 2 times, most recently from 85b1b6c to aabc5fa Compare April 16, 2024 14:38
@anoadragon453 anoadragon453 marked this pull request as ready for review April 16, 2024 14:56
.github/workflows/pypi.yaml Outdated Show resolved Hide resolved
sccache: 'true'
manylinux: auto
# BEGIN EDITED SECTION #
# Install OpenSSL development headers into the manylinux docker container
Copy link
Member

Choose a reason for hiding this comment

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

I'm a bit confused why we need to install openssl if we're using vendored openssl? In general I'd rather not use vendored openssl where possible

Copy link
Member Author

@anoadragon453 anoadragon453 Apr 29, 2024

Choose a reason for hiding this comment

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

I agree that it's not the nicest solution to vendor OpenSSL.

I've gone ahead and reverted the vendoring, and while we do install libssl-dev and pkg-config, the openssl-sys crate continues to fail to find the headers.

And for the life of me I can't get it to find them! So very tempted to vendor here.

- runner: ubuntu-latest
target: s390x
- runner: ubuntu-latest
target: ppc64le
Copy link
Member

Choose a reason for hiding this comment

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

Do we really want to build wheels for all these targets?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point - I think we can safely drop s390x and ppc64le. I've done that in 6221bab.

I'm not sure whether to keep x86 around - some people may realistically still be using it.

@anoadragon453 anoadragon453 force-pushed the anoa/pypi_ci branch 7 times, most recently from b59ca20 to 5244678 Compare May 2, 2024 10:52
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.

2 participants