Skip to content

Commit 0000e3e

Browse files
committed
Add riscv64 nightly LKL build to GitHub Action
Previously, the GitHub Actions only build LKL of x86_64 and aarch64 architectures. This adds the riscv64 support by using the RISE GitHub App to do the compilation. This is needed by the riscv64 support of kbox in the future. Change-Id: I7f710891f8259c8ec848891453e1f6410e932a82
1 parent dc7aa2f commit 0000e3e

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/build-lkl.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# successful publish.
77
#
88
# The lkl-nightly release on sysprog21/kbox always contains exactly
9-
# one x86_64 and one aarch64 tarball (the latest build).
9+
# one x86_64, one aarch64 tarball and one riscv64 (the latest build).
1010
name: Build LKL (nightly)
1111

1212
on:
@@ -75,7 +75,7 @@ jobs:
7575
echo "New upstream commit: ${CURRENT} (was: ${LAST_COMMIT:-none})"
7676
fi
7777
78-
# ---- Build x86_64 and aarch64 in parallel ----
78+
# ---- Build x86_64, aarch64 and riscv64 in parallel ----
7979
build:
8080
needs: check-upstream
8181
if: needs.check-upstream.outputs.needs_build == 'true'
@@ -89,8 +89,10 @@ jobs:
8989
runner: ubuntu-24.04
9090
- arch: aarch64
9191
runner: ubuntu-24.04-arm
92+
- arch: riscv64
93+
runner: ubuntu-24.04-riscv
9294
runs-on: ${{ matrix.runner }}
93-
timeout-minutes: 30
95+
timeout-minutes: 360
9496
steps:
9597
- name: Checkout
9698
uses: actions/checkout@v6
@@ -114,7 +116,7 @@ jobs:
114116

115117
- name: Package
116118
run: |
117-
tar czf liblkl-${{ matrix.arch }}.tar.gz lkl-${{ matrix.arch }}/
119+
tar czf liblkl-${{ matrix.arch }}.tar.gz -C lkl-${{ matrix.arch }}/ .
118120
119121
- name: Upload artifact
120122
uses: actions/upload-artifact@v7
@@ -151,7 +153,7 @@ jobs:
151153
date=${BUILD_DATE}
152154
upstream=https://github.com/${{ env.LKL_UPSTREAM }}/commit/${LKL_COMMIT}
153155
154-
Contains: liblkl-x86_64.tar.gz, liblkl-aarch64.tar.gz
156+
Contains: liblkl-x86_64.tar.gz, liblkl-aarch64.tar.gz, liblkl-riscv64.tar.gz
155157
Each tarball includes: liblkl.a, lkl.h, autoconf.h, vmlinux-gdb.py,
156158
BUILD_INFO, sha256sums.txt
157159
EOF
@@ -168,4 +170,5 @@ jobs:
168170
--notes-file /tmp/release-notes.md \
169171
--prerelease \
170172
dist/liblkl-x86_64.tar.gz \
171-
dist/liblkl-aarch64.tar.gz
173+
dist/liblkl-aarch64.tar.gz \
174+
dist/liblkl-riscv64.tar.gz

scripts/common.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ detect_arch()
6767
case "${1:-$(uname -m)}" in
6868
x86_64 | amd64) ARCH="x86_64" ;;
6969
aarch64 | arm64) ARCH="aarch64" ;;
70+
riscv64) ARCH="riscv64" ;;
7071
*) die "unsupported architecture: ${1:-$(uname -m)}" ;;
7172
esac
7273
}

0 commit comments

Comments
 (0)