diff --git a/.cirrus.yml b/.cirrus.yml index dd1045a..48cadb6 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -4,13 +4,13 @@ pi_task: arm_container: 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.10-bullseye - image: dtcooper/raspberrypi-os:python3.9-bullseye setup_script: - 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: - git submodule update --init --recursive - cd raylib-c @@ -28,6 +28,18 @@ pi_task: - python -m pip install --break-system-packages setuptools - python -m pip install --break-system-packages wheel - 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: path: "dist/*" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 191106f..03b6c01 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -67,12 +67,28 @@ jobs: sudo cp raygui/src/raygui.h /usr/local/include/ - name: Build raylib-python-cffi + env: + RAYLIB_PLATFORM: ${{ matrix.raylib-platform }} run: | python -m pip install --upgrade pip pip3 install "cffi>=1.17.1" pip3 install wheel 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 uses: actions/upload-artifact@v3.2.1 @@ -226,15 +242,13 @@ jobs: run: | pip3 install dist/*.whl cd / - echo "moo" python3 -c 'import pyray; pyray.init_window(100,100,"test")' >/tmp/output 2>&1 || true - echo "woo" cat /tmp/output if grep -q "INFO: Initializing raylib" /tmp/output; then - echo "boo" + echo "Passed" exit 0 else - echo "foo" + echo "Failed" exit 1 fi