This commit is contained in:
Richard Smith 2024-10-15 17:07:26 +01:00
parent 2ffd22435a
commit 467263a43d

View file

@ -11,13 +11,11 @@ on:
jobs:
build-mac:
build-mac-intel:
runs-on: macos-12
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10' ]
env:
MACOSX_DEPLOYMENT_TARGET: 10.15
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
@ -81,7 +79,72 @@ jobs:
name: wheel
path: dist/*
build-mac-arm:
runs-on: macos-14
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '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: Build SDL
run: |
wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-2.30.7.tar.gz
tar xvfz release-2.30.7.tar.gz
mkdir build
cd build
cmake ../SDL-release-2.30.7 -DSDL_SHARED=OFF -DSDL_STATIC=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release
sudo cmake --install .
- 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 without SDL because SDL version has incorrect pkg-config
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: Build raylib with SDL
run: |
cd raylib-c
mkdir build2
cd build2
cmake -DPLATFORM=SDL -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
make -j2
sudo cp raylib/libraylib.a /usr/local/lib/libraylib.a
- 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.1"
pip3 install wheel
pip3 install setuptools
python setup.py bdist_wheel
- name: Upload build Artifact wheel
uses: actions/upload-artifact@v3.2.1
with:
name: wheel
path: dist/*
# build-mac12-arm64:
# runs-on: macos-12
# strategy: