Skip to content

Commit 47b097b

Browse files
authored
Merge pull request #30031 from rwgk/pywrapcc_merge_sh
git merge smart_holder
2 parents 3ef4db8 + 4b57f25 commit 47b097b

File tree

12 files changed

+271
-41
lines changed

12 files changed

+271
-41
lines changed

.github/workflows/ci.yml

Lines changed: 59 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ jobs:
8383
run: brew install boost
8484

8585
- name: Update CMake
86-
uses: jwlawson/actions-setup-cmake@v1.13
86+
uses: jwlawson/actions-setup-cmake@v1.14
8787

8888
- name: Cache wheels
8989
if: runner.os == 'macOS'
@@ -165,7 +165,6 @@ jobs:
165165
-DDOWNLOAD_EIGEN=ON
166166
-DCMAKE_CXX_STANDARD=17
167167
-DPYBIND11_INTERNALS_VERSION=10000000
168-
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
169168
${{ matrix.args }}
170169
171170
- name: Build (unstable ABI)
@@ -209,7 +208,7 @@ jobs:
209208
debug: ${{ matrix.python-debug }}
210209

211210
- name: Update CMake
212-
uses: jwlawson/actions-setup-cmake@v1.13
211+
uses: jwlawson/actions-setup-cmake@v1.14
213212

214213
- name: Valgrind cache
215214
if: matrix.valgrind
@@ -475,7 +474,7 @@ jobs:
475474
run: python3 -m pip install --upgrade pip
476475

477476
- name: Update CMake
478-
uses: jwlawson/actions-setup-cmake@v1.13
477+
uses: jwlawson/actions-setup-cmake@v1.14
479478

480479
- name: Configure
481480
shell: bash
@@ -498,6 +497,24 @@ jobs:
498497
- name: Interface test
499498
run: cmake --build build --target test_cmake_build
500499

500+
- name: Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE
501+
if: matrix.gcc == '12'
502+
shell: bash
503+
run: >
504+
cmake -S . -B build_partial
505+
-DPYBIND11_WERROR=ON
506+
-DDOWNLOAD_CATCH=ON
507+
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
508+
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
509+
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
510+
511+
- name: Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE
512+
if: matrix.gcc == '12'
513+
run: cmake --build build_partial -j 2
514+
515+
- name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
516+
if: matrix.gcc == '12'
517+
run: cmake --build build_partial --target pytest
501518

502519
# Testing on ICC using the oneAPI apt repo
503520
icc:
@@ -764,7 +781,7 @@ jobs:
764781
architecture: x86
765782

766783
- name: Update CMake
767-
uses: jwlawson/actions-setup-cmake@v1.13
784+
uses: jwlawson/actions-setup-cmake@v1.14
768785

769786
- name: Prepare MSVC
770787
uses: ilammy/msvc-dev-cmd@v1.12.1
@@ -817,7 +834,7 @@ jobs:
817834
architecture: x86
818835

819836
- name: Update CMake
820-
uses: jwlawson/actions-setup-cmake@v1.13
837+
uses: jwlawson/actions-setup-cmake@v1.14
821838

822839
- name: Prepare MSVC
823840
uses: ilammy/msvc-dev-cmd@v1.12.1
@@ -868,7 +885,7 @@ jobs:
868885
python3 -m pip install -r tests/requirements.txt
869886
870887
- name: Update CMake
871-
uses: jwlawson/actions-setup-cmake@v1.13
888+
uses: jwlawson/actions-setup-cmake@v1.14
872889

873890
- name: Configure C++20
874891
run: >
@@ -890,6 +907,21 @@ jobs:
890907
- name: Interface test C++20
891908
run: cmake --build build --target test_cmake_build
892909

