File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -235,3 +235,17 @@ jobs:
235235 - name : Print failures
236236 if : failure()
237237 run : tests/run-tests.py --print-failures
238+
239+ qemu_riscv64 :
240+ runs-on : ubuntu-latest
241+ steps :
242+ - uses : actions/checkout@v4
243+ - name : Install packages
244+ run : source tools/ci.sh && ci_unix_qemu_riscv64_setup
245+ - name : Build
246+ run : source tools/ci.sh && ci_unix_qemu_riscv64_build
247+ - name : Run main test suite
248+ run : source tools/ci.sh && ci_unix_qemu_riscv64_run_tests
249+ - name : Print failures
250+ if : failure()
251+ run : tests/run-tests.py --print-failures
Original file line number Diff line number Diff line change @@ -427,6 +427,11 @@ CI_UNIX_OPTS_QEMU_ARM=(
427427 MICROPY_STANDALONE=1
428428)
429429
430+ CI_UNIX_OPTS_QEMU_RISCV64=(
431+ CROSS_COMPILE=riscv64-linux-gnu-
432+ VARIANT=coverage
433+ )
434+
430435function ci_unix_build_helper {
431436 make ${MAKEOPTS} -C mpy-cross
432437 make ${MAKEOPTS} -C ports/unix " $@ " submodules
@@ -692,6 +697,28 @@ function ci_unix_qemu_arm_run_tests {
692697 (cd tests && MICROPY_MICROPYTHON=../ports/unix/build-coverage/micropython ./run-tests.py --exclude ' vfs_posix.*\.py' )
693698}
694699
700+ function ci_unix_qemu_riscv64_setup {
701+ . /etc/os-release
702+ for repository in " ${VERSION_CODENAME} " " ${VERSION_CODENAME} -updates" " ${VERSION_CODENAME} -security"
703+ do
704+ sudo add-apt-repository -y -n " deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports ${repository} main"
705+ done
706+ sudo apt-get update
707+ sudo dpkg --add-architecture riscv64
708+ sudo apt-get install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu libffi-dev:riscv64
709+ sudo apt-get install qemu-user
710+ qemu-riscv64 --version
711+ }
712+
713+ function ci_unix_qemu_riscv64_build {
714+ ci_unix_build_helper " ${CI_UNIX_OPTS_QEMU_RISCV64[@]} "
715+ }
716+
717+ function ci_unix_qemu_riscv64_run_tests {
718+ file ./ports/unix/build-coverage/micropython
719+ (cd tests && MICROPY_MICROPYTHON=../ports/unix/build-coverage/micropython ./run-tests.py)
720+ }
721+
695722# #######################################################################################
696723# ports/windows
697724
You can’t perform that action at this time.
0 commit comments