From b8231d23b8b56b451ce9b4d4bf91180e3b38ee4a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Wed, 16 Oct 2024 01:44:19 +0100 Subject: [PATCH] try --- .cirrus.yml | 12 ++++++++++++ .github/workflows/build.yml | 15 +++++++++++++++ raylib/build.py | 2 +- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 48cadb6..9c65d6b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -111,5 +111,17 @@ mac_task: - /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages setuptools - /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages wheel - /opt/homebrew/bin/python${PY_VER} setup.py bdist_wheel + test_script: + - /opt/homebrew/bin/python${PY_VER} -m pip install --break-system-packages dist/*.whl + - cd / + - /opt/homebrew/bin/python${PY_VER} -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/*" \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03b6c01..2c3aa90 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -326,6 +326,21 @@ jobs: del raylib\dynamic\32bit\* >nul 2>&1 python setup.py bdist_wheel shell: cmd + + - name: Test + shell: bash + 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 diff --git a/raylib/build.py b/raylib/build.py index c6a9325..ac0a217 100644 --- a/raylib/build.py +++ b/raylib/build.py @@ -169,7 +169,7 @@ def build_unix(): '-framework', 'IOKit', '-framework', 'CoreFoundation', '-framework', 'CoreVideo'] if USE_SDL2: - extra_link_args += ['/usr/local/lib/libSDL2.a'] + extra_link_args += ['/usr/local/lib/libSDL2.a', '-framework', 'CoreHaptics'] libraries = [] extra_compile_args = ["-Wno-error=incompatible-function-pointer-types", "-D_CFFI_NO_LIMITED_API"] else: #platform.system() == "Linux":