910+
- name: Configure C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE
911+
run: >
912+
cmake -S . -B build_partial
913+
-DPYBIND11_WERROR=ON
914+
-DDOWNLOAD_CATCH=ON
915+
-DDOWNLOAD_EIGEN=ON
916+
-DCMAKE_CXX_STANDARD=20
917+
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
918+
919+
- name: Build C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE
920+
run: cmake --build build_partial -j 2
921+
922+
- name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
923+
run: cmake --build build_partial --target pytest
924+
893925
mingw:
894926
name: "🐍 3 • windows-latest • ${{ matrix.sys }}"
895927
runs-on: windows-latest
@@ -1001,7 +1033,7 @@ jobs:
10011033
python-version: ${{ matrix.python }}
10021034

10031035
- name: Update CMake
1004-
uses: jwlawson/actions-setup-cmake@v1.13
1036+
uses: jwlawson/actions-setup-cmake@v1.14
10051037

10061038
- name: Install ninja-build tool
10071039
uses: seanmiddleditch/gha-setup-ninja@v3
@@ -1071,7 +1103,7 @@ jobs:
10711103
run: clang++ --version
10721104

10731105
- name: Update CMake
1074-
uses: jwlawson/actions-setup-cmake@v1.13
1106+
uses: jwlawson/actions-setup-cmake@v1.14
10751107

10761108
- name: Run pip installs
10771109
run: |
@@ -1106,5 +1138,23 @@ jobs:
11061138
- name: Interface test
11071139
run: cmake --build . --target test_cmake_build -j 2
11081140

1141+
- name: CMake Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE
1142+
run: >
1143+
cmake -S . -B build_partial
1144+
-DPYBIND11_WERROR=ON
1145+
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
1146+
-DDOWNLOAD_CATCH=ON
1147+
-DDOWNLOAD_EIGEN=ON
1148+
-DCMAKE_CXX_COMPILER=clang++
1149+
-DCMAKE_CXX_STANDARD=17
1150+
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
1151+
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
1152+
1153+
- name: Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE
1154+
run: cmake --build build_partial -j 2
1155+
1156+
- name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
1157+
run: cmake --build build_partial --target pytest -j 2
1158+
11091159
- name: Clean directory
11101160
run: git clean -fdx

.github/workflows/ci_sh_def.yml

Lines changed: 62 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
run: brew install boost
9696

9797
- name: Update CMake
98-
uses: jwlawson/actions-setup-cmake@v1.13
98+
uses: jwlawson/actions-setup-cmake@v1.14
9999

100100
- name: Cache wheels
101101
if: runner.os == 'macOS'
@@ -180,7 +180,6 @@ jobs:
180180
-DCMAKE_CXX_STANDARD=17
181181
-DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}"
182182
-DPYBIND11_INTERNALS_VERSION=10000000
183-
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
184183
${{ matrix.args }}
185184
186185
- name: Build (unstable ABI)
@@ -224,7 +223,7 @@ jobs:
224223
debug: ${{ matrix.python-debug }}
225224

226225
- name: Update CMake
227-
uses: jwlawson/actions-setup-cmake@v1.13
226+
uses: jwlawson/actions-setup-cmake@v1.14
228227

229228
- name: Valgrind cache
230229
if: matrix.valgrind
@@ -492,7 +491,7 @@ jobs:
492491
run: python3 -m pip install --upgrade pip
493492

494493
- name: Update CMake
495-
uses: jwlawson/actions-setup-cmake@v1.13
494+
uses: jwlawson/actions-setup-cmake@v1.14
496495

497496
- name: Configure
498497
shell: bash
@@ -516,6 +515,25 @@ jobs:
516515
- name: Interface test
517516
run: cmake --build build --target test_cmake_build
518517

518+
- name: Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE
519+
if: matrix.gcc == '12'
520+
shell: bash
521+
run: >
522+
cmake -S . -B build_partial
523+
-DPYBIND11_WERROR=ON
524+
-DDOWNLOAD_CATCH=ON
525+
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
526+
-DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
527+
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
528+
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
529+
530+
- name: Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE
531+
if: matrix.gcc == '12'
532+
run: cmake --build build_partial -j 2
533+
534+
- name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
535+
if: matrix.gcc == '12'
536+
run: cmake --build build_partial --target pytest
519537

