Skip to content

Commit

Permalink
Merge branch 'v2.11' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
rwgk committed Jul 14, 2023
2 parents be97c5a + 1a917f1 commit 0dcf6f2
Show file tree
Hide file tree
Showing 106 changed files with 2,365 additions and 650 deletions.
4 changes: 2 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ directory inside your pybind11 git clone. Files will be modified in place,
so you can use git to monitor the changes.

```bash
docker run --rm -v $PWD:/mounted_pybind11 -it silkeh/clang:13
apt-get update && apt-get install -y python3-dev python3-pytest
docker run --rm -v $PWD:/mounted_pybind11 -it silkeh/clang:15-bullseye
apt-get update && apt-get install -y git python3-dev python3-pytest
cmake -S /mounted_pybind11/ -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--use-color" -DDOWNLOAD_EIGEN=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=17
cmake --build build -j 2
```
Expand Down
88 changes: 72 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ on:
- stable
- v*

permissions: read-all

concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true

env:
PIP_BREAK_SYSTEM_PACKAGES: 1
PIP_ONLY_BINARY: numpy
FORCE_COLOR: 3
PYTEST_TIMEOUT: 300
Expand All @@ -33,9 +36,10 @@ jobs:
- '3.9'
- '3.10'
- '3.11'
- 'pypy-3.7'
- '3.12'
- 'pypy-3.8'
- 'pypy-3.9'
- 'pypy-3.10'

# Items in here will either be added to the build matrix (if not
# present), or add new keys to an existing matrix element if all the
Expand Down Expand Up @@ -71,6 +75,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
allow-prereleases: true

- name: Setup Boost (Linux)
# Can't use boost + define _
Expand All @@ -82,7 +87,7 @@ jobs:
run: brew install boost

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

- name: Cache wheels
if: runner.os == 'macOS'
Expand Down Expand Up @@ -164,7 +169,6 @@ jobs:
-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)
Expand All @@ -179,7 +183,9 @@ jobs:
# This makes sure the setup_helpers module can build packages using
# setuptools
- name: Setuptools helpers test
run: pytest tests/extra_setuptools
run: |
pip install setuptools
pytest tests/extra_setuptools
if: "!(matrix.runs-on == 'windows-2022')"


Expand All @@ -202,13 +208,13 @@ jobs:
- uses: actions/checkout@v3

- name: Setup Python ${{ matrix.python-version }} (deadsnakes)
uses: deadsnakes/action@v3.0.0
uses: deadsnakes/action@v3.0.1
with:
python-version: ${{ matrix.python-version }}
debug: ${{ matrix.python-debug }}

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

- name: Valgrind cache
if: matrix.valgrind
Expand Down Expand Up @@ -241,8 +247,6 @@ jobs:
python -m pip install -r tests/requirements.txt
- name: Configure
env:
SETUPTOOLS_USE_DISTUTILS: stdlib
run: >
cmake -S . -B build
-DCMAKE_BUILD_TYPE=Debug
Expand Down Expand Up @@ -333,8 +337,8 @@ jobs:
# Testing NVCC; forces sources to behave like .cu files
cuda:
runs-on: ubuntu-latest
name: "🐍 3.10 • CUDA 11.7 • Ubuntu 22.04"
container: nvidia/cuda:11.7.0-devel-ubuntu22.04
name: "🐍 3.10 • CUDA 12.2 • Ubuntu 22.04"
container: nvidia/cuda:12.2.0-devel-ubuntu22.04

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -399,6 +403,7 @@ jobs:

# Testing on CentOS 7 + PGI compilers, which seems to require more workarounds
centos-nvhpc7:
if: ${{ false }} # JOB DISABLED (NEEDS WORK): https://github.com/pybind/pybind11/issues/4690
runs-on: ubuntu-latest
name: "🐍 3 • CentOS7 / PGI 22.9 • x64"
container: centos:7
Expand Down Expand Up @@ -474,7 +479,7 @@ jobs:
run: python3 -m pip install --upgrade pip

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

- name: Configure
shell: bash
Expand All @@ -497,6 +502,24 @@ jobs:
- name: Interface test
run: cmake --build build --target test_cmake_build

- name: Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE
if: matrix.gcc == '12'
shell: bash
run: >
cmake -S . -B build_partial
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
- name: Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE
if: matrix.gcc == '12'
run: cmake --build build_partial -j 2

- name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
if: matrix.gcc == '12'
run: cmake --build build_partial --target pytest

# Testing on ICC using the oneAPI apt repo
icc:
Expand Down Expand Up @@ -763,7 +786,7 @@ jobs:
architecture: x86

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

- name: Prepare MSVC
uses: ilammy/msvc-dev-cmd@v1.12.1
Expand Down Expand Up @@ -816,7 +839,7 @@ jobs:
architecture: x86

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

