From ad986e9fdd336e159bcd20e1f65784a84e03fb00 Mon Sep 17 00:00:00 2001 From: richard Date: Tue, 28 Jun 2022 14:55:08 +0100 Subject: [PATCH] try macos 11 arm64 build --- .github/workflows/build.yml | 52 +++++++++++++++++++++++++++++++++++++ version.py | 2 +- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d4e8eae..808faf8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -109,6 +109,58 @@ jobs: name: wheel path: dist/* + + build-mac11-arm64: + runs-on: macos-11 + strategy: + matrix: + python-version: [ '3.9.13' ] + # Requires universal2 build of python, which we get if we ask for 3.10.5 x86! Pypy not available in universal2 + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Setup Python + uses: actions/setup-python@v2.2.2 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + + # Only build raylib for arm64 (although we could make a fat universal2 binary by asking for x86_64 as well) + - name: Build raylib + run: | + cd raylib-c + mkdir build + cd build + cmake -DBUILD_EXAMPLES=off -DCMAKE_OSX_ARCHITECTURES="arm64" -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release .. + make -j2 + sudo make install + - name: Copy extras + run: | + sudo cp physac/src/physac.h /usr/local/include/ + sudo cp raygui/src/raygui.h /usr/local/include/ + + # Name defaults to universal2 and it technically is, but it wont run on x86_64 because we didnt build raylib for that + # so symbols are missing. So we override name to arm64. Why don't we make a working universal2 wheel? Because + # I'd rather have a separate x86_64 that I can test, and I want it to work on 10_15 but I'm not sure a 'macosx_10_15_universal2' is valid + # given that there is no SDK for universal until macosx_11_0 + - name: Build raylib-python-cffi + run: | + python -m pip install --upgrade pip + pip3 install cffi + pip3 install wheel + python setup.py bdist_wheel --plat-name macosx_11_0_arm64 --py-limited-api=cp39 + + + - name: Upload build Artifact wheel + uses: actions/upload-artifact@v2.2.4 + with: + name: wheel + path: dist/* + + + build-linux: runs-on: ubuntu-18.04 strategy: diff --git a/version.py b/version.py index f799839..423d54c 100644 --- a/version.py +++ b/version.py @@ -1 +1 @@ -__version__ = "4.2.0.0.dev3" \ No newline at end of file +__version__ = "4.2.0.0.dev4" \ No newline at end of file