From c80cc5916612a13391730fcbba622907dbb0bfbb Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 2 Jul 2024 14:19:14 +0100 Subject: [PATCH] cirrus doesnt support macos 13 any more, so try it on github --- .cirrus.yml | 4 ++-- .github/workflows/build.yml | 48 +++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 9af98d1..bac33b9 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,4 +1,5 @@ -# download at https://api.cirrus-ci.com/v1/artifact/github/electronstudio/raylib-python-cffi/main/binary.zip +# download at https://api.cirrus-ci.com/v1/artifact/github/electronstudio/raylib-python-cffi/pi/binary.zip +# https://api.cirrus-ci.com/v1/artifact/github/electronstudio/raylib-python-cffi/mac/binary.zip pi_task: arm_container: @@ -33,7 +34,6 @@ pi_task: mac_task: macos_instance: matrix: - - image: ghcr.io/cirruslabs/macos-ventura-xcode:latest - image: ghcr.io/cirruslabs/macos-sonoma-xcode:latest env: matrix: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3104a96..e2bb13d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -62,6 +62,54 @@ jobs: name: wheel path: dist/* + build-mac-arm: + runs-on: macos-13-xlarge + strategy: + matrix: + python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-beta - 3.13.0', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10' ] + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Setup Python + uses: actions/setup-python@v2.2.2 + with: + # Version range or exact version of a Python version to use, using SemVer's version range syntax. + python-version: ${{ matrix.python-version }} + + + # Runs a set of commands using the runners shell + - name: Build raylib + run: | + cd raylib-c + mkdir build + cd build + cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. + make -j2 + sudo make install + + - name: Copy extras + run: | + sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/ + sudo cp physac/src/physac.h /usr/local/include/ + sudo cp raygui/src/raygui.h /usr/local/include/ + + - name: Build raylib-python-cffi + run: | + python -m pip install --upgrade pip + pip3 install "cffi>=1.17.0rc1" + pip3 install wheel + pip3 install setuptools + python setup.py bdist_wheel + + - name: Upload build Artifact wheel + uses: actions/upload-artifact@v2.2.4 + with: + name: wheel + path: dist/* + # build-mac12-arm64: # runs-on: macos-12 # strategy: