Skip to content

Commit

Permalink
Merge branch 'master' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Oct 4, 2021
2 parents 71fd524 + 97976c1 commit e315e1f
Show file tree
Hide file tree
Showing 143 changed files with 3,117 additions and 891 deletions.
9 changes: 8 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
FormatStyle: file

Checks: '
*bugprone*,
cppcoreguidelines-init-variables,
cppcoreguidelines-slicing,
clang-analyzer-optin.cplusplus.VirtualCall,
google-explicit-constructor,
llvm-namespace-comment,
misc-misplaced-const,
misc-non-copyable-objects,
Expand All @@ -28,9 +31,10 @@ modernize-use-override,
modernize-use-using,
*performance*,
readability-avoid-const-params-in-decls,
readability-const-return-type,
readability-container-size-empty,
readability-else-after-return,
readability-delete-null-pointer,
readability-else-after-return,
readability-implicit-bool-conversion,
readability-make-member-function-const,
readability-misplaced-array-index,
Expand All @@ -43,6 +47,9 @@ readability-static-accessed-through-instance,
readability-static-definition-in-anonymous-namespace,
readability-string-compare,
readability-uniqueptr-delete-release,
-bugprone-exception-escape,
-bugprone-reserved-identifier,
-bugprone-unused-raii,
'

CheckOptions:
Expand Down
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ nox -l
# Run linters
nox -s lint

# Run tests
nox -s tests
# Run tests on Python 3.9
nox -s tests-3.9

# Build and preview docs
nox -s docs -- serve
Expand Down
28 changes: 0 additions & 28 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Bug Report
description: File an issue about a bug
title: "[BUG]: "
labels: [triage]
body:
- type: markdown
attributes:
value: |
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).
- type: checkboxes
id: steps
attributes:
label: Required prerequisites
description: Make sure you've completed the following steps before submitting your issue -- thank you!
options:
- label: Make sure you've read the [documentation](https://pybind11.readthedocs.io). Your issue may be addressed there.
required: true
- label: Search the [issue tracker](https://github.com/pybind/pybind11/issues) and [Discussions](https:/pybind/pybind11/discussions) to verify that this hasn't already been reported. +1 or comment there if it has.
required: true
- label: Consider asking first in the [Gitter chat room](https://gitter.im/pybind/Lobby) or in a [Discussion](https:/pybind/pybind11/discussions/new).
required: false

- type: textarea
id: description
attributes:
label: Problem description
placeholder: >-
Provide a short description, state the expected behavior and what
actually happens. Include relevant information like what version of
pybind11 you are using, what system you are on, and any useful commands
/ output.
validations:
required: true

- type: textarea
id: code
attributes:
label: Reproducible example code
placeholder: >-
The code should be minimal, have no external dependencies, isolate the
function(s) that cause breakage. Submit matched and complete C++ and
Python snippets that can be easily compiled and run to diagnose the
issue. If possible, make a PR with a new, failing test to give us a
starting point to work on!
render: text
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/pybind/pybind11/discussions/new
about: Please ask and answer questions here, or propose new ideas.
- name: Gitter room
url: https://gitter.im/pybind/Lobby
about: A room for discussing pybind11 with an active community
16 changes: 0 additions & 16 deletions .github/ISSUE_TEMPLATE/feature-request.md

This file was deleted.

21 changes: 0 additions & 21 deletions .github/ISSUE_TEMPLATE/question.md

This file was deleted.

4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
Title (above): please place [branch_name] at the beginning if you are targeting a branch other than master. *Do not target stable*.
It is recommended to use conventional commit format, see conventionalcommits.org, but not required.
-->
## Description

<!-- Include relevant issues or PRs here, describe what changed and why -->
Expand Down
122 changes: 97 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
run: brew install boost

- name: Update CMake
uses: jwlawson/actions-setup-cmake@v1.9
uses: jwlawson/actions-setup-cmake@v1.11

- name: Cache wheels
if: runner.os == 'macOS'
Expand Down Expand Up @@ -144,6 +144,24 @@ jobs:
if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9 || matrix.python == '3.10-dev'))"
run: cmake --build build2 --target cpptest

# Third build - C++17 mode with unstable ABI
- name: Configure (unstable ABI)
run: >
cmake -S . -B build3
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
-DPYBIND11_INTERNALS_VERSION=10000000
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
${{ matrix.args }}
- name: Build (unstable ABI)
run: cmake --build build3 -j 2

- name: Python tests (unstable ABI)
run: cmake --build build3 --target pytest

- name: Interface test
run: cmake --build build2 --target test_cmake_build

Expand Down Expand Up @@ -193,7 +211,7 @@ jobs:
debug: ${{ matrix.python-debug }}

- name: Update CMake
uses: jwlawson/actions-setup-cmake@v1.9
uses: jwlawson/actions-setup-cmake@v1.11

- name: Valgrind cache
if: matrix.valgrind
Expand Down Expand Up @@ -445,7 +463,7 @@ jobs:
run: python3 -m pip install --upgrade pip