- name: Prepare MSVC
uses: ilammy/msvc-dev-cmd@v1.12.1
Expand Down Expand Up @@ -867,7 +890,7 @@ jobs:
python3 -m pip install -r tests/requirements.txt
- name: Update CMake
uses: jwlawson/actions-setup-cmake@v1.13
uses: jwlawson/actions-setup-cmake@v1.14

- name: Configure C++20
run: >
Expand All @@ -889,6 +912,21 @@ jobs:
- name: Interface test C++20
run: cmake --build build --target test_cmake_build

- name: Configure C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE
run: >
cmake -S . -B build_partial
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=20
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
- name: Build C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE
run: cmake --build build_partial -j 2

- name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
run: cmake --build build_partial --target pytest

mingw:
name: "🐍 3 • windows-latest • ${{ matrix.sys }}"
runs-on: windows-latest
Expand Down Expand Up @@ -1000,7 +1038,7 @@ jobs:
python-version: ${{ matrix.python }}

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

- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v3
Expand Down Expand Up @@ -1070,7 +1108,7 @@ jobs:
run: clang++ --version

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

- name: Run pip installs
run: |
Expand Down Expand Up @@ -1105,5 +1143,23 @@ jobs:
- name: Interface test
run: cmake --build . --target test_cmake_build -j 2

- name: CMake Configure - Exercise cmake -DPYBIND11_TEST_OVERRIDE
run: >
cmake -S . -B build_partial
-DPYBIND11_WERROR=ON
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_STANDARD=17
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
- name: Build - Exercise cmake -DPYBIND11_TEST_OVERRIDE
run: cmake --build build_partial -j 2

- name: Python tests - Exercise cmake -DPYBIND11_TEST_OVERRIDE
run: cmake --build build_partial --target pytest -j 2

- name: Clean directory
run: git clean -fdx
18 changes: 13 additions & 5 deletions .github/workflows/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ on:
- stable
- v*

permissions:
contents: read

env:
PIP_BREAK_SYSTEM_PACKAGES: 1
# For cmake:
VERBOSE: 1

Expand All @@ -22,20 +26,24 @@ jobs:
matrix:
runs-on: [ubuntu-20.04, macos-latest, windows-latest]
arch: [x64]
cmake: ["3.23"]
cmake: ["3.26"]

include:
- runs-on: ubuntu-20.04
arch: x64
cmake: 3.4
cmake: "3.5"

- runs-on: ubuntu-20.04
arch: x64
cmake: "3.27"

- runs-on: macos-latest
arch: x64
cmake: 3.7
cmake: "3.7"

- runs-on: windows-2019
arch: x64 # x86 compilers seem to be missing on 2019 image
cmake: 3.18
cmake: "3.18"

name: 🐍 3.7 • CMake ${{ matrix.cmake }} • ${{ matrix.runs-on }}
runs-on: ${{ matrix.runs-on }}
Expand All @@ -55,7 +63,7 @@ jobs:
# An action for adding a specific version of CMake:
# https://github.com/jwlawson/actions-setup-cmake
- name: Setup CMake ${{ matrix.cmake }}
uses: jwlawson/actions-setup-cmake@v1.13
uses: jwlawson/actions-setup-cmake@v1.14
with:
cmake-version: ${{ matrix.cmake }}

Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
- stable
- "v*"

permissions:
contents: read

env:
FORCE_COLOR: 3
# For cmake:
Expand All @@ -38,12 +41,12 @@ jobs:
# in .github/CONTRIBUTING.md and update as needed.
name: Clang-Tidy
runs-on: ubuntu-latest
container: silkeh/clang:13
container: silkeh/clang:15-bullseye
steps:
- uses: actions/checkout@v3

- name: Install requirements
run: apt-get update && apt-get install -y python3-dev python3-pytest
run: apt-get update && apt-get install -y git python3-dev python3-pytest

- name: Configure
run: >
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ on:
pull_request_target:
types: [closed]

permissions: {}

jobs:
label:
name: Labeler
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:

- uses: actions/labeler@main
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ on:
types:
- published

permissions:
contents: read

env:
PIP_BREAK_SYSTEM_PACKAGES: 1
PIP_ONLY_BINARY: numpy

jobs:
Expand Down Expand Up @@ -98,13 +102,13 @@ jobs:
- uses: actions/download-artifact@v3

- name: Publish standard package
uses: pypa/gh-action-pypi-publish@v1.8.1
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password }}
packages-dir: standard/

- name: Publish global package
uses: pypa/gh-action-pypi-publish@v1.8.1
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.pypi_password_global }}
packages-dir: global/

0 comments on commit 0dcf6f2

Please sign in to comment.