Skip to content

Commit ad986e9

Browse files
try macos 11 arm64 build
1 parent 9348371 commit ad986e9

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

.github/workflows/build.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,58 @@ jobs:
109109
name: wheel
110110
path: dist/*
111111

112+
113+
build-mac11-arm64:
114+
runs-on: macos-11
115+
strategy:
116+
matrix:
117+
python-version: [ '3.9.13' ]
118+
# Requires universal2 build of python, which we get if we ask for 3.10.5 x86! Pypy not available in universal2
119+
steps:
120+
- uses: actions/checkout@v2
121+
with:
122+
submodules: recursive
123+
124+
- name: Setup Python
125+
uses: actions/[email protected]
126+
with:
127+
python-version: ${{ matrix.python-version }}
128+
architecture: x64
129+
130+
# Only build raylib for arm64 (although we could make a fat universal2 binary by asking for x86_64 as well)
131+
- name: Build raylib
132+
run: |
133+
cd raylib-c
134+
mkdir build
135+
cd build
136+
cmake -DBUILD_EXAMPLES=off -DCMAKE_OSX_ARCHITECTURES="arm64" -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release ..
137+
make -j2
138+
sudo make install
139+
- name: Copy extras
140+
run: |
141+
sudo cp physac/src/physac.h /usr/local/include/
142+
sudo cp raygui/src/raygui.h /usr/local/include/
143+
144+
# Name defaults to universal2 and it technically is, but it wont run on x86_64 because we didnt build raylib for that
145+
# so symbols are missing. So we override name to arm64. Why don't we make a working universal2 wheel? Because
146+
# 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
147+
# given that there is no SDK for universal until macosx_11_0
148+
- name: Build raylib-python-cffi
149+
run: |
150+
python -m pip install --upgrade pip
151+
pip3 install cffi
152+
pip3 install wheel
153+
python setup.py bdist_wheel --plat-name macosx_11_0_arm64 --py-limited-api=cp39
154+
155+
156+
- name: Upload build Artifact wheel
157+
uses: actions/[email protected]
158+
with:
159+
name: wheel
160+
path: dist/*
161+
162+
163+
112164
build-linux:
113165
runs-on: ubuntu-18.04
114166
strategy:

version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "4.2.0.0.dev3"
1+
__version__ = "4.2.0.0.dev4"

0 commit comments

Comments
 (0)