Skip to content

Commit f6162fd

Browse files
committed
Add SDL3 CI
1 parent 136b9dd commit f6162fd

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

.github/workflows/build-sdl3.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# SDL3 porting is WIP
2+
name: SDL3 build
3+
4+
# Run CI only when a release is created, on changes to main branch, or any PR
5+
# to main. Do not run CI on any other branch. Also, skip any non-source changes
6+
# from running on CI
7+
on:
8+
push:
9+
branches: main
10+
paths-ignore:
11+
- 'docs/**'
12+
- 'examples/**'
13+
- '.gitignore'
14+
- '*.rst'
15+
- '*.md'
16+
- '.github/workflows/*.yml'
17+
# re-include current file to not be excluded
18+
- '!.github/workflows/build-sdl3.yml'
19+
20+
pull_request:
21+
branches: main
22+
paths-ignore:
23+
- 'docs/**'
24+
- 'examples/**'
25+
- '.gitignore'
26+
- '*.rst'
27+
- '*.md'
28+
- '.github/workflows/*.yml'
29+
# re-include current file to not be excluded
30+
- '!.github/workflows/build-sdl3.yml'
31+
32+
# the github release drafter can call this workflow
33+
workflow_call:
34+
35+
concurrency:
36+
group: ${{ github.workflow }}-${{ github.ref }}-ubuntu-sdist
37+
cancel-in-progress: true
38+
39+
jobs:
40+
build:
41+
runs-on: ${{ matrix.os }}
42+
strategy:
43+
fail-fast: false # if a particular matrix build fails, don't skip the rest
44+
matrix:
45+
os: [ubuntu-24.04, windows-latest, macos-14]
46+
47+
env:
48+
# Pip now forces us to either make a venv or set this flag, so we will do
49+
# this
50+
PIP_BREAK_SYSTEM_PACKAGES: 1
51+
# We are using dependencies installed from apt
52+
PG_DEPS_FROM_SYSTEM: 1
53+
54+
steps:
55+
- uses: actions/checkout@v4.2.0
56+
57+
- name: Install deps (linux)
58+
if: matrix.os == 'ubuntu-24.04'
59+
run: sudo apt-get install libfreetype6-dev libportmidi-dev python3-dev
60+
61+
- name: Install deps (mac)
62+
if: matrix.os == 'macos-14'
63+
run: brew install freetype portmidi
64+
65+
# taken from https://wiki.libsdl.org/SDL3/Installation
66+
- name: Install SDL3
67+
if: matrix.os != 'windows-latest'
68+
run: |
69+
git clone https://github.com/libsdl-org/SDL
70+
cd SDL
71+
mkdir build
72+
cd build
73+
cmake -DCMAKE_BUILD_TYPE=Release ..
74+
cmake --build . --config Release --parallel
75+
sudo cmake --install . --config Release
76+
77+
- name: Make sdist and install it
78+
run: >
79+
python3 -m pip install . -v -Csetup-args=-Dsdl_api=3
80+
-Csetup-args=-Dimage=disabled
81+
-Csetup-args=-Dmixer=disabled
82+
-Csetup-args=-Dfont=disabled
83+
84+
# - name: Run tests
85+
# env:
86+
# SDL_VIDEODRIVER: "dummy"
87+
# SDL_AUDIODRIVER: "disk"
88+
# run: python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300

0 commit comments

Comments
 (0)