actions / runner

The Runner for GitHub Actions :rocket:
https://github.com/features/actions
MIT License
4.79k stars 937 forks source link

Supporting runners on 64bit RISC-V #2157

Closed advancedwebdeveloper closed 1 year ago

advancedwebdeveloper commented 1 year ago

Two possible scenarios:

  1. Running on a Qemu's guest (Linux)
  2. Running on a board .
fhammerl commented 1 year ago

Hello @advancedwebdeveloper, thank you for your interest in the extension of Actions Runner.

We're unlikely to extend support to more architectures at this time.

In order for us to be able to support the runner on a new architecture (assuming a Linux OS), two of our dependencies, node v16 and dotnet core must be also supported there. From a cursory search, running them is not trivial on RISC-V.

Node: https://github.com/nodejs/build/issues/2876 Dotnet: https://github.com/dotnet/runtime/issues/36748

I'm closing the issue with the above points in mind.

If you can find an experimental path that works for you, I'd be happy to review a docs PR detailing the process.

ChristopherHX commented 1 year ago

An unofficial self-hosted actions runner powered by golang does target linux/risc-v https://github.com/ChristopherHX/github-act-runner, no idea if it really works on risc-v64.

I guess the node16 problem would also apply, without node you can only use composite actions and run steps. actions/checkout depends on node16, so you might need to run git clone manually.

I'm not shure if that path should be documented here, because doesn't use actions/runner at all. It is the same runner which runs on freebsd.

iggy commented 1 year ago

It looks like node now supports riscv64 as well as dotnet/runtime

KitsuneAlex commented 1 year ago

An unofficial self-hosted actions runner powered by golang does target linux/risc-v https://github.com/ChristopherHX/github-act-runner, no idea if it really works on risc-v64.

I guess the node16 problem would also apply, without node you can only use composite actions and run steps. actions/checkout depends on node16, so you might need to run git clone manually.

I'm not shure if that path should be documented here, because doesn't use actions/runner at all. It is the same runner which runs on freebsd.

Sadly it seems pretty broken right now, gave it a try on my StarFive Vision 2 :/

KitsuneAlex commented 1 year ago

I'm gonna try to give this a shot. Gonna build dotnet from source for riscv64 and then try to make the runner work. I already got latest Node on there. Maybe i can get somewhere.

fengyuentau commented 10 months ago

Hello, is there any progress on running github actions on different platforms? I would like to see it running on RISC-V, loongson and so on.

dkurt commented 8 months ago

I tried to workaround some checks on this branch https://github.com/dkurt/runner/tree/dkurt/riscv64_runner and got stuck on missing RISC-V RID of dotnet - they does not ship this with x64 package. Node.js ignored for now as @ChristopherHX suggested in https://github.com/actions/runner/issues/2157#issuecomment-1268652704.

Were able to build .NET SDK but there are some errors while compile runner: https://github.com/dkurt/dotnet_riscv/discussions/5

dkurt commented 8 months ago

Oh, seems like I were finally lucky to run a simple test on my RISC-V board!!! https://github.com/dkurt/github_actions_riscv/actions/runs/7557778218/job/20606841931

2024-01-18T08:53:33.5046506Z Requested labels: self-hosted
2024-01-18T08:53:33.5046809Z Job defined at: dkurt/github_actions_riscv/.github/workflows/test.yaml@refs/pull/1/merge
2024-01-18T08:53:33.5046917Z Waiting for a runner to pick up this job...
2024-01-18T08:54:28.0279155Z Job is about to start running on the runner: sipeed (repository)
2024-01-18T08:55:57.7563620Z Current runner version: '2.311.0'
2024-01-18T08:55:57.9667897Z Runner name: 'sipeed'
2024-01-18T08:55:58.0223617Z Runner group name: 'Default'
2024-01-18T08:55:58.0874527Z Machine name: 'ubuntu'
2024-01-18T08:55:58.2820098Z ##[group]GITHUB_TOKEN Permissions
2024-01-18T08:55:58.3412606Z Contents: read
2024-01-18T08:55:58.3977585Z Metadata: read
2024-01-18T08:55:58.4511344Z Packages: read
2024-01-18T08:55:58.5055148Z ##[endgroup]
2024-01-18T08:55:58.5698740Z Secret source: Actions
2024-01-18T08:55:58.6255337Z Prepare workflow directory
2024-01-18T08:56:03.4799589Z Prepare all required actions
2024-01-18T08:56:04.4288301Z Complete job name: run
2024-01-18T08:56:15.2594320Z ##[group]Run uname -m
2024-01-18T08:56:15.3192643Z uname -m
2024-01-18T08:56:15.3863763Z cat /proc/cpuinfo
2024-01-18T08:56:15.7824469Z shell: /usr/bin/bash -e {0}
2024-01-18T08:56:15.8425501Z ##[endgroup]
2024-01-18T08:56:19.2917948Z riscv64
2024-01-18T08:56:19.3623249Z processor  : 0
2024-01-18T08:56:19.4206628Z hart       : 0
2024-01-18T08:56:19.4690253Z isa        : rv64imafdc_zicntr_zicsr_zifencei_zihpm
2024-01-18T08:56:19.5226080Z mmu        : sv39
2024-01-18T08:56:19.5694325Z uarch      : thead,c906
2024-01-18T08:56:19.6173666Z mvendorid  : 0x5b7
2024-01-18T08:56:19.6992719Z marchid        : 0x0
2024-01-18T08:56:19.7478966Z mimpid     : 0x0
2024-01-18T08:56:19.7768192Z 
2024-01-18T08:56:21.9316744Z Cleaning up orphan processes

Please give me some time to summarize and publish a guide.

Update: done: https://github.com/dkurt/github_actions_riscv

EwoutH commented 6 months ago

@fhammerl since @dkurt has a working proof of concept of running GitHub Actions on RISC-V, would you consider reopening this issue? Even if it's isn't planned in the near future, it would be useful to be able to discuss developments here.