diff options
| author | Damien George <damien@micropython.org> | 2021-06-04 23:40:47 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2021-06-05 11:03:09 +1000 |
| commit | b15e1ef5a6c40b543e2b0d65252ef1475d03005e (patch) | |
| tree | bbeb6918effe26896381c6ec8bca149e8527d111 | |
| parent | 36cb365cadfc9597d10a60c0581268fa47305b69 (diff) | |
github/workflows: Add workflow to build and run unix port on ARM.
Following on from ef16834887de02cbddf414b560e5a2af9cae4b16, this adds a
coverage build and running of the test suite on an ARM 32-bit Linux-based
architecture.
Signed-off-by: Damien George <damien@micropython.org>
| -rw-r--r-- | .github/workflows/ports_unix.yml | 14 | ||||
| -rwxr-xr-x | tools/ci.sh | 25 |
2 files changed, 39 insertions, 0 deletions
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 |