520538
# Testing on ICC using the oneAPI apt repo
521539
icc:
@@ -786,7 +804,7 @@ jobs:
786804
architecture: x86
787805

788806
- name: Update CMake
789-
uses: jwlawson/actions-setup-cmake@v1.13
807+
uses: jwlawson/actions-setup-cmake@v1.14
790808

791809
- name: Prepare MSVC
792810
uses: ilammy/msvc-dev-cmd@v1.12.1
@@ -840,7 +858,7 @@ jobs:
840858
architecture: x86
841859

842860
- name: Update CMake
843-
uses: jwlawson/actions-setup-cmake@v1.13
861+
uses: jwlawson/actions-setup-cmake@v1.14
844862

845863
- name: Prepare MSVC
846864
uses: ilammy/msvc-dev-cmd@v1.12.1
@@ -892,7 +910,7 @@ jobs:
892910
python3 -m pip install -r tests/requirements.txt
893911
894912
- name: Update CMake
895-
uses: jwlawson/actions-setup-cmake@v1.13
913+
uses: jwlawson/actions-setup-cmake@v1.14
896914

897915
- name: Configure C++20
898916
run: >
@@ -915,6 +933,22 @@ jobs:
915933
- name: Interface test C++20
916934
run: cmake --build build --target test_cmake_build
917935

936+
- name: Configure C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE
937+
run: >
938+
cmake -S . -B build_partial
939+
-DPYBIND11_WERROR=ON
940+
-DDOWNLOAD_CATCH=ON
941+
-DDOWNLOAD_EIGEN=ON
942+
-DCMAKE_CXX_STANDARD=20
943+
-DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
944+
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
945+
946+
- name: Build C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE
947+
run: cmake --build build_partial -j 2
948+
949+
- name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
950+
run: cmake --build build_partial --target pytest
951+
918952
mingw:
919953
name: "🐍 3 • windows-latest • ${{ matrix.sys }}"
920954
runs-on: windows-latest
@@ -1026,7 +1060,7 @@ jobs:
10261060
python-version: ${{ matrix.python }}
10271061

10281062
- name: Update CMake
1029-
uses: jwlawson/actions-setup-cmake@v1.13
1063+
uses: jwlawson/actions-setup-cmake@v1.14
10301064

10311065
- name: Install ninja-build tool
10321066
uses: seanmiddleditch/gha-setup-ninja@v3
@@ -1097,7 +1131,7 @@ jobs:
10971131
run: clang++ --version
10981132

10991133
- name: Update CMake
1100-
uses: jwlawson/actions-setup-cmake@v1.13
1134+
uses: jwlawson/actions-setup-cmake@v1.14
11011135

11021136
- name: Run pip installs
11031137
run: |
@@ -1133,5 +1167,24 @@ jobs:
11331167
- name: Interface test
11341168
run: cmake --build . --target test_cmake_build -j 2
11351169

1170+
- name: CMake Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE
1171+
run: >
1172+
cmake -S . -B build_partial
1173+
-DPYBIND11_WERROR=ON
1174+
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
1175+
-DDOWNLOAD_CATCH=ON
1176+
-DDOWNLOAD_EIGEN=ON
1177+
-DCMAKE_CXX_COMPILER=clang++
1178+
-DCMAKE_CXX_STANDARD=17
1179+
-DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
1180+
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
1181+
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
1182+
1183+
- name: Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE
1184+
run: cmake --build build_partial -j 2
1185+
1186+
- name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
1187+
run: cmake --build build_partial --target pytest -j 2
1188+
11361189
- name: Clean directory
11371190
run: git clean -fdx

0 commit comments

Comments
 (0)