try macos 11 arm64 build

This commit is contained in:
richard 2022-06-28 14:55:08 +01:00
parent 9348371545
commit ad986e9fdd
2 changed files with 53 additions and 1 deletions

View file

@ -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: