Skip to content

Add GitHub Binary Release Pipeline for RustPython #5456

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

Merged
merged 10 commits into from
Dec 28, 2024

Conversation

theshubhamp
Copy link
Contributor

@theshubhamp theshubhamp commented Dec 7, 2024

Add Release Pipeline for RustPython. Pipeline is currently configured to cut a new release on every merge to main.

Sample Release: https://github.com/theshubhamp/RustPython/releases/tag/2024-12-07-gh-rel-rustpython-11
image

Sample Build: https://github.com/theshubhamp/RustPython/actions/runs/12212320619
image

Validated to run on Linux / Fedora:
image

Issue #5440

@theshubhamp theshubhamp mentioned this pull request Dec 7, 2024
Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

Thank you so much! This is very helpful. I have a little concern about confusing binary names. Please check the comment.

if: runner.os != 'macOS'

- name: Rename Binary
run: cp target/release/rustpython target/release/rustpython-release-${{ matrix.os }}
Copy link
Member

Choose a reason for hiding this comment

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

The OS name is not enough to identify binary target. Could you please also add architecture names to the binary too?

e.g. macOS version can be either x86_64 or aarch64 unless universal build. Linux version can be a lot more variant. Windows version can be x86, x86_64 or arm64.

Here is some platform/architecture matrix
https://github.com/youknowone/python-deadlib/blob/main/.github/workflows/_crypt.yml#L20-L37

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! Overlooked this in haste

Here's the new naming: https://github.com/theshubhamp/RustPython/releases/tag/2024-12-11-gh-rel-rustpython-15
image

And the corresponding file types:
image

I added other targets too (commented out), but they need some extra work to be fully cross compile-able. Fine to do that as a follow up PR ?

@theshubhamp
Copy link
Contributor Author

Thanks for your review @youknowone! I have pushed some new changes. PTAL

@theshubhamp
Copy link
Contributor Author

@youknowone could you re-review when you get some time? Thanks!

Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

Thank you so much for reminding me, and sorry for being late.

run: cp target/${{ matrix.platform.target }}/release/rustpython target/rustpython-release-${{ runner.os }}-${{ matrix.platform.target }}
if: runner.os != 'Windows'
- name: Rename Binary
run: cp target/${{ matrix.platform.target }}/release/rustpython.exe target/rustpython-release-${{ runner.os }}-${{ matrix.platform.target }}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
run: cp target/${{ matrix.platform.target }}/release/rustpython.exe target/rustpython-release-${{ runner.os }}-${{ matrix.platform.target }}
run: cp target/${{ matrix.platform.target }}/release/rustpython.exe target/rustpython-release-${{ runner.os }}-${{ matrix.platform.target }}.exe

maybe this is missing

Copy link
Member

Choose a reason for hiding this comment

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

Changing this may break Uploading artifact step.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apologies for being late.

Thanks for pointing this out! I had assumed this would be run via the shell so should be okay. But good to keep .exe for portability

Made the change:

  1. https://github.com/theshubhamp/RustPython/releases/tag/2024-12-26-gh-rel-rustpython-16
  2. https://github.com/theshubhamp/RustPython/actions/runs/12505126506/job/34888223838

image

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@theshubhamp
Copy link
Contributor Author

@youknowone thank you for the review. Could you recheck ?

Copy link
Member

@youknowone youknowone left a comment

Choose a reason for hiding this comment

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

Looks perfect, thank you so much!

@youknowone youknowone merged commit 646cc81 into RustPython:main Dec 28, 2024
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