-
Notifications
You must be signed in to change notification settings - Fork 196
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
Release Workflow: multiple py versions and arm #678
Conversation
5611f73
to
c1d6eae
Compare
pyproject.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[project] | |||
name = "polyglot_piranha" | |||
requires-python = ">=3.7" | |||
requires-python = ">=3.8" | |||
description = "Polyglot Piranha is a library for performing structural find and replace with deep cleanup." | |||
authors = [ | |||
{ name = "Ameya Ketkar", email = "ketkara@uber.com" }, |
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.
While we are here, maybe remove these two author entries since the emails don't work.
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.
Looks great, thank you very much!
run: | | ||
pip install --upgrade maturin | ||
- name: Build wheel with Maturin linux x86 | ||
if: ${{ matrix.os == 'ubuntu-20.04' }} | ||
run: | | ||
maturin build --release -o dist |
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.
Why does this not specify a python version?
matrix: | ||
os: [ubuntu-latest, ubuntu-20.04, macos-latest] | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] | ||
runs-on: ${{ matrix.os }} |
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.
We could maybe use this: fromJSON('{"linux-x86": "ubuntu-20.04", "linux-arm": "ubuntu-latest", "macos": "macos-latest"}')[matrix.target]
And lets add a comment saying "We suspect we need 20.04 due to glibc not being new enough on Debian/devpod."
release: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, ubuntu-20.04, macos-latest] |
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.
how about having a target here instead of the OS? because that's what we are really trying to have a matrix for: linux-x86, linux-arm, macos-arm
.
run: | | ||
pip install --upgrade maturin | ||
- name: Build wheel with Maturin linux x86 | ||
if: ${{ matrix.os == 'ubuntu-20.04' }} | ||
run: | | ||
maturin build --release -o dist | ||
maturin build --sdist -o dist |
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.
Lets maybe have a separate step for the source distribution? It doesn't seem like it belongs with Linux x86 necessarily.
If we do that, we can combine all matrin steps (other than src) into one.
b7db090
to
e6ba923
Compare
- name: Build wheel with Maturin ${{ matrix.target }} | ||
run: | | ||
maturin build --release -o dist --target ${{ fromJSON('{"linux-x86":"x86_64-unknown-linux-gnu","linux-arm":"aarch64-unknown-linux-gnu","macos-arm":"universal2-apple-darwin"}')[matrix.target] }} -i ${{ matrix.python-version }} | ||
- name: Build source distribution |
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.
Maybe say "Build source distribution (only once)" or add a comment next to the if to say why we are doing this only once.
Using a matrix strategy in the "Release Polyglot Piranha" workflows jobs to change python versions within [3.8; 3.12].
Moreover, adding more jobs to release for linux and macos ARM.
Successful execution of the workflow: https://github.com/uber/piranha/actions/runs/9909648923
Successful release of wheels in TestPyPi: https://test.pypi.org/project/polyglot-piranha-test/0.3.253a0/#files