This commit is contained in:
Richard Smith 2024-10-16 01:20:35 +01:00
parent b14d0a2b3c
commit 29f5f42af7
2 changed files with 33 additions and 7 deletions

View file

@ -4,13 +4,13 @@
pi_task: pi_task:
arm_container: arm_container:
matrix: matrix:
- image: dtcooper/raspberrypi-os:python-bullseye - image: dtcooper/raspberrypi-os:python3.12-bullseye
- image: dtcooper/raspberrypi-os:python3.11-bullseye - image: dtcooper/raspberrypi-os:python3.11-bullseye
- image: dtcooper/raspberrypi-os:python3.10-bullseye - image: dtcooper/raspberrypi-os:python3.10-bullseye
- image: dtcooper/raspberrypi-os:python3.9-bullseye - image: dtcooper/raspberrypi-os:python3.9-bullseye
setup_script: setup_script:
- apt update - apt update
- apt -y install cmake libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev - apt -y install cmake libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev
build_raylib_script: build_raylib_script:
- git submodule update --init --recursive - git submodule update --init --recursive
- cd raylib-c - cd raylib-c
@ -28,6 +28,18 @@ pi_task:
- python -m pip install --break-system-packages setuptools - python -m pip install --break-system-packages setuptools
- python -m pip install --break-system-packages wheel - python -m pip install --break-system-packages wheel
- python setup.py bdist_wheel --plat-name manylinux2014_aarch64 - python setup.py bdist_wheel --plat-name manylinux2014_aarch64
test_script:
- python -m pip install --break-system-packages dist/*.whl
- cd /
- python -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true
- cat /tmp/output
- if grep -q "INFO: Initializing raylib" /tmp/output; then
- echo "Passed"
- exit 0
- else
- echo "Failed"
- exit 1
- fi
artifacts: artifacts:
path: "dist/*" path: "dist/*"

View file

@ -67,12 +67,28 @@ jobs:
sudo cp raygui/src/raygui.h /usr/local/include/ sudo cp raygui/src/raygui.h /usr/local/include/
- name: Build raylib-python-cffi - name: Build raylib-python-cffi
env:
RAYLIB_PLATFORM: ${{ matrix.raylib-platform }}
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip3 install "cffi>=1.17.1" pip3 install "cffi>=1.17.1"
pip3 install wheel pip3 install wheel
pip3 install setuptools pip3 install setuptools
RAYLIB_PLATFORM=${{ matrix.raylib-platform }} python setup.py bdist_wheel --plat-name macosx_10_15_x86_64 python setup.py bdist_wheel --plat-name macosx_10_15_x86_64
- name: Test
run: |
pip3 install dist/*.whl
cd /
python3 -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true
cat /tmp/output
if grep -q "INFO: Initializing raylib" /tmp/output; then
echo "Passed"
exit 0
else
echo "Failed"
exit 1
fi
- name: Upload build Artifact wheel - name: Upload build Artifact wheel
uses: actions/upload-artifact@v3.2.1 uses: actions/upload-artifact@v3.2.1
@ -226,15 +242,13 @@ jobs:
run: | run: |
pip3 install dist/*.whl pip3 install dist/*.whl
cd / cd /
echo "moo"
python3 -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true python3 -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true
echo "woo"
cat /tmp/output cat /tmp/output
if grep -q "INFO: Initializing raylib" /tmp/output; then if grep -q "INFO: Initializing raylib" /tmp/output; then
echo "boo" echo "Passed"
exit 0 exit 0
else else
echo "foo" echo "Failed"
exit 1 exit 1
fi fi