Skip to content

Commit 9a6064f

Browse files
Update build.yml
1 parent aa74be0 commit 9a6064f

1 file changed

Lines changed: 93 additions & 52 deletions

File tree

.github/workflows/build.yml

Lines changed: 93 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
workflow_dispatch:
1111
inputs:
1212
publish_to_pypi:
13-
description: 'Publish to PyPI?'
13+
description: "Publish to PyPI?"
1414
type: boolean
1515
required: true
1616
default: false
@@ -20,10 +20,21 @@ jobs:
2020
runs-on: macos-15-intel
2121
strategy:
2222
matrix:
23-
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14', 'pypy-3.11' ]
24-
raylib-platform: ['Desktop', 'SDL']
23+
python-version:
24+
[
25+
"3.7",
26+
"3.8",
27+
"3.9",
28+
"3.10",
29+
"3.11",
30+
"3.12",
31+
"3.13",
32+
"3.14",
33+
"pypy-3.11",
34+
]
35+
raylib-platform: ["Desktop", "SDL"]
2536
env:
26-
MACOSX_DEPLOYMENT_TARGET: '10.13'
37+
MACOSX_DEPLOYMENT_TARGET: "10.13"
2738
steps:
2839
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2940
- uses: actions/checkout@v4
@@ -127,15 +138,14 @@ jobs:
127138
name: wheel-mac-${{ matrix.raylib-platform }}-${{ matrix.python-version }}
128139
path: dist/*
129140

130-
131141
build-mac-arm64:
132142
runs-on: macos-14
133143
strategy:
134144
matrix:
135-
python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14']
136-
raylib-platform: ['Desktop', 'SDL']
145+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
146+
raylib-platform: ["Desktop", "SDL"]
137147
env:
138-
MACOSX_DEPLOYMENT_TARGET: '11'
148+
MACOSX_DEPLOYMENT_TARGET: "11"
139149
steps:
140150
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
141151
- uses: actions/checkout@v4
@@ -239,8 +249,6 @@ jobs:
239249
name: wheel-mac-arm64-${{ matrix.raylib-platform }}-${{ matrix.python-version }}
240250
path: dist/*
241251

242-
243-
244252
build-linux:
245253
runs-on: ubuntu-latest
246254
container:
@@ -253,8 +261,19 @@ jobs:
253261
# You can use PyPy versions in python-version.
254262
# For example, pypy2 and pypy3
255263
matrix:
256-
python-version: ['python3.7', 'python3.8', 'python3.9', 'python3.10', 'python3.11', 'python3.12', 'python3.13', 'python3.14', 'pypy3.11']
257-
raylib-platform: ['Desktop', 'SDL', 'DRM', 'SDL_SOFT']
264+
python-version:
265+
[
266+
"python3.7",
267+
"python3.8",
268+
"python3.9",
269+
"python3.10",
270+
"python3.11",
271+
"python3.12",
272+
"python3.13",
273+
"python3.14",
274+
"pypy3.11",
275+
]
276+
raylib-platform: ["Desktop", "SDL", "DRM", "SDL_SOFT"]
258277
steps:
259278
- name: fix node
260279
run: |
@@ -359,15 +378,14 @@ jobs:
359378
- name: Publish to PyPI
360379
if: ${{ inputs.publish_to_pypi == true }}
361380
run: |
362-
python3.13 -m twine upload -u __token__ -p ${{ secrets.PYPI_KEY }} wheelhouse/*.whl
381+
python3.13 -m twine upload -u __token__ -p ${{ secrets.PYPI_KEY }} wheelhouse/*.whl
363382
364383
- name: Upload build Artifact wheel
365384
uses: actions/upload-artifact@v4
366385
with:
367386
name: wheel-linux-${{ matrix.raylib-platform }}-${{ matrix.python-version }}
368387
path: wheelhouse/*
369388

370-
371389
build-linux32:
372390
runs-on: ubuntu-latest
373391
container:
@@ -380,8 +398,18 @@ jobs:
380398
# You can use PyPy versions in python-version.
381399
# For example, pypy2 and pypy3
382400
matrix:
383-
python-version: ['python3.7', 'python3.8', 'python3.9', 'python3.10', 'python3.11', 'python3.12', 'python3.13', 'python3.14']
384-
raylib-platform: ['Desktop', 'SDL', 'DRM', 'SDL_SOFT']
401+
python-version:
402+
[
403+
"python3.7",
404+
"python3.8",
405+
"python3.9",
406+
"python3.10",
407+
"python3.11",
408+
"python3.12",
409+
"python3.13",
410+
"python3.14",
411+
]
412+
raylib-platform: ["Desktop", "SDL", "DRM", "SDL_SOFT"]
385413
steps:
386414
- name: fix node
387415
run: |
@@ -487,7 +515,7 @@ jobs:
487515
- name: Publish to PyPI
488516
if: ${{ inputs.publish_to_pypi == true }}
489517
run: |
490-
python3.13 -m twine upload -u __token__ -p ${{ secrets.PYPI_KEY }} wheelhouse/*.whl
518+
python3.13 -m twine upload -u __token__ -p ${{ secrets.PYPI_KEY }} wheelhouse/*.whl
491519
492520
- name: Upload build Artifact wheel
493521
uses: actions/upload-artifact@v4
@@ -499,8 +527,8 @@ jobs:
499527
runs-on: ubuntu-22.04-arm
500528
strategy:
501529
matrix:
502-
python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14']
503-
raylib-platform: [ 'Desktop', 'SDL', 'SDL_SOFT' ]
530+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
531+
raylib-platform: ["Desktop", "SDL", "SDL_SOFT"]
504532
steps:
505533
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
506534
- uses: actions/checkout@v4
@@ -532,8 +560,6 @@ jobs:
532560
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
533561
python-version: ${{ matrix.python-version }}
534562

535-
536-
537563
- name: Build raylib with SDL if selected
538564
run: |
539565
cd raylib-c
@@ -610,40 +636,33 @@ jobs:
610636
- name: Publish to PyPI
611637
if: ${{ inputs.publish_to_pypi == true }}
612638
run: |
613-
python3 -m twine upload -u __token__ -p ${{ secrets.PYPI_KEY }} wheelhouse/*.whl
639+
python3 -m twine upload -u __token__ -p ${{ secrets.PYPI_KEY }} wheelhouse/*.whl
614640
615641
- name: Upload build Artifact wheel
616642
uses: actions/upload-artifact@v4
617643
with:
618644
name: wheel-linux-arm64-${{ matrix.raylib-platform }}-${{ matrix.python-version }}
619645
path: wheelhouse/*
620646

621-
622647
build-linux-arm64-drm:
623648
runs-on: ubuntu-22.04-arm
624649
container:
625650
image: electronstudio/raspberrypi-os:${{ matrix.docker-tag }}
626651
options: --user root
627-
volumes:
628-
- /tmp:/__e/node20
629652
strategy:
630653
matrix:
631654
include:
632-
- python-version: '3.10'
633-
docker-tag: 'python3.10-bookworm'
634-
- python-version: '3.11'
635-
docker-tag: 'python3.11-bullseye'
636-
- python-version: '3.12'
637-
docker-tag: 'python3.12-bullseye'
638-
- python-version: '3.13'
639-
docker-tag: 'python3.13-bookworm'
640-
- python-version: '3.14'
641-
docker-tag: 'python3.14-bookworm'
655+
- python-version: "3.10"
656+
docker-tag: "python3.10-bookworm"
657+
- python-version: "3.11"
658+
docker-tag: "python3.11-bullseye"
659+
- python-version: "3.12"
660+
docker-tag: "python3.12-bullseye"
661+
- python-version: "3.13"
662+
docker-tag: "python3.13-bookworm"
663+
- python-version: "3.14"
664+
docker-tag: "python3.14-bookworm"
642665
steps:
643-
- name: fix node
644-
run: |
645-
ln -s /usr/local/bin /__e/node20/bin
646-
647666
- name: update cmake
648667
run: |
649668
wget https://github.com/Kitware/CMake/releases/download/v3.31.10/cmake-3.31.10-linux-aarch64.tar.gz
@@ -735,17 +754,26 @@ jobs:
735754
name: wheel-linux-arm64-DRM-${{ matrix.python-version }}
736755
path: wheelhouse/*
737756

738-
739-
740757
build-windows:
741758
# The type of runner that the job will run on
742759
runs-on: windows-2022
743760
strategy:
744761
# You can use PyPy versions in python-version.
745762
# For example, pypy2 and pypy3
746763
matrix:
747-
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14', 'pypy-3.11' ]
748-
raylib-platform: ['Desktop', 'SDL', 'SDL_SOFT']
764+
python-version:
765+
[
766+
"3.7",
767+
"3.8",
768+
"3.9",
769+
"3.10",
770+
"3.11",
771+
"3.12",
772+
"3.13",
773+
"3.14",
774+
"pypy-3.11",
775+
]
776+
raylib-platform: ["Desktop", "SDL", "SDL_SOFT"]
749777
steps:
750778
- uses: actions/checkout@v4
751779
with:
@@ -798,7 +826,7 @@ jobs:
798826
shell: bash
799827

800828
- name: Build raylib2
801-
run: |
829+
run: |
802830
cd raylib-c/build
803831
msbuild raylib.sln /target:raylib /property:Configuration=Release
804832
cp raylib\Release\raylib.lib ..\..
@@ -842,13 +870,13 @@ jobs:
842870
- name: Publish to PyPI
843871
if: ${{ inputs.publish_to_pypi == true }}
844872
run: |
845-
python3 -m twine upload -u __token__ -p ${{ secrets.PYPI_KEY }} dist/*.whl
846-
873+
python3 -m twine upload -u __token__ -p ${{ secrets.PYPI_KEY }} dist/*.whl
874+
847875
- name: Upload build Artifact wheel
848876
uses: actions/upload-artifact@v4
849877
with:
850878
name: wheel-windows-${{ matrix.raylib-platform }}-${{ matrix.python-version }}
851-
path: dist/*
879+
path: dist/*
852880

853881
build-windows32:
854882
# The type of runner that the job will run on
@@ -857,8 +885,9 @@ jobs:
857885
# You can use PyPy versions in python-version.
858886
# For example, pypy2 and pypy3
859887
matrix:
860-
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14' ]
861-
raylib-platform: [ 'Desktop', 'SDL', 'SDL_SOFT']
888+
python-version:
889+
["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
890+
raylib-platform: ["Desktop", "SDL", "SDL_SOFT"]
862891
steps:
863892
- uses: actions/checkout@v4
864893
with:
@@ -982,7 +1011,7 @@ jobs:
9821011
uses: actions/setup-python@v5
9831012
with:
9841013
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
985-
python-version: '3.12'
1014+
python-version: "3.12"
9861015
# The target architecture (x86, x64) of the Python interpreter.
9871016
architecture: x64
9881017

@@ -1039,7 +1068,7 @@ jobs:
10391068
uses: actions/setup-python@v5
10401069
with:
10411070
# Version range or exact version of a Python version to use, using SemVer's version range syntax.
1042-
python-version: '3.12'
1071+
python-version: "3.12"
10431072
# The target architecture (x86, x64) of the Python interpreter.
10441073
architecture: x64
10451074

@@ -1065,7 +1094,19 @@ jobs:
10651094
path: dynamic/dist/*
10661095

10671096
merge:
1068-
needs: [build-mac-intel, build-mac-arm64, build-windows, build-linux, build-linux-arm64, build-linux-arm64-drm, build-linux32, build-windows32, source-distro, dynamic-distro]
1097+
needs:
1098+
[
1099+
build-mac-intel,
1100+
build-mac-arm64,
1101+
build-windows,
1102+
build-linux,
1103+
build-linux-arm64,
1104+
build-linux-arm64-drm,
1105+
build-linux32,
1106+
build-windows32,
1107+
source-distro,
1108+
dynamic-distro,
1109+
]
10691110
runs-on: ubuntu-latest
10701111
steps:
10711112
- name: Merge All Artifacts

0 commit comments

Comments
 (0)