Skip to content

Add GitHub Binary Release Pipeline for RustPython#5456

Merged
youknowone merged 10 commits into
RustPython:mainfrom
theshubhamp:gh-rel-rustpython
Dec 28, 2024
Merged

Add GitHub Binary Release Pipeline for RustPython#5456
youknowone merged 10 commits into
RustPython:mainfrom
theshubhamp:gh-rel-rustpython

Conversation

@theshubhamp

@theshubhamp theshubhamp commented Dec 7, 2024

Copy link
Copy Markdown
Contributor

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

@youknowone youknowone left a comment

Copy link
Copy Markdown
Member

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.

Comment thread .github/workflows/release.yml Outdated
if: runner.os != 'macOS'

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@theshubhamp

Copy link
Copy Markdown
Contributor Author

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

@youknowone youknowone left a comment

Copy link
Copy Markdown
Member

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.

Comment thread .github/workflows/release.yml Outdated
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@youknowone youknowone left a comment

Copy link
Copy Markdown
Member

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