diff options
| author | Alessandro Gatti <a.gatti@frob.it> | 2025-06-03 22:54:09 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-06-10 10:57:32 +1000 |
| commit | b8e56a17b126fd990b7cdf3fb81944d504146f69 (patch) | |
| tree | 744ab69720b7b095aebb9b67714aa1e14295b176 | |
| parent | 5f058e9863c0770aa8a4defe23f70919cea94160 (diff) | |
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>
| -rw-r--r-- | .github/workflows/ports_qemu.yml | 11 | ||||
| -rwxr-xr-x | tools/ci.sh | 17 |
2 files changed, 23 insertions, 5 deletions
diff --git a/.github/workflows/ports_qemu.yml b/.github/workflows/ports_qemu.yml index 57192c439..ac09dde86 100644 --- a/.github/workflows/ports_qemu.yml +++ b/.github/workflows/ports_qemu.yml @@ -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 diff --git a/tools/ci.sh b/tools/ci.sh index ea67e2c10..011aabea3 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -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 |
