From 6650506e06787cb742d11aee3f07ffeb5bbe0e82 Mon Sep 17 00:00:00 2001 From: Alessandro Gatti Date: Thu, 24 Jul 2025 14:21:17 +0200 Subject: [PATCH] tools/ci.sh: Extend Arm testing to include hardfp targets. This commit lets CI extend the testing scope of the QEMU Arm target, by letting it perform the usual battery of tests (interpreter and natmods) also on hardfp targets. The default board for Arm testing lacks hardware floating point support, so natmods weren't tested in that specific configuration. With the introduction of the "MPS_AN500" QEMU target, now this is made possible as said board emulates a Cortex-M7 machine with a single- and double-precision floating point unit. To reduce the impact on build times, the "ci_qemu_build_arm_thumb" CI step was split in two: "ci_qemu_build_arm_thumb_softfp" and "ci_qemu_build_arm_thumb_hardfp" - so hopefully those can run in parallel whenever possible. Signed-off-by: Alessandro Gatti --- .github/workflows/ports_qemu.yml | 3 ++- tools/ci.sh | 23 +++++++++++++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ports_qemu.yml b/.github/workflows/ports_qemu.yml index 8576457766..1284f11bbb 100644 --- a/.github/workflows/ports_qemu.yml +++ b/.github/workflows/ports_qemu.yml @@ -26,7 +26,8 @@ jobs: ci_func: # names are functions in ci.sh - bigendian - sabrelite - - thumb + - thumb_softfp + - thumb_hardfp runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 diff --git a/tools/ci.sh b/tools/ci.sh index e165cb2cf3..d9d77f6900 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -349,19 +349,30 @@ function ci_qemu_build_arm_sabrelite { make ${MAKEOPTS} -C ports/qemu BOARD=SABRELITE test_full } -function ci_qemu_build_arm_thumb { +function ci_qemu_build_arm_thumb_softfp { ci_qemu_build_arm_prepare - make ${MAKEOPTS} -C ports/qemu test_full + make BOARD=MPS2_AN385 ${MAKEOPTS} -C ports/qemu test_full - # Test building native .mpy with all ARM-M architectures. + # Test building native .mpy with ARM-M softfp architectures. ci_native_mpy_modules_build armv6m ci_native_mpy_modules_build armv7m + + # Test running native .mpy with all ARM-M architectures. + make BOARD=MPS2_AN385 ${MAKEOPTS} -C ports/qemu test_natmod RUN_TESTS_EXTRA="--arch armv6m" + make BOARD=MPS2_AN385 ${MAKEOPTS} -C ports/qemu test_natmod RUN_TESTS_EXTRA="--arch armv7m" +} + +function ci_qemu_build_arm_thumb_hardfp { + ci_qemu_build_arm_prepare + make BOARD=MPS2_AN500 ${MAKEOPTS} -C ports/qemu test_full + + # Test building native .mpy with all ARM-M hardfp architectures. ci_native_mpy_modules_build armv7emsp ci_native_mpy_modules_build armv7emdp - # Test running native .mpy with armv6m and armv7m architectures. - make ${MAKEOPTS} -C ports/qemu test_natmod RUN_TESTS_EXTRA="--arch armv6m" - make ${MAKEOPTS} -C ports/qemu test_natmod RUN_TESTS_EXTRA="--arch armv7m" + # Test running native .mpy with all ARM-M hardfp architectures. + make BOARD=MPS2_AN500 ${MAKEOPTS} -C ports/qemu test_natmod RUN_TESTS_EXTRA="--arch armv7emsp" + make BOARD=MPS2_AN500 ${MAKEOPTS} -C ports/qemu test_natmod RUN_TESTS_EXTRA="--arch armv7emdp" } function ci_qemu_build_rv32 {