File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : qemu-riscv port
2+
3+ on :
4+ push :
5+ pull_request :
6+ paths :
7+ - ' .github/workflows/*.yml'
8+ - ' tools/**'
9+ - ' py/**'
10+ - ' extmod/**'
11+ - ' shared/**'
12+ - ' lib/**'
13+ - ' drivers/**'
14+ - ' ports/qemu-arm/main.c'
15+ - ' ports/qemu-riscv/**'
16+ - ' tests/**'
17+
18+ concurrency :
19+ group : ${{ github.workflow }}-${{ github.ref }}
20+ cancel-in-progress : true
21+
22+ jobs :
23+ build_and_test :
24+ runs-on : ubuntu-latest
25+ steps :
26+ - uses : actions/checkout@v4
27+ - name : Install packages
28+ run : source tools/ci.sh && ci_qemu_riscv_setup
29+ - name : Build and run test suite
30+ run : source tools/ci.sh && ci_qemu_riscv_build
31+ - name : Print failures
32+ if : failure()
33+ run : grep --before-context=100 --text "FAIL" ports/qemu-riscv/build/console.out
Original file line number Diff line number Diff line change @@ -17,6 +17,11 @@ function ci_gcc_arm_setup {
1717 arm-none-eabi-gcc --version
1818}
1919
20+ function ci_gcc_riscv_setup {
21+ sudo apt-get install gcc-riscv64-unknown-elf picolibc-riscv64-unknown-elf
22+ riscv64-unknown-elf-gcc --version
23+ }
24+
2025# #######################################################################################
2126# c code formatting
2227
@@ -259,6 +264,25 @@ function ci_qemu_arm_build {
259264 make ${MAKEOPTS} -C ports/qemu-arm -f Makefile.test BOARD=sabrelite test
260265}
261266
267+ # #######################################################################################
268+ # ports/qemu-riscv
269+
270+ function ci_qemu_riscv_setup {
271+ ci_gcc_riscv_setup
272+ sudo apt-get update
273+ sudo apt-get install qemu-system
274+ qemu-system-riscv32 --version
275+ }
276+
277+ function ci_qemu_riscv_build {
278+ make ${MAKEOPTS} -C mpy-cross
279+ make ${MAKEOPTS} -C ports/qemu-riscv submodules
280+ make ${MAKEOPTS} -C ports/qemu-riscv
281+ make ${MAKEOPTS} -C ports/qemu-riscv clean
282+ make ${MAKEOPTS} -C ports/qemu-riscv -f Makefile.test submodules
283+ make ${MAKEOPTS} -C ports/qemu-riscv -f Makefile.test test
284+ }
285+
262286# #######################################################################################
263287# ports/renesas-ra
264288
You can’t perform that action at this time.
0 commit comments