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:
matrix:
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:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
@ -50,12 +51,12 @@ jobs:
make -j2
sudo make install
- name: Build raylib with SDL
- name: Build raylib with SDL if selected
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 ..
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
sudo cp raylib/libraylib.a /usr/local/lib/libraylib.a
@ -71,7 +72,7 @@ jobs:
pip3 install "cffi>=1.17.1"
pip3 install wheel
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
uses: actions/upload-artifact@v3.2.1
@ -84,6 +85,7 @@ jobs:
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' ]
raylib-platform: ['Desktop', 'SDL']
env:
MACOSX_DEPLOYMENT_TARGET: 11.0
steps:
@ -119,12 +121,12 @@ jobs:
make -j2
sudo make install
- name: Build raylib with SDL
- name: Build raylib with SDL if selected
run: |
cd raylib-c
mkdir 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
sudo cp raylib/libraylib.a /usr/local/lib/libraylib.a
@ -140,7 +142,7 @@ jobs:
pip3 install "cffi>=1.17.1"
pip3 install wheel
pip3 install setuptools
python setup.py bdist_wheel
RAYLIB_PLATFORM=${{ matrix.raylib-platform }} python setup.py bdist_wheel
- name: Upload build Artifact wheel
uses: actions/upload-artifact@v3.2.1
@ -322,6 +324,7 @@ jobs:
# For example, pypy2 and pypy3
matrix:
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:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
@ -356,7 +359,7 @@ jobs:
cd raylib-c
mkdir 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
copy raylib\Release\raylib.lib ..\..
cd ..\..
@ -374,7 +377,7 @@ jobs:
del raylib\dynamic\*.dll >nul 2>&1
del raylib\dynamic\*.dylib >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
- name: Upload build Artifact wheel
@ -383,81 +386,81 @@ jobs:
name: wheel
path: dist/*
# source-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
# 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/*
source-distro:
runs-on: ubuntu-20.04
# 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/*
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:
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/*