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 riscv64-linux support #491

Merged
merged 1 commit into from
Jan 14, 2025
Merged

Add riscv64-linux support #491

merged 1 commit into from
Jan 14, 2025

Conversation

Xeonacid
Copy link
Contributor

Added separate Dockerfiles for riscv64 as suggested by #219 (comment).

RISC-V needs atomic linked which is added to LINUX_ALLOW_SYSTEM_LIBRARIES.

Tested locally with ./build-linux.py --target-triple riscv64-unknown-linux-gnu --python cpython-{3.9,3.10,3.11,3.12,3.13,3.14} and all build fine.

CI is added but not tested yet. I'd like the PR to test itself :P

Closes #388

@zanieb zanieb added platform:linux Specific to the Linux platform arch:riscv64 labels Jan 10, 2025
@zanieb zanieb self-requested a review January 10, 2025 05:13
@Xeonacid
Copy link
Contributor Author

The CI check is finished but no linux build. Am I doing anything wrong? Or is there anyway I can trigger it? 🤔

@zanieb
Copy link
Member

zanieb commented Jan 10, 2025

Thanks for the pull request & welcome to the project!

The error is in the GitHub Actions panel 😭

linux: Strategy expansion exceeded 256 results for job 'build'

We've hit the GitHub limit for a matrix. This reveals my main concern about this change — this project already builds and publishes a lot of artifacts and there needs to be clear demand for additions.

@zanieb
Copy link
Member

zanieb commented Jan 10, 2025

Regarding the GitHub matrix limit.. we're bound to encounter this regardless. We'll need to add some sort of matrix sharding anyway.

@zanieb
Copy link
Member

zanieb commented Jan 10, 2025

I implemented sharding, but also added the requisite labels to your pull request to run a subset of our CI matrix.

@Xeonacid
Copy link
Contributor Author

We've hit the GitHub limit for a matrix. This reveals my main concern about this change — this project already builds and publishes a lot of artifacts and there needs to be clear demand for additions.

We are Arch Linux RISC-V packagers. Some packages, like bazel and uv, require a python-build-standalone artifact when building or testing. Adding the riscv64 architecture for this project would be a great help for our packaging!

@Xeonacid Xeonacid force-pushed the riscv64 branch 2 times, most recently from d9b0285 to 3246faa Compare January 11, 2025 05:17
@@ -52,6 +52,7 @@
TARGETS_CONFIG = SUPPORT / "targets.yml"

LINUX_ALLOW_SYSTEM_LIBRARIES = {
"atomic",
Copy link
Member

Choose a reason for hiding this comment

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

@zanieb
Copy link
Member

zanieb commented Jan 13, 2025

We'll discuss whether or not we're comfortable maintaining this as a team and get back to you.

@Xeonacid
Copy link
Contributor Author

We'll discuss whether or not we're comfortable maintaining this as a team and get back to you.

Hoping for good news!

Adding RISC-V support is a forward-looking investment, as its open-source architecture and rapidly growing ecosystem position it to surpass like PPC and s390x, ensuring broader adoption and future-proofing the project.

I'd like to (co-)maintain the riscv architecture if it is an option for you.

Added separate Dockerfiles for riscv64 as suggested by #219 (comment).

RISC-V needs `atomic` linked which is added to `LINUX_ALLOW_SYSTEM_LIBRARIES`.

Tested locally with `./build-linux.py --target-triple riscv64-unknown-linux-gnu --python cpython-{3.9,3.10,3.11,3.12,3.13,3.14}` and all build fine.
Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution :)

@zanieb zanieb merged commit 62f1b03 into astral-sh:main Jan 14, 2025
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch:riscv64 platform:linux Specific to the Linux platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add RISC-V builds
2 participants