@@ -164,7 +164,6 @@ jobs:
164164 -DDOWNLOAD_EIGEN=ON
165165 -DCMAKE_CXX_STANDARD=17
166166 -DPYBIND11_INTERNALS_VERSION=10000000
167- "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
168167 ${{ matrix.args }}
169168
170169 - name : Build (unstable ABI)
@@ -497,6 +496,24 @@ jobs:
497496 - name : Interface test
498497 run : cmake --build build --target test_cmake_build
499498
499+ - name : Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE
500+ if : matrix.gcc == '12'
501+ shell : bash
502+ run : >
503+ cmake -S . -B build_partial
504+ -DPYBIND11_WERROR=ON
505+ -DDOWNLOAD_CATCH=ON
506+ -DCMAKE_CXX_STANDARD=${{ matrix.std }}
507+ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
508+ "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
509+
510+ - name : Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE
511+ if : matrix.gcc == '12'
512+ run : cmake --build build_partial -j 2
513+
514+ - name : Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
515+ if : matrix.gcc == '12'
516+ run : cmake --build build_partial --target pytest
500517
501518 # Testing on ICC using the oneAPI apt repo
502519 icc :
@@ -889,6 +906,21 @@ jobs:
889906 - name : Interface test C++20
890907 run : cmake --build build --target test_cmake_build
891908
909+ - name : Configure C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE
910+ run : >
911+ cmake -S . -B build_partial
912+ -DPYBIND11_WERROR=ON
913+ -DDOWNLOAD_CATCH=ON
914+ -DDOWNLOAD_EIGEN=ON
915+ -DCMAKE_CXX_STANDARD=20
916+ "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
917+
918+ - name : Build C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE
919+ run : cmake --build build_partial -j 2
920+
921+ - name : Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
922+ run : cmake --build build_partial --target pytest
923+
892924 mingw :
893925 name : " 🐍 3 • windows-latest • ${{ matrix.sys }}"
894926 runs-on : windows-latest
@@ -1105,5 +1137,23 @@ jobs:
11051137 - name : Interface test
11061138 run : cmake --build . --target test_cmake_build -j 2
11071139
1140+ - name : CMake Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE
1141+ run : >
1142+ cmake -S . -B build_partial
1143+ -DPYBIND11_WERROR=ON
1144+ -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
1145+ -DDOWNLOAD_CATCH=ON
1146+ -DDOWNLOAD_EIGEN=ON
1147+ -DCMAKE_CXX_COMPILER=clang++
1148+ -DCMAKE_CXX_STANDARD=17
1149+ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
1150+ "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
1151+
1152+ - name : Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE
1153+ run : cmake --build build_partial -j 2
1154+
1155+ - name : Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
1156+ run : cmake --build build_partial --target pytest -j 2
1157+
11081158 - name : Clean directory
11091159 run : git clean -fdx
0 commit comments