Skip to content

Commit d493f39

Browse files
authored
Enable build of runner using runner (#2)
1 parent 9bb3a0a commit d493f39

File tree

3 files changed

+58
-6
lines changed

3 files changed

+58
-6
lines changed

.github/workflows/build.yaml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,38 @@
11
name: Build RISC-V runner
22

3-
on: [workflow_dispatch, pull_request]
3+
on: [workflow_dispatch]
44

55
jobs:
6-
run:
6+
build:
77
runs-on: self-hosted
88

99
steps:
1010
- name: Clone repositories
1111
run: |
12+
rm -rf runner
1213
git clone -b dkurt/riscv64_runner https://github.com/dkurt/runner --depth 1
1314
1415
- name: Download .NET
1516
run: |
16-
wget https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/dotnet-sdk-8.0.101-linux-riscv64.tar.gz
17+
wget -q https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/dotnet-sdk-8.0.101-linux-riscv64.tar.gz
18+
mkdir ${{ github.workspace }}/packages
19+
cd ${{ github.workspace }}/packages
20+
wget -q https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/Microsoft.AspNetCore.App.Runtime.linux-riscv64.8.0.1-servicing.23580.8.nupkg
21+
wget -q https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/Microsoft.AspNetCore.App.Runtime.linux-riscv64.8.0.1-servicing.23580.8.symbols.nupkg
22+
wget -q https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/Microsoft.AspNetCore.App.Runtime.linux-riscv64.8.0.1.nupkg
23+
wget -q https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/Microsoft.AspNetCore.App.Runtime.linux-riscv64.8.0.1.symbols.nupkg
24+
wget -q https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/Microsoft.NETCore.App.Host.linux-riscv64.8.0.1.nupkg
25+
wget -q https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/Microsoft.NETCore.App.Host.linux-riscv64.8.0.1.symbols.nupkg
26+
wget -q https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/Microsoft.NETCore.App.Runtime.linux-riscv64.8.0.1-servicing.23580.1.nupkg
27+
wget -q https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/Microsoft.NETCore.App.Runtime.linux-riscv64.8.0.1-servicing.23580.1.symbols.nupkg
28+
wget -q https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/Microsoft.NETCore.App.Runtime.linux-riscv64.8.0.1.nupkg
29+
wget -q https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/Microsoft.NETCore.App.Runtime.linux-riscv64.8.0.1.symbols.nupkg
1730
1831
- name: Prepare
1932
run: |
2033
cd runner
34+
sed -i "s|/home/ubuntu/packages|${{ github.workspace }}|" src/NuGet.Config
35+
2136
mkdir -p _dotnetsdk/8.0.101
2237
cd _dotnetsdk/8.0.101
2338
tar -xf ${{ github.workspace }}/dotnet-sdk-8.0.101-linux-riscv64.tar.gz
@@ -26,4 +41,8 @@ jobs:
2641
run: |
2742
cd runner/src
2843
./dev.sh layout Release linux-riscv64
29-
44+
45+
- name: Package
46+
run: |
47+
cd runner/src
48+
./dev.sh package Release linux-riscv64

.github/workflows/test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Set of tests for Self-Hosted RISC-V runner
22

3-
on: [workflow_dispatch, pull_request]
3+
on: [workflow_dispatch]
44

55
jobs:
66
run:

README.md

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,34 @@
1-
# github_actions_riscv
1+
# GitHub Actions on RISC-V
2+
3+
This repository provides a guide on how to build and use GitHub Actions (GitHub CI) on Self-Hosted RISC-V CPU machines.
4+
5+
**Disclaimer**: this project is not related to GitHub or .NET development. Any instructions or binary packages published in the spirit of the open source. Use carefully.
6+
7+
## Observed issues
8+
9+
* The workspace is not cleaned
10+
* `actions/upload-artifact` not working because of disabled Node.js (actually, ARM64 binaries were downloaded)
11+
12+
## How to use
13+
14+
Use a [pre-compiled](https://github.com/dkurt/github_actions_riscv/releases) version or follow the build steps from [build.yaml](.github/workflows/build.yaml).
15+
Cross-compilation is not supported for now so build process is performed on RISC-V board which takes about 1 hour.
16+
17+
After unpacking the runner archive, install .NET:
18+
```bash
19+
cd $HOME
20+
wget https://github.com/dkurt/dotnet_riscv/releases/download/v8.0.101/dotnet-sdk-8.0.101-linux-riscv64.tar.gz
21+
22+
sudo mkdir /usr/share/dotnet
23+
cd /usr/share/dotnet
24+
sudo tar -xf $HOME/dotnet-sdk-8.0.101-linux-riscv64.tar.gz
25+
```
26+
27+
Verify .NET installation:
28+
```bash
29+
./dotnet --info
30+
```
31+
32+
Then do `./config.sh` and `./run.sh` as recommended in your repository `Settings->Actions->Runners->New self-hosted runner` tab.
33+
34+
Runner was tested on Sipeed Lichee RV Dock with [Ubuntu 23.10](https://ubuntu.com/download/risc-v).

0 commit comments

Comments
 (0)