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-latest, windows-latest, macos-15]
46+
47+ # Use ubuntu 25.10 docker image instead of the ubuntu-latest which is older
48+ # at the time of writing of this comment, and therefore doesn't have SDL3
49+ # and friends.
50+ container : ${{ matrix.os == 'ubuntu-latest' && 'ubuntu:25.10' || '' }}
4651
4752 env :
4853 # Pip now forces us to either make a venv or set this flag, so we will do
@@ -53,76 +58,31 @@ jobs:
5358
5459 steps :
5560 - uses : actions/checkout@v6.0.1
56- - uses : actions/setup-python@v6
61+
62+ # windows runner has python 3.9 as default (at the time of writing of this)
63+ # which we don't support, so we need to setup a newer version ourselves here
64+ - name : Install pygame deps (windows)
65+ if : matrix.os == 'windows-latest'
66+ uses : actions/setup-python@v6
5767 with :
5868 python-version : ' 3.14'
5969
60- - name : Install pygame deps (linux)
61- if : matrix.os == 'ubuntu-24.04'
62- run : |
63- sudo apt-get update --fix-missing
64- sudo apt-get install libfreetype6-dev libportmidi-dev python3-dev
65-
6670 - name : Install pygame deps (mac)
67- if : matrix.os == 'macos-14'
68- run : brew install freetype portmidi
69-
70- # taken from https://wiki.libsdl.org/SDL3/README-linux#build-dependencies
71- - name : Install SDL3 deps (linux)
72- if : matrix.os == 'ubuntu-24.04'
73- run : >
74- sudo apt-get install build-essential git make
75- pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev
76- libaudio-dev libfribidi-dev libjack-dev libsndio-dev libx11-dev libxext-dev
77- libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev
78- libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev
79- libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev
80- libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev
71+ if : matrix.os == 'macos-15'
72+ run : brew install sdl3 sdl3_image sdl3_ttf freetype portmidi
8173
82- # taken from https://wiki.libsdl.org/SDL3/Installation
83- - name : Install SDL3
84- if : matrix.os != 'windows-latest'
85- run : |
86- git clone https://github.com/libsdl-org/SDL
87- cd SDL
88- mkdir build
89- cd build
90- cmake -DCMAKE_BUILD_TYPE=Release ..
91- cmake --build . --config Release --parallel
92- sudo cmake --install . --config Release
93-
94- - name : Install SDL3_image
95- if : matrix.os != 'windows-latest'
96- run : |
97- git clone https://github.com/libsdl-org/SDL_image
98- cd SDL_image
99- mkdir build
100- cd build
101- cmake -DCMAKE_BUILD_TYPE=Release ..
102- cmake --build . --config Release --parallel
103- sudo cmake --install . --config Release
104-
105- - name : Install SDL3_ttf
106- if : matrix.os != 'windows-latest'
74+ - name : Install pygame deps (linux)
75+ if : matrix.os == 'ubuntu-latest'
10776 run : |
108- git clone https://github.com/libsdl-org/SDL_ttf
109- cd SDL_ttf
110- mkdir build
111- cd build
112- cmake -DCMAKE_BUILD_TYPE=Release ..
113- cmake --build . --config Release --parallel
114- sudo cmake --install . --config Release
77+ apt-get update
78+ apt-get install -y python3-dev python3-pip \
79+ libsdl3-dev libsdl3-image-dev libsdl3-ttf-dev libfreetype6-dev libportmidi-dev
11580
116- - name : Build with SDL3
81+ - name : Build pygame-ce with SDL3
11782 run : python3 dev.py build --sdl3
11883
119- # eventually we need to run all tests, but for now test that importing pygame
120- # works
121- - name : Test import works
122- run : python3 -c 'import pygame'
123-
124- # - name: Run tests
125- # env:
126- # SDL_VIDEODRIVER: "dummy"
127- # SDL_AUDIODRIVER: "disk"
128- # run: python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300
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