From 0000e3e1252dcc089d2ceb6a882c019302e05551 Mon Sep 17 00:00:00 2001 From: Chisheng Chen Date: Thu, 9 Apr 2026 01:09:32 +0800 Subject: [PATCH] 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 --- .github/workflows/build-lkl.yml | 15 +++++++++------ scripts/common.sh | 1 + 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-lkl.yml b/.github/workflows/build-lkl.yml index 1683fe9..be42005 100644 --- a/.github/workflows/build-lkl.yml +++ b/.github/workflows/build-lkl.yml @@ -6,7 +6,7 @@ # successful publish. # # The lkl-nightly release on sysprog21/kbox always contains exactly -# one x86_64 and one aarch64 tarball (the latest build). +# one x86_64, one aarch64 tarball and one riscv64 (the latest build). name: Build LKL (nightly) on: @@ -75,7 +75,7 @@ jobs: echo "New upstream commit: ${CURRENT} (was: ${LAST_COMMIT:-none})" fi - # ---- Build x86_64 and aarch64 in parallel ---- + # ---- Build x86_64, aarch64 and riscv64 in parallel ---- build: needs: check-upstream if: needs.check-upstream.outputs.needs_build == 'true' @@ -89,8 +89,10 @@ jobs: runner: ubuntu-24.04 - arch: aarch64 runner: ubuntu-24.04-arm + - arch: riscv64 + runner: ubuntu-24.04-riscv runs-on: ${{ matrix.runner }} - timeout-minutes: 30 + timeout-minutes: 360 steps: - name: Checkout uses: actions/checkout@v6 @@ -114,7 +116,7 @@ jobs: - name: Package run: | - tar czf liblkl-${{ matrix.arch }}.tar.gz lkl-${{ matrix.arch }}/ + tar czf liblkl-${{ matrix.arch }}.tar.gz -C lkl-${{ matrix.arch }}/ . - name: Upload artifact uses: actions/upload-artifact@v7 @@ -151,7 +153,7 @@ jobs: date=${BUILD_DATE} upstream=https://github.com/${{ env.LKL_UPSTREAM }}/commit/${LKL_COMMIT} - Contains: liblkl-x86_64.tar.gz, liblkl-aarch64.tar.gz + Contains: liblkl-x86_64.tar.gz, liblkl-aarch64.tar.gz, liblkl-riscv64.tar.gz Each tarball includes: liblkl.a, lkl.h, autoconf.h, vmlinux-gdb.py, BUILD_INFO, sha256sums.txt EOF @@ -168,4 +170,5 @@ jobs: --notes-file /tmp/release-notes.md \ --prerelease \ dist/liblkl-x86_64.tar.gz \ - dist/liblkl-aarch64.tar.gz + dist/liblkl-aarch64.tar.gz \ + dist/liblkl-riscv64.tar.gz diff --git a/scripts/common.sh b/scripts/common.sh index 290ff04..ff4a8b6 100644 --- a/scripts/common.sh +++ b/scripts/common.sh @@ -67,6 +67,7 @@ detect_arch() case "${1:-$(uname -m)}" in x86_64 | amd64) ARCH="x86_64" ;; aarch64 | arm64) ARCH="aarch64" ;; + riscv64) ARCH="riscv64" ;; *) die "unsupported architecture: ${1:-$(uname -m)}" ;; esac }