Skip to content

Commit ab01645

Browse files
sunyuechitkanteck
andcommitted
ci: run RISC-V tests under QEMU
The self-hosted RISC-V runner is currently offline. Cross-compile on a GitHub-hosted runner and run the check tests with QEMU user mode until it is back. Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn> Co-authored-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
1 parent bbbf044 commit ab01645

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,22 @@ jobs:
148148

149149
run_tests_linux-riscv64-v:
150150
needs: check_format
151-
runs-on: run_tests_linux-riscv64-v
151+
runs-on: ubuntu-26.04
152+
env:
153+
QEMU_LD_PREFIX: /usr/riscv64-linux-gnu
154+
QEMU_CPU: rv64,v=true
152155
steps:
153156
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
157+
- name: Install build dependencies
158+
run: sudo apt update -y && sudo apt install -y gcc-riscv64-linux-gnu qemu-user-binfmt
154159
- name: Build
155160
run: |
156161
./autogen.sh
157-
./configure
162+
./configure --host=riscv64-linux-gnu
158163
bash -c 'make -j $(nproc)'
159164
- name: Run tests
160-
run: bash tools/test_checks.sh
161-
- name: Run extended tests
162-
run: bash tools/test_extended.sh
165+
# cross build, hence simulates test_checks.sh
166+
run: bash -c 'make -j $(nproc) check D="-D TEST_SEED=0"'
163167

164168
run_cmake_tests_unix:
165169
needs: check_format

0 commit comments

Comments
 (0)