Skip to content

Commit ae7e328

Browse files
committed
SDL3: skip tests of unported stuff, run on CI
1 parent 179b3bc commit ae7e328

File tree

10 files changed

+81
-17
lines changed

10 files changed

+81
-17
lines changed

.github/workflows/build-sdl3.yml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
strategy:
4343
fail-fast: false # if a particular matrix build fails, don't skip the rest
4444
matrix:
45-
os: [ubuntu-24.04, windows-latest, macos-14]
45+
os: [ubuntu-24.04, windows-latest, macos-15]
4646

4747
env:
4848
# Pip now forces us to either make a venv or set this flag, so we will do
@@ -61,10 +61,10 @@ jobs:
6161
sudo apt-get install libfreetype6-dev libportmidi-dev python3-dev
6262
6363
- name: Install pygame deps (mac)
64-
if: matrix.os == 'macos-14'
65-
run: brew install freetype portmidi
64+
if: matrix.os == 'macos-15'
65+
run: brew install freetype portmidi libtiff webp
6666

67-
# taken from dependencies of the 'libsdl2-dev' package
67+
# taken from dependencies of the 'libsdl2-dev' & 'libsdl2-image-dev' packages
6868
- name: Install SDL deps (linux)
6969
if: matrix.os == 'ubuntu-24.04'
7070
run: >
@@ -73,6 +73,7 @@ jobs:
7373
libsamplerate0-dev libsndio-dev libudev-dev libwayland-dev libx11-dev
7474
libxcursor-dev libxext-dev libxfixes-dev libxi-dev libxinerama-dev
7575
libxkbcommon-dev libxrandr-dev libxss-dev libxt-dev libxv-dev libxxf86vm-dev
76+
libjpeg-dev libpng-dev libtiff-dev libwebp-dev
7677
7778
# taken from https://wiki.libsdl.org/SDL3/Installation
7879
- name: Install SDL3
@@ -93,7 +94,9 @@ jobs:
9394
cd SDL_image
9495
mkdir build
9596
cd build
96-
cmake -DCMAKE_BUILD_TYPE=Release ..
97+
cmake -DCMAKE_BUILD_TYPE=Release -DSDLIMAGE_VENDORED=0 \
98+
-DSDLIMAGE_BACKEND_STB=0 -DSDLIMAGE_BACKEND_IMAGEIO=0 \
99+
-DSDLIMAGE_AVIF=0 -DSDLIMAGE_JXL=0 -DSDLIMAGE_TIF=1 -DSDLIMAGE_WEBP=1 ..
97100
cmake --build . --config Release --parallel
98101
sudo cmake --install . --config Release
99102
@@ -111,13 +114,8 @@ jobs:
111114
- name: Build with SDL3
112115
run: python3 dev.py build --sdl3
113116

114-
# eventually we need to run all tests, but for now test that importing pygame
115-
# works
116-
- name: Test import works
117-
run: python3 -c 'import pygame'
118-
119-
# - name: Run tests
120-
# env:
121-
# SDL_VIDEODRIVER: "dummy"
122-
# SDL_AUDIODRIVER: "disk"
123-
# run: python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300
117+
- name: Run tests
118+
env:
119+
SDL_VIDEODRIVER: "dummy"
120+
SDL_AUDIODRIVER: "disk"
121+
run: python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300

test/controller_tags.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import pygame
2+
3+
__tags__ = ["sdl3_skip"]
4+
5+
exclude = pygame.get_sdl_version() >= (3, 0, 0)
6+
7+
if exclude:
8+
__tags__.extend(("ignore", "subprocess_ignore"))

test/gfxdraw_tags.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import pygame
2+
3+
__tags__ = ["sdl3_skip"]
4+
5+
exclude = pygame.get_sdl_version() >= (3, 0, 0)
6+
7+
if exclude:
8+
__tags__.extend(("ignore", "subprocess_ignore"))

test/joystick_tags.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import pygame
2+
3+
__tags__ = ["sdl3_skip"]
4+
5+
exclude = pygame.get_sdl_version() >= (3, 0, 0)
6+
7+
if exclude:
8+
__tags__.extend(("ignore", "subprocess_ignore"))

test/mixer_music_tags.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import pygame
2+
3+
__tags__ = ["sdl3_skip"]
4+
5+
exclude = pygame.get_sdl_version() >= (3, 0, 0)
6+
7+
if exclude:
8+
__tags__.extend(("ignore", "subprocess_ignore"))

test/mixer_tags.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import pygame
2+
3+
__tags__ = ["sdl3_skip"]
4+
5+
exclude = pygame.get_sdl_version() >= (3, 0, 0)
6+
7+
if exclude:
8+
__tags__.extend(("ignore", "subprocess_ignore"))

test/render_tags.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import pygame
2+
3+
__tags__ = ["sdl3_skip"]
4+
5+
exclude = pygame.get_sdl_version() >= (3, 0, 0)
6+
7+
if exclude:
8+
__tags__.extend(("ignore", "subprocess_ignore"))

test/sndarray_tags.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
__tags__ = ["array"]
1+
import pygame
22

3-
exclude = False
3+
__tags__ = ["array", "sdl3_skip"]
4+
5+
exclude = pygame.get_sdl_version() >= (3, 0, 0)
46

57
try:
68
import numpy

test/touch_tags.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import pygame
2+
3+
__tags__ = ["sdl3_skip"]
4+
5+
exclude = pygame.get_sdl_version() >= (3, 0, 0)
6+
7+
if exclude:
8+
__tags__.extend(("ignore", "subprocess_ignore"))

test/video_tags.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import pygame
2+
3+
__tags__ = ["sdl3_skip"]
4+
5+
exclude = pygame.get_sdl_version() >= (3, 0, 0)
6+
7+
if exclude:
8+
__tags__.extend(("ignore", "subprocess_ignore"))

0 commit comments

Comments
 (0)