Skip to content

Commit 23afa27

Browse files
committed
tools/ci.sh, .github/workflows: Bring QEMU-RISCV target under CI.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
1 parent 40ba74d commit 23afa27

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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

tools/ci.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy