From e64b23cd82925cc85f896132eac9ffdb5cd34049 Mon Sep 17 00:00:00 2001 From: Ankith Date: Sun, 14 Apr 2024 11:29:24 +0530 Subject: [PATCH] Add armv7 wheel testing on armv6 --- .github/workflows/build-debian-multiarch.yml | 56 ++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.github/workflows/build-debian-multiarch.yml b/.github/workflows/build-debian-multiarch.yml index a1f637134a..81f8680755 100644 --- a/.github/workflows/build-debian-multiarch.yml +++ b/.github/workflows/build-debian-multiarch.yml @@ -95,3 +95,59 @@ jobs: export SDL_VIDEODRIVER=dummy export SDL_AUDIODRIVER=disk python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300 + + # Upload the generated files under github actions assets section + - name: Upload dist + uses: actions/upload-artifact@v4 + with: + name: pygame-multiarch-dist + path: ~/artifacts/*.whl + + # test wheels built on armv7 on armv6. Why? + # because piwheels expects the same armv7 wheel to work on both armv7 and armv6 + test-armv7-on-armv6: + needs: build-multiarch + name: Debian (Bullseye - 11) [build - armv7, test - armv6] + runs-on: ubuntu-22.04 + steps: + - name: Download all multiarch artifacts + uses: actions/download-artifact@v4 + with: + name: pygame-multiarch-dist + path: ~/artifacts_tmp + + - name: Put renamed arm wheel in artifacts + run: | + mkdir -p ~/artifacts + cd ~/artifacts + cp ~/artifacts_tmp/*-linux_armv7l.whl . + for f in *; do + mv "$f" "${f//armv7l/armv6l}" + done + + - name: Test armv7 wheel on armv6 + uses: uraimo/run-on-arch-action@v2.7.1 + with: + arch: armv6 + distro: bullseye + + # Mount the artifacts directory as /artifacts in the container + dockerRunArgs: --volume ~/artifacts:/artifacts + + # The shell to run commands with in the container + shell: /bin/sh + + # Install runtime dependencies (no need for dev dependencies) + install: | + apt-get update --fix-missing + apt-get install libsdl2-2.0-0 libsdl2-image-2.0-0 libsdl2-mixer-2.0-0 libsdl2-ttf-2.0-0 libfreetype6 libportmidi0 fontconfig -y + apt-get install python3-pip -y + + # Install wheel and run unit tests + run: | + echo "\nInstalling wheel\n" + pip3 install --no-index --pre --find-links /artifacts pygame-ce + echo "\nRunning tests\n" + export SDL_VIDEODRIVER=dummy + export SDL_AUDIODRIVER=disk + python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300