Skip to content

Commit 90d366f

Browse files
committed
Update .github/workflows/ci.yml
1 parent bfb148e commit 90d366f

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ jobs:
233233
run: cmake --build --preset venv
234234

235235
- name: Python tests C++11
236-
run: cmake --build --preset venvtests
236+
run: cmake --build --preset testsvenv -t pytest
237237

238238
deadsnakes:
239239
strategy:
@@ -287,33 +287,27 @@ jobs:
287287
run: |
288288
sudo make install
289289
sudo apt-get update
290-
sudo apt-get install libc6-dbg # Needed by Valgrind
290+
sudo apt-get install ninja-build libc6-dbg
291291
292292
- name: Prepare env
293293
run: |
294294
python -m pip install -r tests/requirements.txt
295295
296296
- name: Configure
297-
run: >
298-
cmake -S . -B build
299-
-DCMAKE_BUILD_TYPE=Debug
300-
-DPYBIND11_WERROR=ON
301-
-DDOWNLOAD_CATCH=ON
302-
-DDOWNLOAD_EIGEN=ON
303-
-DCMAKE_CXX_STANDARD=17
297+
run: cmake --preset default -DCMAKE_CXX_STANDARD=17
304298

305299
- name: Build
306-
run: cmake --build build -j 2
300+
run: cmake --build --preset default
307301

308302
- name: Python tests
309-
run: cmake --build build --target pytest
303+
run: cmake --build --preset default --target pytest
310304

311305
- name: C++ tests
312-
run: cmake --build build --target cpptest
306+
run: cmake --build --preset default --target cpptest
313307

314308
- name: Run Valgrind on Python tests
315309
if: matrix.valgrind
316-
run: cmake --build build --target memcheck
310+
run: cmake --build --preset default --target memcheck
317311

318312

319313
# Testing on clang using the excellent silkeh clang docker images

CMakePresets.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,14 @@
44
{
55
"name": "default",
66
"displayName": "Default",
7-
"binaryDir": "build/default",
7+
"binaryDir": "build",
88
"generator": "Ninja",
9+
"errors": {
10+
"dev": true,
11+
"deprecated": true
12+
},
913
"cacheVariables": {
14+
"CMAKE_BUILD_TYPE": "Debug",
1015
"PYBIND11_FINDPYTHON": "NEW",
1116
"PYBIND11_WERROR": true,
1217
"DOWNLOAD_CATCH": true,
@@ -16,9 +21,9 @@
1621
{
1722
"name": "venv",
1823
"displayName": "Venv",
19-
"binaryDir": "build/venv",
20-
"generator": "Ninja",
24+
"inherits": "default",
2125
"cacheVariables": {
26+
"CMAKE_BUILD_TYPE": "Debug",
2227
"PYBIND11_CREATE_WITH_UV": "python3",
2328
"Python_ROOT_DIR": ".venv",
2429
"PYBIND11_WERROR": true,
@@ -41,13 +46,13 @@
4146
},
4247
{
4348
"name": "tests",
44-
"displayName": "Default Tests Build",
49+
"displayName": "Tests (for workflow)",
4550
"configurePreset": "default",
4651
"targets": ["pytest", "cpptest", "test_cmake_build"]
4752
},
4853
{
4954
"name": "testsvenv",
50-
"displayName": "Venv Tests Build",
55+
"displayName": "Tests Venv (for workflow)",
5156
"configurePreset": "venv",
5257
"targets": ["pytest", "cpptest", "test_cmake_build"]
5358
}

0 commit comments

Comments
 (0)