-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
Hi there.
Recently, riscv64 (rv64) has gained widespread adoption, with distributions like Fedora, Debian, and Ubuntu all announcing support for rv64. I noticed that we haven't yet released pre-built artifacts for rv64, so I'm raising this PR.
1. Upstream Dependency Status
For one of our upstream dependencies, sccache, I've already submitted a PR to support rv64, which has been merged and is awaiting release. I haven't yet identified any other upstreams that would require rv64 support and block our CI. If there are any, please @ me directly—I'm happy to continue contributing rv64 support directly to upstream projects.
2. CI Action Runners
Currently, GitHub Actions does not yet support rv64 runners. However, RISE provides a method to run rv64 runners in GitHub Actions. Details can be found here.
In short, the link provides a way to run self-hosted rv64 action runners. After simple registration, we can use rv64 runners to execute our CI.
Regarding this runner, I have a few additional points to note:
- I am not the maintainer/administrator of this runner
- I strongly recommend reading the documentation thoroughly
- The default approved runner seems to have only a 90-day lifespan, but if this repository decides to adopt the runner long-term, you can contact the runner maintainers directly—they'll be happy to modify this setting and provide relevant support
- The runner runs inside a container with Ubuntu 24.04 as the OS and glibc version 2.39
I applied for a runner in my own fork and conducted simple tests, which showed everything working well.
3. Testing Notes
Below, I'll briefly introduce my testing steps, environment, and results.
To simplify the rv64 scenario, I extracted build separately from .github/workflows/CICD.yml and placed it in .github/workflows/riscv64.yml. This file only builds for riscv64. The Milk-V Pioneer Box inside is the tag label of the approved runner. It doesn't necessarily have to be this one—it depends on the tag registered for your approved runner. Mine specifically is shown below:
Since sccache hasn't been released yet, I've temporarily disabled sccache here.
Building coreutils went smoothly. However, during testing, some tests failed on rv64. Since I'm not very familiar with Rust, I chose to ignore these tests. The specific modifications can be viewed in the last two commits of feat/riscv64.
After completing these modifications, I ran the CI in my own fork, and the results showed everything went smoothly. Details can be found here.
4. Testing/Developing coreutils on riscv64
If maintainers don't currently have rv64 hardware on hand, this might help. However, I'd recommend contacting the maintainers there directly after reading the documentation and expressing that coreutils wants to add rv64 support—I believe they'll be very willing to assist coreutils.
5. Summary
Overall, I believe we can easily add rv64 support to coreutils. Since I think more thorough discussion will be more conducive to PR merging, I haven't submitted it yet. Once we reach more consensus, I'll raise the PR as soon as possible.
That's all. If there are any questions, please @ me directly. I'm happy to answer all questions.
Other Info
Co-authored by: nijincheng@iscas.ac.cn;