- name: Update CMake
uses: jwlawson/actions-setup-cmake@v1.9
uses: jwlawson/actions-setup-cmake@v1.11

- name: Configure
shell: bash
Expand Down Expand Up @@ -594,14 +612,15 @@ jobs:

- name: VAR_BUILD_TYPE 7
if: matrix.centos == 7
run: echo Release > VAR_BUILD_TYPE
run: echo MinSizeRel > VAR_BUILD_TYPE

# Using Debug to avoid segfault that appeared around 2021-06-04,
# Using Release to avoid segfault that appeared around 2021-06-04,
# apparently when the gcc version changed from 8.3 to 8.4.
- name: VAR_BUILD_TYPE 8
if: matrix.centos == 8
run: echo Debug > VAR_BUILD_TYPE
run: echo Release > VAR_BUILD_TYPE

# Temporally disabling EIGEN due to SSL issue in CentOS 7
- name: Configure
shell: bash
run: >
Expand Down Expand Up @@ -664,7 +683,7 @@ jobs:
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
working-directory: /build-tests

- name: Run tests
- name: Python tests
run: make pytest -j 2
working-directory: /build-tests

Expand Down Expand Up @@ -738,7 +757,7 @@ jobs:
architecture: x86

- name: Update CMake
uses: jwlawson/actions-setup-cmake@v1.9
uses: jwlawson/actions-setup-cmake@v1.11

- name: Prepare MSVC
uses: ilammy/msvc-dev-cmd@v1.9.0
Expand All @@ -760,7 +779,7 @@ jobs:
- name: Build C++11
run: cmake --build build -j 2

- name: Run tests
- name: Python tests
run: cmake --build build -t pytest

win32-msvc2015:
Expand All @@ -784,7 +803,7 @@ jobs:
python-version: ${{ matrix.python }}

- name: Update CMake
uses: jwlawson/actions-setup-cmake@v1.9
uses: jwlawson/actions-setup-cmake@v1.11

- name: Prepare MSVC
uses: ilammy/msvc-dev-cmd@v1.9.0
Expand Down Expand Up @@ -838,7 +857,7 @@ jobs:
python-version: ${{ matrix.python }}

- name: Update CMake
uses: jwlawson/actions-setup-cmake@v1.9
uses: jwlawson/actions-setup-cmake@v1.11

- name: Prepare env
run: python -m pip install -r tests/requirements.txt --prefer-binary
Expand All @@ -861,32 +880,85 @@ jobs:
run: cmake --build build -t check

mingw:
name: "🐍 3 • windows-latest • ${{ matrix.sys }}"
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
fail-fast: false
matrix:
include:
- { sys: mingw64, env: x86_64 }
- { sys: mingw32, env: i686 }
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-python-pip
mingw-w64-x86_64-cmake
mingw-w64-x86_64-make
mingw-w64-x86_64-python-pytest
mingw-w64-x86_64-eigen3
mingw-w64-x86_64-boost
mingw-w64-x86_64-catch
git
mingw-w64-${{matrix.env}}-gcc
mingw-w64-${{matrix.env}}-python-pip
mingw-w64-${{matrix.env}}-python-numpy
mingw-w64-${{matrix.env}}-python-scipy
mingw-w64-${{matrix.env}}-cmake
mingw-w64-${{matrix.env}}-make
mingw-w64-${{matrix.env}}-python-pytest
mingw-w64-${{matrix.env}}-eigen3
mingw-w64-${{matrix.env}}-boost
mingw-w64-${{matrix.env}}-catch
- uses: actions/checkout@v1
- uses: actions/checkout@v2

- name: Configure
- name: Configure C++11
# LTO leads to many undefined reference like
# `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&)
run: cmake -G "MinGW Makefiles" -S . -B build
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -S . -B build

- name: Build
- name: Build C++11
run: cmake --build build -j 2

- name: Python tests
run: cmake --build build --target pytest
- name: Python tests C++11
run: cmake --build build --target pytest -j 2

- name: C++11 tests
run: cmake --build build --target cpptest -j 2

- name: Interface test C++11
run: cmake --build build --target test_cmake_build

- name: Clean directory
run: git clean -fdx

- name: Configure C++14
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -S . -B build2

- name: Build C++14
run: cmake --build build2 -j 2

- name: Python tests C++14
run: cmake --build build2 --target pytest -j 2

- name: C++14 tests
run: cmake --build build2 --target cpptest -j 2

- name: Interface test C++14
run: cmake --build build2 --target test_cmake_build

- name: Clean directory
run: git clean -fdx

- name: Configure C++17
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -S . -B build3

- name: Build C++17
run: cmake --build build3 -j 2

- name: Python tests C++17
run: cmake --build build3 --target pytest -j 2

- name: C++17 tests
run: cmake --build build3 --target cpptest -j 2

- name: Interface test C++17
run: cmake --build build3 --target test_cmake_build

0 comments on commit e315e1f

Please sign in to comment.