@@ -164,31 +164,43 @@ jobs:
164
164
- name : Setuptools helpers test
165
165
run : pytest tests/extra_setuptools
166
166
167
- valgrind :
167
+
168
+ deadsnakes :
169
+ strategy :
170
+ fail-fast : false
171
+ matrix :
172
+ python :
173
+ - version : 3.9
174
+ debug : true
175
+ valgrind : true
176
+ - version : 3.10-dev
177
+ debug : false
178
+
179
+ name : " 🐍 ${{ matrix.python.version }}${{ matrix.python.debug && ' (debug)' || '' }}${{ matrix.valgrind && ' • Valgrind' || '' }} • deadsnakes • x64"
168
180
runs-on : ubuntu-latest
169
- name : " 🐍 3.9 (debug) • Valgrind"
170
181
171
182
steps :
172
183
- uses : actions/checkout@v2
173
184
174
- - name : Install debug Python
185
+ - name : Setup Python ${{ matrix.python.version }} (deadsnakes)
175
186
uses : deadsnakes/action@v2.1.1
176
187
with :
177
- python-version : 3.9
178
- debug : true
188
+ python-version : ${{ matrix.python.version }}
189
+ debug : ${{ matrix.python.debug }}
179
190
180
191
- name : Update CMake
181
192
uses : jwlawson/actions-setup-cmake@v1.6
182
193
183
194
- name : Valgrind cache
195
+ if : matrix.valgrind
184
196
uses : actions/cache@v2
185
197
id : cache-valgrind
186
198
with :
187
199
path : valgrind
188
200
key : 3.16.1 # Valgrind version
189
201
190
202
- name : Compile Valgrind
191
- if : steps.cache-valgrind.outputs.cache-hit != 'true'
203
+ if : matrix.valgrind && steps.cache-valgrind.outputs.cache-hit != 'true'
192
204
run : |
193
205
VALGRIND_VERSION=3.16.1
194
206
curl https://sourceware.org/pub/valgrind/valgrind-$VALGRIND_VERSION.tar.bz2 -o - | tar xj
@@ -198,13 +210,12 @@ jobs:
198
210
make -j 2 > /dev/null
199
211
200
212
- name : Install Valgrind
213
+ if : matrix.valgrind
201
214
working-directory : valgrind
202
- run : sudo make install
203
-
204
- - name : Install requirement for Valgrind
205
215
run : |
216
+ sudo make install
206
217
sudo apt-get update
207
- sudo apt-get install libc6-dbg
218
+ sudo apt-get install libc6-dbg # Needed by Valgrind
208
219
209
220
- name : Prepare env
210
221
run : python -m pip install -r tests/requirements.txt --prefer-binary
@@ -224,51 +235,13 @@ jobs:
224
235
- name : Python tests
225
236
run : cmake --build build --target pytest
226
237
227
- - name : Run Valgrind on Python tests
228
- run : cmake --build build --target memcheck
229
-
230
- deadsnakes :
231
- strategy :
232
- fail-fast : false
233
- matrix :
234
- python :
235
- - version : 3.9
236
- debug : true
237
- - version : 3.10-dev
238
- debug : false
239
-
240
- name : " 🐍 ${{ matrix.python.version }}${{ matrix.python.debug && ' (debug)' || '' }} • deadsnakes • x64"
241
- runs-on : ubuntu-latest
242
-
243
- steps :
244
- - uses : actions/checkout@v2
245
-
246
- - name : Setup Python ${{ matrix.python.version }} (deadsnakes)
247
- uses : deadsnakes/action@v2.1.1
248
- with :
249
- python-version : ${{ matrix.python.version }}
250
- debug : ${{ matrix.python.debug }}
251
-
252
- - name : Prepare env
253
- run : python -m pip install -r tests/requirements.txt --prefer-binary
254
-
255
- - name : Configure
256
- run : >
257
- cmake -S . -B build
258
- -DPYBIND11_WERROR=ON
259
- -DDOWNLOAD_CATCH=ON
260
- -DDOWNLOAD_EIGEN=ON
261
- -DCMAKE_CXX_STANDARD=17
262
-
263
- - name : Build
264
- run : cmake --build build -j 2
265
-
266
- - name : Python tests
267
- run : cmake --build build --target pytest
268
-
269
238
- name : C++ tests
270
239
run : cmake --build build --target cpptest
271
240
241
+ - name : Run Valgrind on Python tests
242
+ if : matrix.valgrind
243
+ run : cmake --build build --target memcheck
244
+
272
245
273
246
# Testing on clang using the excellent silkeh clang docker images
274
247
clang :
0 commit comments