-
Notifications
You must be signed in to change notification settings - Fork 49
250 lines (200 loc) · 6.88 KB
/
run_tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
name: Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
create:
branches: [master]
tags: ['**']
jobs:
# Test on Python 2.7 with Linux and latest SDL2
test-linux-py27:
name: Linux (Python 2.7, SDL ${{ matrix.sdl2 }})
runs-on: ubuntu-20.04
container: python:2.7
strategy:
matrix:
sdl2: ['2.30.10']
env:
PYSDL2_DLL_VERSION: ${{ matrix.sdl2 }}
SDL_VIDEODRIVER: dummy
SDL_AUDIODRIVER: dummy
SDL_RENDER_DRIVER: software
PYTHONFAULTHANDLER: 1
steps:
- uses: actions/checkout@v2
- name: Install dependencies and latest SDL2 binaries
run: |
python -m pip install --upgrade pip
python -m pip install --prefer-binary numpy pytest pillow
python -m pip install pysdl2-dll==$PYSDL2_DLL_VERSION
- name: Install and test PySDL2
run: |
python -m pip install .
python -B -m pytest -vvl -rxXP
# Test on all supported Python versions with Linux and latest SDL2
# Experimental: Also test on latest PyPy 2.7 and 3.x versions with Linux and latest SDL2
test-linux:
name: ${{ matrix.name-prefix }}${{ matrix.python-version }}, SDL ${{ matrix.sdl2 }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.10', '3.11', '3.12', '3.13']
sdl2: ['2.30.10']
name-prefix: ['Linux (Python ']
include:
- python-version: 'pypy-2.7'
sdl2: '2.30.10'
name-prefix: 'Experimental / Linux ('
- python-version: 'pypy-3.10'
sdl2: '2.30.10'
name-prefix: 'Experimental / Linux ('
env:
PYSDL2_DLL_VERSION: ${{ matrix.sdl2 }}
SDL_VIDEODRIVER: dummy
SDL_AUDIODRIVER: dummy
SDL_RENDER_DRIVER: software
PYTHONFAULTHANDLER: 1
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and latest SDL2 binaries
run: |
python -m pip install --upgrade pip
python -m pip install --prefer-binary numpy pytest pillow
python -m pip install pysdl2-dll==$PYSDL2_DLL_VERSION
- name: Install and test PySDL2
run: |
python -m pip install .
python -B -m pytest -vvl -rxXP
# Test on previous Python release with last 3 SDL2 releases on macOS
# All tests run without Numpy/Pillow deps to make sure things work without them
# Experimental: Test on previous Python release with latest Homebrew SDL2
test-macos:
name: ${{ matrix.name-prefix }}${{ matrix.python-version }}, SDL ${{ matrix.sdl2 }})
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.12']
sdl2: ['2.30.10', '2.28.5', '2.26.5']
name-prefix: ['macOS (Python ']
include:
- python-version: '3.12'
sdl2: 'from Homebrew'
name-prefix: 'Experimental / macOS (Python '
env:
PYSDL2_DLL_VERSION: ${{ matrix.sdl2 }}
SDL_VIDEODRIVER: dummy
SDL_RENDER_DRIVER: software
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools pytest
- name: Install latest SDL2 via Homebrew
if: ${{ matrix.sdl2 == 'from Homebrew' }}
run: |
brew install sdl2 sdl2_mixer sdl2_ttf sdl2_image sdl2_gfx
- name: Download SDL2 binaries
if: ${{ matrix.sdl2 != 'from Homebrew' }}
run: |
python .ci/getsdl2.py
- name: Install and test PySDL2
run: |
export PYSDL2_DLL_PATH=$(pwd)/dlls
python -m pip install .
python -B -m pytest -vvl -rxXP
# Test against all supported versions of SDL2 on Windows
test-windows:
name: ${{ matrix.name-prefix }}${{ matrix.python-version }}, SDL ${{ matrix.sdl2 }})
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.11']
architecture: ['x64']
sdl2: [
'2.0.5', '2.0.6', '2.0.7', '2.0.8', '2.0.9', '2.0.10', '2.0.12',
'2.0.14', '2.0.16', '2.0.18', '2.0.20', '2.0.22', '2.24.0', '2.26.5',
'2.28.5', '2.30.10'
]
name-prefix: ['Windows (Python ']
include:
- python-version: '3.11'
architecture: 'x86'
sdl2: '2.30.10'
name-prefix: 'Windows 32-bit (Python '
- python-version: '3.11'
architecture: 'x86'
sdl2: '2.0.22'
name-prefix: 'Windows 32-bit (Python '
- python-version: '3.11'
architecture: 'x86'
sdl2: '2.0.5'
name-prefix: 'Windows 32-bit (Python '
env:
PYSDL2_DLL_VERSION: ${{ matrix.sdl2 }}
SDL_VIDEODRIVER: dummy
SDL_AUDIODRIVER: dummy
SDL_RENDER_DRIVER: software
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --prefer-binary numpy pytest pillow
- name: Download SDL2 binaries
run: |
python .ci/getsdl2.py
- name: Install and test PySDL2
run: |
$env:PYSDL2_DLL_PATH = "$pwd\dlls"
python -m pip install .
python -B -m pytest -vvl -rxXP
# Test select versions of SDL2 on Windows with Python 2.7
test-windows-py27:
name: Windows 32-bit (Python 2.7, SDL ${{ matrix.sdl2 }})
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
architecture: ['x86']
sdl2: ['2.30.10', '2.0.5']
env:
PYSDL2_DLL_VERSION: ${{ matrix.sdl2 }}
SDL_VIDEODRIVER: dummy
SDL_AUDIODRIVER: dummy
SDL_RENDER_DRIVER: software
steps:
- uses: actions/checkout@v2
- name: Set up Python 2.7
run: |
choco install python2 --x86
- name: Install dependencies
run: |
C:\Python27\python -m pip install --upgrade pip
C:\Python27\python -m pip install --prefer-binary numpy pytest pillow
- name: Download SDL2 binaries
run: |
C:\Python27\python .ci/getsdl2.py
- name: Install and test PySDL2
run: |
$env:PYSDL2_DLL_PATH = "$pwd\dlls"
C:\Python27\python -m pip install .
C:\Python27\python -B -m pytest -vvl -rxXP