From 467263a43de43f97d189f42824eecedba5e1da8a Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 15 Oct 2024 17:07:26 +0100 Subject: [PATCH] try --- .github/workflows/build.yml | 69 +++++++++++++++++++++++++++++++++++-- 1 file changed, 66 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ee5c4f..d965433 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: