github/workflows: Split QEMU/Arm builds into separate entries.

This commit takes the QEMU/Arm CI build and test step and splits it into
three separate steps (bigendian, sabrelite, thumb), to allow them to run
in parallel.

Currently the QEMU/Arm CI build step would take up to 16 minutes, often
being the last step blocking a full test run.  With this commit, when
the steps run in parallel the time it takes to complete the QEMU/Arm
build and test procedure is cut in half - taking between 8 to 9 minutes
depending on the CI runner load.

The existing `ci_build_and_test_arm` function has been removed, in
favour of having three separate functions - one per configuration.  They
are called `ci_build_and_test_arm_bigendian`,
`ci_build_and_test_arm_sabrelite`, and `ci_build_and_test_arm_thumb`.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
This commit is contained in:
Alessandro Gatti
2025-06-03 22:54:09 +02:00
committed by Damien George
parent 5f058e9863
commit b8e56a17b1
2 changed files with 23 additions and 5 deletions

View File

@@ -20,13 +20,20 @@ concurrency:
jobs:
build_and_test_arm:
strategy:
fail-fast: false
matrix:
ci_func: # names are functions in ci.sh
- bigendian
- sabrelite
- thumb
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install packages
run: source tools/ci.sh && ci_qemu_setup_arm
- name: Build and run test suite
run: source tools/ci.sh && ci_qemu_build_arm
- name: Build and run test suite ci_qemu_build_arm_${{ matrix.ci_func }}
run: source tools/ci.sh && ci_qemu_build_arm_${{ matrix.ci_func }}
- name: Print failures
if: failure()
run: tests/run-tests.py --print-failures

View File

@@ -324,13 +324,24 @@ function ci_qemu_setup_rv32 {
qemu-system-riscv32 --version
}
function ci_qemu_build_arm {
function ci_qemu_build_arm_prepare {
make ${MAKEOPTS} -C mpy-cross
make ${MAKEOPTS} -C ports/qemu submodules
}
function ci_qemu_build_arm_bigendian {
ci_qemu_build_arm_prepare
make ${MAKEOPTS} -C ports/qemu CFLAGS_EXTRA=-DMP_ENDIANNESS_BIG=1
make ${MAKEOPTS} -C ports/qemu clean
make ${MAKEOPTS} -C ports/qemu test_full
}
function ci_qemu_build_arm_sabrelite {
ci_qemu_build_arm_prepare
make ${MAKEOPTS} -C ports/qemu BOARD=SABRELITE test_full
}
function ci_qemu_build_arm_thumb {
ci_qemu_build_arm_prepare
make ${MAKEOPTS} -C ports/qemu test_full
# Test building and running native .mpy with armv7m architecture.
ci_native_mpy_modules_build armv7m