Commit 17f254df authored by Alessandro Gatti's avatar Alessandro Gatti Committed by Damien George

github/workflows: Add RISC-V 64 bits Unix port to CI.

Signed-off-by: default avatarAlessandro Gatti <a.gatti@frob.it>
parent 1f907a2f
......@@ -235,3 +235,17 @@ jobs:
- name: Print failures
if: failure()
run: tests/run-tests.py --print-failures
qemu_riscv64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages
run: source tools/ci.sh && ci_unix_qemu_riscv64_setup
- name: Build
run: source tools/ci.sh && ci_unix_qemu_riscv64_build
- name: Run main test suite
run: source tools/ci.sh && ci_unix_qemu_riscv64_run_tests
- name: Print failures
if: failure()
run: tests/run-tests.py --print-failures
......@@ -427,6 +427,11 @@ CI_UNIX_OPTS_QEMU_ARM=(
MICROPY_STANDALONE=1
)
CI_UNIX_OPTS_QEMU_RISCV64=(
CROSS_COMPILE=riscv64-linux-gnu-
VARIANT=coverage
)
function ci_unix_build_helper {
make ${MAKEOPTS} -C mpy-cross
make ${MAKEOPTS} -C ports/unix "$@" submodules
......@@ -692,6 +697,28 @@ function ci_unix_qemu_arm_run_tests {
(cd tests && MICROPY_MICROPYTHON=../ports/unix/build-coverage/micropython ./run-tests.py --exclude 'vfs_posix.*\.py')
}
function ci_unix_qemu_riscv64_setup {
. /etc/os-release
for repository in "${VERSION_CODENAME}" "${VERSION_CODENAME}-updates" "${VERSION_CODENAME}-security"
do
sudo add-apt-repository -y -n "deb [arch=riscv64] http://ports.ubuntu.com/ubuntu-ports ${repository} main"
done
sudo apt-get update
sudo dpkg --add-architecture riscv64
sudo apt-get install gcc-riscv64-linux-gnu g++-riscv64-linux-gnu libffi-dev:riscv64
sudo apt-get install qemu-user
qemu-riscv64 --version
}
function ci_unix_qemu_riscv64_build {
ci_unix_build_helper "${CI_UNIX_OPTS_QEMU_RISCV64[@]}"
}
function ci_unix_qemu_riscv64_run_tests {
file ./ports/unix/build-coverage/micropython
(cd tests && MICROPY_MICROPYTHON=../ports/unix/build-coverage/micropython ./run-tests.py)
}
########################################################################################
# ports/windows
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment