diff --git a/.github/workflows/ports_unix.yml b/.github/workflows/ports_unix.yml index 5c4a4f304..c6ddd5303 100644 --- a/.github/workflows/ports_unix.yml +++ b/.github/workflows/ports_unix.yml @@ -200,3 +200,17 @@ jobs: - name: Print failures if: failure() run: tests/run-tests.py --print-failures + + qemu_arm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install packages + run: source tools/ci.sh && ci_unix_qemu_arm_setup + - name: Build + run: source tools/ci.sh && ci_unix_qemu_arm_build + - name: Run main test suite + run: source tools/ci.sh && ci_unix_qemu_arm_run_tests + - name: Print failures + if: failure() + run: tests/run-tests.py --print-failures diff --git a/tools/ci.sh b/tools/ci.sh index 22b43d451..e726ae40a 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -300,6 +300,12 @@ CI_UNIX_OPTS_QEMU_MIPS=( LDFLAGS_EXTRA="-static" ) +CI_UNIX_OPTS_QEMU_ARM=( + CROSS_COMPILE=arm-linux-gnueabi- + VARIANT=coverage + MICROPY_STANDALONE=1 +) + function ci_unix_build_helper { make ${MAKEOPTS} -C mpy-cross make ${MAKEOPTS} -C ports/unix "$@" submodules @@ -506,6 +512,25 @@ function ci_unix_qemu_mips_run_tests { (cd tests && MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py --exclude 'vfs_posix.py' --exclude 'ffi_(callback|float|float2).py') } +function ci_unix_qemu_arm_setup { + sudo apt-get update + sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi + sudo apt-get install qemu-user + qemu-arm --version +} + +function ci_unix_qemu_arm_build { + ci_unix_build_helper "${CI_UNIX_OPTS_QEMU_ARM[@]}" +} + +function ci_unix_qemu_arm_run_tests { + # Issues with ARM tests: + # - (i)listdir does not work, it always returns the empty list (it's an issue with the underlying C call) + export QEMU_LD_PREFIX=/usr/arm-linux-gnueabi + file ./ports/unix/micropython-coverage + (cd tests && MICROPY_MICROPYTHON=../ports/unix/micropython-coverage ./run-tests.py --exclude 'vfs_posix.py') +} + ######################################################################################## # ports/windows