This commit is contained in:
Richard Smith 2024-10-15 18:57:55 +01:00
parent 7f05708aad
commit e692b7ce99

View file

@ -16,6 +16,7 @@ jobs:
strategy: strategy:
matrix: matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10' ] python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10' ]
raylib-platform: ['Desktop', 'SDL']
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -50,12 +51,12 @@ jobs:
make -j2 make -j2
sudo make install sudo make install
- name: Build raylib with SDL - name: Build raylib with SDL if selected
run: | run: |
cd raylib-c cd raylib-c
mkdir build2 mkdir build2
cd 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 .. cmake -DPLATFORM=${{ matrix.raylib-platform }} -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
make -j2 make -j2
sudo cp raylib/libraylib.a /usr/local/lib/libraylib.a sudo cp raylib/libraylib.a /usr/local/lib/libraylib.a
@ -71,7 +72,7 @@ jobs:
pip3 install "cffi>=1.17.1" pip3 install "cffi>=1.17.1"
pip3 install wheel pip3 install wheel
pip3 install setuptools pip3 install setuptools
python setup.py bdist_wheel --plat-name macosx_10_15_x86_64 RAYLIB_PLATFORM=${{ matrix.raylib-platform }} python setup.py bdist_wheel --plat-name macosx_10_15_x86_64
- name: Upload build Artifact wheel - name: Upload build Artifact wheel
uses: actions/upload-artifact@v3.2.1 uses: actions/upload-artifact@v3.2.1
@ -84,6 +85,7 @@ jobs:
strategy: strategy:
matrix: matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10' ] python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10' ]
raylib-platform: ['Desktop', 'SDL']
env: env:
MACOSX_DEPLOYMENT_TARGET: 11.0 MACOSX_DEPLOYMENT_TARGET: 11.0
steps: steps:
@ -119,12 +121,12 @@ jobs:
make -j2 make -j2
sudo make install sudo make install
- name: Build raylib with SDL - name: Build raylib with SDL if selected
run: | run: |
cd raylib-c cd raylib-c
mkdir build2 mkdir build2
cd build2 cd build2
cmake -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DPLATFORM=SDL -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. cmake -DPLATFORM=${{ matrix.raylib-platform }} -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -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 make -j2
sudo cp raylib/libraylib.a /usr/local/lib/libraylib.a sudo cp raylib/libraylib.a /usr/local/lib/libraylib.a
@ -140,7 +142,7 @@ jobs:
pip3 install "cffi>=1.17.1" pip3 install "cffi>=1.17.1"
pip3 install wheel pip3 install wheel
pip3 install setuptools pip3 install setuptools
python setup.py bdist_wheel RAYLIB_PLATFORM=${{ matrix.raylib-platform }} python setup.py bdist_wheel
- name: Upload build Artifact wheel - name: Upload build Artifact wheel
uses: actions/upload-artifact@v3.2.1 uses: actions/upload-artifact@v3.2.1
@ -322,6 +324,7 @@ jobs:
# For example, pypy2 and pypy3 # For example, pypy2 and pypy3
matrix: matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10' ] python-version: [ '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10' ]
raylib-platform: ['Desktop', 'SDL']
steps: steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2 - uses: actions/checkout@v2
@ -356,7 +359,7 @@ jobs:
cd raylib-c cd raylib-c
mkdir build mkdir build
cd build cd build
cmake -DPLATFORM=SDL -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. cmake -DPLATFORM=${{ matrix.raylib-platform }} -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
msbuild raylib.sln /target:raylib /property:Configuration=Release msbuild raylib.sln /target:raylib /property:Configuration=Release
copy raylib\Release\raylib.lib ..\.. copy raylib\Release\raylib.lib ..\..
cd ..\.. cd ..\..
@ -374,7 +377,7 @@ jobs:
del raylib\dynamic\*.dll >nul 2>&1 del raylib\dynamic\*.dll >nul 2>&1
del raylib\dynamic\*.dylib >nul 2>&1 del raylib\dynamic\*.dylib >nul 2>&1
del raylib\dynamic\32bit\* >nul 2>&1 del raylib\dynamic\32bit\* >nul 2>&1
python setup.py bdist_wheel RAYLIB_PLATFORM=${{ matrix.raylib-platform }} python setup.py bdist_wheel
shell: cmd shell: cmd
- name: Upload build Artifact wheel - name: Upload build Artifact wheel
@ -383,81 +386,81 @@ jobs:
name: wheel name: wheel
path: dist/* path: dist/*
# source-distro: source-distro:
# runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
#
# steps:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v2
# with:
# submodules: recursive
#
# - 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: '3.12'
# # The target architecture (x86, x64) of the Python interpreter.
# architecture: x64
#
# - name: Build raylib
# run: |
# sudo apt update
# sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev
# 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: 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 sdist
#
# - name: Upload build Artifact wheel
# uses: actions/upload-artifact@v3.2.1
# with:
# name: wheel
# path: dist/*
# dynamic-distro: steps:
# runs-on: ubuntu-20.04 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
# - uses: actions/checkout@v2
# steps: with:
# # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it submodules: recursive
# - uses: actions/checkout@v2
# with: - name: Setup Python
# submodules: recursive uses: actions/setup-python@v2.2.2
# with:
# - name: Setup Python # Version range or exact version of a Python version to use, using SemVer's version range syntax.
# uses: actions/setup-python@v2.2.2 python-version: '3.12'
# with: # The target architecture (x86, x64) of the Python interpreter.
# # Version range or exact version of a Python version to use, using SemVer's version range syntax. architecture: x64
# python-version: '3.12'
# # The target architecture (x86, x64) of the Python interpreter. - name: Build raylib
# architecture: x64 run: |
# sudo apt update
# - name: Build raylib-python-cffi-dynamic sudo apt install libasound2-dev mesa-common-dev libx11-dev libxrandr-dev libxi-dev xorg-dev libgl1-mesa-dev libglu1-mesa-dev libwayland-dev libxkbcommon-dev
# run: | cd raylib-c
# python -m pip install --upgrade pip mkdir build
# pip3 install "cffi>=1.17.1" cd build
# pip3 install wheel cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release ..
# pip3 install setuptools make -j2
# cd dynamic sudo make install
# python setup.py sdist - name: Copy extras
# run: |
# - name: Upload build Artifact wheel sudo cp -r raylib-c/src/external/glfw/include/GLFW /usr/local/include/
# uses: actions/upload-artifact@v3.2.1 sudo cp physac/src/physac.h /usr/local/include/
# with: sudo cp raygui/src/raygui.h /usr/local/include/
# name: wheel
# path: dynamic/dist/* - 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 sdist
- name: Upload build Artifact wheel
uses: actions/upload-artifact@v3.2.1
with:
name: wheel
path: dist/*
dynamic-distro:
runs-on: ubuntu-20.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: recursive
- 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: '3.12'
# The target architecture (x86, x64) of the Python interpreter.
architecture: x64
- name: Build raylib-python-cffi-dynamic
run: |
python -m pip install --upgrade pip
pip3 install "cffi>=1.17.1"
pip3 install wheel
pip3 install setuptools
cd dynamic
python setup.py sdist
- name: Upload build Artifact wheel
uses: actions/upload-artifact@v3.2.1
with:
name: wheel
path: dynamic/dist/*