Skip to content

Commit 0376417

Browse files
committed
Merge branch 'master' into v2.10
2 parents 80dc998 + 0694ec6 commit 0376417

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2958
-1040
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ body:
66
- type: markdown
77
attributes:
88
value: |
9-
Maintainers will only make a best effort to triage PRs. Please do your best to make the issue as easy to act on as possible, and only open if clearly a problem with pybind11 (ask first if unsure).
9+
Please do your best to make the issue as easy to act on as possible, and only submit here if there is clearly a problem with pybind11 (ask first if unsure). **Note that a reproducer in a PR is much more likely to get immediate attention.**
10+
1011
- type: checkboxes
1112
id: steps
1213
attributes:
@@ -20,6 +21,13 @@ body:
2021
- label: Consider asking first in the [Gitter chat room](https://gitter.im/pybind/Lobby) or in a [Discussion](https:/pybind/pybind11/discussions/new).
2122
required: false
2223

24+
- type: input
25+
id: version
26+
attributes:
27+
label: What version (or hash if on master) of pybind11 are you using?
28+
validations:
29+
required: true
30+
2331
- type: textarea
2432
id: description
2533
attributes:
@@ -40,6 +48,14 @@ body:
4048
The code should be minimal, have no external dependencies, isolate the
4149
function(s) that cause breakage. Submit matched and complete C++ and
4250
Python snippets that can be easily compiled and run to diagnose the
43-
issue. If possible, make a PR with a new, failing test to give us a
44-
starting point to work on!
51+
issue. — Note that a reproducer in a PR is much more likely to get
52+
immediate attention: failing tests in the pybind11 CI are the best
53+
starting point for working out fixes.
4554
render: text
55+
56+
- type: input
57+
id: regression
58+
attributes:
59+
label: Is this a regression? Put the last known working version here if it is.
60+
description: Put the last known working version here if this is a regression.
61+
value: Not a regression

.github/workflows/ci.yml

Lines changed: 145 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ env:
1717
PIP_ONLY_BINARY: numpy
1818
FORCE_COLOR: 3
1919
PYTEST_TIMEOUT: 300
20+
# For cmake:
21+
VERBOSE: 1
2022

2123
jobs:
2224
# This is the "main" test suite, which tests a large number of different
@@ -25,7 +27,7 @@ jobs:
2527
strategy:
2628
fail-fast: false
2729
matrix:
28-
runs-on: [ubuntu-latest, windows-2022, macos-latest]
30+
runs-on: [ubuntu-20.04, windows-2022, macos-latest]
2931
python:
3032
- '3.6'
3133
- '3.9'
@@ -42,12 +44,12 @@ jobs:
4244
# We support an optional key: args, for cmake args
4345
include:
4446
# Just add a key
45-
- runs-on: ubuntu-latest
47+
- runs-on: ubuntu-20.04
4648
python: '3.6'
4749
args: >
4850
-DPYBIND11_FINDPYTHON=ON
4951
-DCMAKE_CXX_FLAGS="-D_=1"
50-
- runs-on: ubuntu-latest
52+
- runs-on: ubuntu-20.04
5153
python: 'pypy-3.8'
5254
args: >
5355
-DPYBIND11_FINDPYTHON=ON
@@ -194,13 +196,13 @@ jobs:
194196
python-debug: false
195197

196198
name: "🐍 ${{ matrix.python-version }}${{ matrix.python-debug && '-dbg' || '' }} (deadsnakes)${{ matrix.valgrind && ' • Valgrind' || '' }} • x64"
197-
runs-on: ubuntu-latest
199+
runs-on: ubuntu-20.04
198200

199201
steps:
200202
- uses: actions/checkout@v3
201203

202204
- name: Setup Python ${{ matrix.python-version }} (deadsnakes)
203-
uses: deadsnakes/action@v2.1.1
205+
uses: deadsnakes/action@v3.0.0
204206
with:
205207
python-version: ${{ matrix.python-version }}
206208
debug: ${{ matrix.python-debug }}
@@ -918,7 +920,7 @@ jobs:
918920
- name: Configure C++11
919921
# LTO leads to many undefined reference like
920922
# `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&)
921-
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DCMAKE_VERBOSE_MAKEFILE=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -S . -B build
923+
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -S . -B build
922924

923925
- name: Build C++11
924926
run: cmake --build build -j 2
@@ -936,7 +938,7 @@ jobs:
936938
run: git clean -fdx
937939

938940
- name: Configure C++14
939-
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DCMAKE_VERBOSE_MAKEFILE=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -S . -B build2
941+
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -S . -B build2
940942

941943
- name: Build C++14
942944
run: cmake --build build2 -j 2
@@ -954,7 +956,7 @@ jobs:
954956
run: git clean -fdx
955957

956958
- name: Configure C++17
957-
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DCMAKE_VERBOSE_MAKEFILE=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -S . -B build3
959+
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -S . -B build3
958960

959961
- name: Build C++17
960962
run: cmake --build build3 -j 2
@@ -967,3 +969,138 @@ jobs:
967969

968970
- name: Interface test C++17
969971
run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target test_cmake_build
972+
973+
windows_clang:
974+
975+
strategy:
976+
matrix:
977+
os: [windows-latest]
978+
python: ['3.10']
979+
980+
runs-on: "${{ matrix.os }}"
981+
982+
name: "🐍 ${{ matrix.python }} • ${{ matrix.os }} • clang-latest"
983+
984+
steps:
985+
- name: Show env
986+
run: env
987+
988+
- name: Checkout
989+
uses: actions/checkout@v3
990+
991+
- name: Set up Clang
992+
uses: egor-tensin/setup-clang@v1
993+
994+
- name: Setup Python ${{ matrix.python }}
995+
uses: actions/setup-python@v4
996+
with:
997+
python-version: ${{ matrix.python }}
998+
999+
- name: Update CMake
1000+
uses: jwlawson/[email protected]
1001+
1002+
- name: Install ninja-build tool
1003+
uses: seanmiddleditch/gha-setup-ninja@v3
1004+
1005+
- name: Run pip installs
1006+
run: |
1007+
python -m pip install --upgrade pip
1008+
python -m pip install -r tests/requirements.txt
1009+
1010+
- name: Show Clang++ version
1011+
run: clang++ --version
1012+
1013+
- name: Show CMake version
1014+
run: cmake --version
1015+
1016+
# TODO: WERROR=ON
1017+
- name: Configure Clang
1018+
run: >
1019+
cmake -G Ninja -S . -B .
1020+
-DPYBIND11_WERROR=OFF
1021+
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
1022+
-DDOWNLOAD_CATCH=ON
1023+
-DDOWNLOAD_EIGEN=ON
1024+
-DCMAKE_CXX_COMPILER=clang++
1025+
-DCMAKE_CXX_STANDARD=17
1026+
1027+
- name: Build
1028+
run: cmake --build . -j 2
1029+
1030+
- name: Python tests
1031+
run: cmake --build . --target pytest -j 2
1032+
1033+
- name: C++ tests
1034+
run: cmake --build . --target cpptest -j 2
1035+
1036+
- name: Interface test
1037+
run: cmake --build . --target test_cmake_build -j 2
1038+
1039+
- name: Clean directory
1040+
run: git clean -fdx
1041+
1042+
macos_brew_install_llvm:
1043+
name: "macos-latest • brew install llvm"
1044+
runs-on: macos-latest
1045+
1046+
env:
1047+
# https://apple.stackexchange.com/questions/227026/how-to-install-recent-clang-with-homebrew
1048+
LDFLAGS: '-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib'
1049+
1050+
steps:
1051+
- name: Update PATH
1052+
run: echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
1053+
1054+
- name: Show env
1055+
run: env
1056+
1057+
- name: Checkout
1058+
uses: actions/checkout@v3
1059+
1060+
- name: Show Clang++ version before brew install llvm
1061+
run: clang++ --version
1062+
1063+
- name: brew install llvm
1064+
run: brew install llvm
1065+
1066+
- name: Show Clang++ version after brew install llvm
1067+
run: clang++ --version
1068+
1069+
- name: Update CMake
1070+
uses: jwlawson/[email protected]
1071+
1072+
- name: Run pip installs
1073+
run: |
1074+
python3 -m pip install --upgrade pip
1075+
python3 -m pip install -r tests/requirements.txt
1076+
python3 -m pip install numpy
1077+
python3 -m pip install scipy
1078+
1079+
- name: Show CMake version
1080+
run: cmake --version
1081+
1082+
- name: CMake Configure
1083+
run: >
1084+
cmake -S . -B .
1085+
-DPYBIND11_WERROR=ON
1086+
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
1087+
-DDOWNLOAD_CATCH=ON
1088+
-DDOWNLOAD_EIGEN=ON
1089+
-DCMAKE_CXX_COMPILER=clang++
1090+
-DCMAKE_CXX_STANDARD=17
1091+
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
1092+
1093+
- name: Build
1094+
run: cmake --build . -j 2
1095+
1096+
- name: Python tests
1097+
run: cmake --build . --target pytest -j 2
1098+
1099+
- name: C++ tests
1100+
run: cmake --build . --target cpptest -j 2
1101+
1102+
- name: Interface test
1103+
run: cmake --build . --target test_cmake_build -j 2
1104+
1105+
- name: Clean directory
1106+
run: git clean -fdx

.github/workflows/configure.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,23 @@ on:
99
- stable
1010
- v*
1111

12+
env:
13+
# For cmake:
14+
VERBOSE: 1
15+
1216
jobs:
1317
# This tests various versions of CMake in various combinations, to make sure
1418
# the configure step passes.
1519
cmake:
1620
strategy:
1721
fail-fast: false
1822
matrix:
19-
runs-on: [ubuntu-latest, macos-latest, windows-latest]
23+
runs-on: [ubuntu-20.04, macos-latest, windows-latest]
2024
arch: [x64]
2125
cmake: ["3.23"]
2226

2327
include:
24-
- runs-on: ubuntu-latest
28+
- runs-on: ubuntu-20.04
2529
arch: x64
2630
cmake: 3.4
2731

.github/workflows/format.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ on:
1414

1515
env:
1616
FORCE_COLOR: 3
17+
# For cmake:
18+
VERBOSE: 1
1719

1820
jobs:
1921
pre-commit:

.github/workflows/labeler.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ jobs:
1010
steps:
1111

1212
- uses: actions/labeler@main
13-
if: github.event.pull_request.merged == true
13+
if: >
14+
github.event.pull_request.merged == true &&
15+
!startsWith(github.event.pull_request.title, 'chore(deps):') &&
16+
!startsWith(github.event.pull_request.title, 'ci(fix):') &&
17+
!startsWith(github.event.pull_request.title, 'docs(changelog):')
1418
with:
1519
repo-token: ${{ secrets.GITHUB_TOKEN }}
1620
configuration-path: .github/labeler_merged.yml

.github/workflows/pip.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ jobs:
9898
- uses: actions/download-artifact@v3
9999

100100
- name: Publish standard package
101-
uses: pypa/gh-action-pypi-publish@v1.5.1
101+
uses: pypa/gh-action-pypi-publish@v1.6.4
102102
with:
103103
password: ${{ secrets.pypi_password }}
104104
packages_dir: standard/
105105

106106
- name: Publish global package
107-
uses: pypa/gh-action-pypi-publish@v1.5.1
107+
uses: pypa/gh-action-pypi-publish@v1.6.4
108108
with:
109109
password: ${{ secrets.pypi_password_global }}
110110
packages_dir: global/

.github/workflows/upstream.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ concurrency:
1111

1212
env:
1313
PIP_ONLY_BINARY: numpy
14+
# For cmake:
15+
VERBOSE: 1
1416

1517
jobs:
1618
standard:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ pybind11Targets.cmake
4343
/pybind11/share/*
4444
/docs/_build/*
4545
.ipynb_checkpoints/
46+
tests/main.cpp

0 commit comments

Comments
 (0)