From 7a2c5b9e555b92540da56f88bb0ccdbdaeb5d472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rennfanz=2C=20Bj=C3=B6rn?= Date: Tue, 3 Dec 2024 16:36:36 +0100 Subject: [PATCH] Add unit tests pipeline --- .github/workflows/main.yml | 39 +++++++++++++++++++++++++++++++- samples/pygame_fullscreen_hud.py | 0 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 samples/pygame_fullscreen_hud.py diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 046b6a7..21d84a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -272,4 +272,41 @@ jobs: Windows_Pylon macOS_Pylon - + unit-tests: + if: success() + needs: [ + setup, + build-linux, + build-macos, + build-windows + ] + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + python-version: [ '3.10', '3.11', '3.12', '3.13' ] + architecture: [ x64, arm64 ] + exclude: + # Exclude ARM64 architecture for Windows + - os: windows-latest + architecture: arm64 + runs-on: ${{ matrix.os }} + steps: + - name: Set up runner architecture + if: runner.os == 'Linux' && matrix.architecture == 'arm64' + run: | + if [[ "$(uname -m)" != "${{ matrix.architecture }}" ]]; then + sudo apt-get update + sudo apt-get install -y qemu-user-static + echo ":$(( $(cat /proc/sys/fs/binfmt_misc/status | grep -o enabled) | wc -l ))" | sudo tee /proc/sys/fs/binfmt_misc/qemu-aarch64 + sudo service binfmt-support restart + fi + + - name: Check out repository + uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + architecture: ${{ matrix.architecture }} + \ No newline at end of file diff --git a/samples/pygame_fullscreen_hud.py b/samples/pygame_fullscreen_hud.py new file mode 100644 index 0000000..e69de29