Skip to content

Commit

Permalink
pybind11: upgraded to version 2.13.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny authored Nov 13, 2024
2 parents 4edeeb8 + 43927ed commit 4ecfed7
Show file tree
Hide file tree
Showing 180 changed files with 3,661 additions and 1,032 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,12 @@ jobs:
cd build
${{ matrix.context }} cmake -G Ninja -DBUILD_TYPE=${{ matrix.build_type }} -DCODE_ANALYSIS=${{ matrix.code_analysis }} -DCODE_COVERAGE=${{ matrix.code_coverage }} -DDOCUMENTATION=${{ matrix.documentation }} -DINSTALL_PREFIX=${{ github.workspace }}/install -DJAVASCRIPT_BINDINGS=${{ matrix.javascript_bindings }} -DJAVASCRIPT_UNIT_TESTING=${{ matrix.javascript_unit_testing }} -DMEMORY_CHECKS=${{ matrix.memory_checks }} -DPYTHON_BINDINGS=${{ matrix.python_bindings }} -DPYTHON_UNIT_TESTING=${{ matrix.python_unit_testing }} -DSHARED_LIBS=${{ matrix.shared_libs }} -DUNIT_TESTING=${{ matrix.unit_testing }} ..
- name: Build libOpenCOR
if: ${{ (matrix.unit_testing == 'ON') || (matrix.javascript_unit_testing == 'ON') }}
if: ${{ (matrix.unit_testing == 'ON') || (matrix.javascript_unit_testing == 'ON') || (matrix.code_analysis == 'OFF') || (matrix.code_coverage == 'OFF') || (matrix.memory_checks == 'OFF') }}
run: |
cd build
ninja
- name: Unit testing
if: ${{ matrix.unit_testing == 'ON' }}
if: ${{ (matrix.unit_testing == 'ON') && (matrix.code_analysis == 'OFF') && (matrix.code_coverage == 'OFF') && (matrix.memory_checks == 'OFF') }}
run: |
cd build
ninja ${{ matrix.target }}
Expand Down
2 changes: 1 addition & 1 deletion extern/README.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
`libOpenCOR <https://opencor.ws/libopencor/index.html>`__ relies on the following external projects:

- `GoogleTest <https://github.com/google/googletest>`__ `1.15.2 <https://github.com/google/googletest/releases/tag/v1.15.2>`__; and
- `pybind11 <https://github.com/pybind/pybind11>`__ `2.12.0 <https://github.com/pybind/pybind11/releases/tag/v2.12.0>`__.
- `pybind11 <https://github.com/pybind/pybind11>`__ `2.13.6 <https://github.com/pybind/pybind11/releases/tag/v2.13.6>`__.
2 changes: 1 addition & 1 deletion extern/pybind11/.appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ platform:
- x86
environment:
matrix:
- PYTHON: 36
- PYTHON: 38
CONFIG: Debug
install:
- ps: |
Expand Down
2 changes: 2 additions & 0 deletions extern/pybind11/.clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@ Checks: |
readability-string-compare,
readability-suspicious-call-argument,
readability-uniqueptr-delete-release,
-bugprone-chained-comparison,
-bugprone-easily-swappable-parameters,
-bugprone-exception-escape,
-bugprone-reserved-identifier,
-bugprone-unused-raii,
-performance-enum-size,
CheckOptions:
- key: modernize-use-equals-default.IgnoreMacros
Expand Down
15 changes: 10 additions & 5 deletions extern/pybind11/.github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
docs:
- any:
- 'docs/**/*.rst'
- '!docs/changelog.rst'
- '!docs/upgrade.rst'
all:
- changed-files:
- all-globs-to-all-files:
- '!docs/changelog.rst'
- '!docs/upgrade.rst'
- base-branch: "^(?!dependabot).*"
- base-branch: "^(?!pre-commit-ci).*"

ci:
- '.github/workflows/*.yml'
- changed-files:
- any-glob-to-any-file:
- '.github/workflows/*.yml'
9 changes: 7 additions & 2 deletions extern/pybind11/.github/labeler_merged.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Add 'needs changelog` label to any change to code files as long as the `CHANGELOG` hasn't changed
# Skip dependabot and pre-commit-ci PRs
needs changelog:
- all:
- '!docs/changelog.rst'
- all:
- changed-files:
- all-globs-to-all-files: "!docs/changelog.rst"
- base-branch: "^(?!dependabot).*"
- base-branch: "^(?!pre-commit-ci).*"
113 changes: 76 additions & 37 deletions extern/pybind11/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ jobs:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-20.04, windows-2022, macos-latest]
runs-on: [ubuntu-20.04, windows-2022, macos-13]
python:
- '3.6'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'
- 'pypy-3.8'
- 'pypy-3.9'
- 'pypy-3.10'
Expand All @@ -49,21 +48,26 @@ jobs:
include:
# Just add a key
- runs-on: ubuntu-20.04
python: '3.6'
python: '3.8'
args: >
-DPYBIND11_FINDPYTHON=ON
-DCMAKE_CXX_FLAGS="-D_=1"
exercise_D_: 1
- runs-on: ubuntu-20.04
python: 'pypy-3.8'
args: >
-DPYBIND11_FINDPYTHON=ON
- runs-on: windows-2019
python: '3.6'
python: '3.8'
args: >
-DPYBIND11_FINDPYTHON=ON
# Inject a couple Windows 2019 runs
- runs-on: windows-2019
python: '3.9'
# Extra ubuntu latest job
- runs-on: ubuntu-latest
python: '3.11'


name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}"
runs-on: ${{ matrix.runs-on }}
Expand All @@ -75,10 +79,11 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
allow-prereleases: true

- name: Setup Boost (Linux)
# Can't use boost + define _
if: runner.os == 'Linux' && matrix.python != '3.6'
if: runner.os == 'Linux' && matrix.exercise_D_ != 1
run: sudo apt-get install libboost-dev

- name: Setup Boost (macOS)
Expand Down Expand Up @@ -129,9 +134,7 @@ jobs:
run: cmake --build . --target pytest -j 2

- name: C++11 tests
# TODO: Figure out how to load the DLL on Python 3.8+
if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9 || matrix.python == '3.10' || matrix.python == '3.11' || matrix.python == 'pypy-3.8'))"
run: cmake --build . --target cpptest -j 2
run: cmake --build . --target cpptest -j 2

- name: Interface test C++11
run: cmake --build . --target test_cmake_build
Expand Down Expand Up @@ -160,8 +163,6 @@ jobs:
run: cmake --build build2 --target pytest

- name: C++ tests
# TODO: Figure out how to load the DLL on Python 3.8+
if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9 || matrix.python == '3.10' || matrix.python == '3.11' || matrix.python == 'pypy-3.8'))"
run: cmake --build build2 --target cpptest

# Third build - C++17 mode with unstable ABI
Expand Down Expand Up @@ -192,6 +193,35 @@ jobs:
pytest tests/extra_setuptools
if: "!(matrix.runs-on == 'windows-2022')"

manylinux:
name: Manylinux on 🐍 3.13t • GIL
runs-on: ubuntu-latest
timeout-minutes: 40
container: quay.io/pypa/musllinux_1_2_x86_64:latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Prepare venv
run: python3.13t -m venv .venv

- name: Install Python deps
run: .venv/bin/pip install -r tests/requirements.txt

- name: Configure C++11
run: >
cmake -S. -Bbuild
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPython_ROOT_DIR=.venv
- name: Build C++11
run: cmake --build build -j2

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

deadsnakes:
strategy:
Expand All @@ -213,7 +243,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }} (deadsnakes)
uses: deadsnakes/action@v3.1.0
uses: deadsnakes/action@v3.2.0
with:
python-version: ${{ matrix.python-version }}
debug: ${{ matrix.python-debug }}
Expand Down Expand Up @@ -310,6 +340,12 @@ jobs:
- clang: 16
std: 20
container_suffix: "-bullseye"
- clang: 17
std: 20
container_suffix: "-bookworm"
- clang: 18
std: 20
container_suffix: "-bookworm"

name: "🐍 3 • Clang ${{ matrix.clang }} • C++${{ matrix.std }} • x64"
container: "silkeh/clang:${{ matrix.clang }}${{ matrix.container_suffix }}"
Expand Down Expand Up @@ -471,7 +507,9 @@ jobs:
- { gcc: 7, std: 17 }
- { gcc: 8, std: 14 }
- { gcc: 8, std: 17 }
- { gcc: 9, std: 20 }
- { gcc: 10, std: 17 }
- { gcc: 10, std: 20 }
- { gcc: 11, std: 20 }
- { gcc: 12, std: 20 }
- { gcc: 13, std: 20 }
Expand Down Expand Up @@ -626,15 +664,13 @@ jobs:
cmake --build build-17 --target test_cmake_build
# Testing on CentOS (manylinux uses a centos base, and this is an easy way
# to get GCC 4.8, which is the manylinux1 compiler).
# Testing on CentOS (manylinux uses a centos base).
centos:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- "centos:7" # GCC 4.8
- "almalinux:8"
- "almalinux:9"

Expand All @@ -644,18 +680,13 @@ jobs:
steps:
- name: Latest actions/checkout
uses: actions/checkout@v4
if: matrix.container != 'centos:7'

- name: Pin actions/checkout as required for centos:7
uses: actions/checkout@v3
if: matrix.container == 'centos:7'

- name: Add Python 3 (RHEL 7)
if: matrix.container == 'centos:7'
run: yum update -y && yum install -y python3-devel gcc-c++ make git
- name: Add Python 3.8
if: matrix.container == 'almalinux:8'
run: dnf update -y && dnf install -y python38-devel gcc-c++ make git

- name: Add Python 3 (RHEL 8+)
if: matrix.container != 'centos:7'
- name: Add Python 3 (default)
if: matrix.container != 'almalinux:8'
run: dnf update -y && dnf install -y python3-devel gcc-c++ make git

- name: Update pip
Expand Down Expand Up @@ -778,17 +809,25 @@ jobs:
fail-fast: false
matrix:
python:
- 3.6
- 3.7
- 3.8
- 3.9
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'

include:
- python: 3.9
- python: '3.12'
args: -DCMAKE_CXX_STANDARD=20
- python: 3.8
- python: '3.11'
args: -DCMAKE_CXX_STANDARD=20
- python: '3.10'
args: -DCMAKE_CXX_STANDARD=20
- python: '3.9'
args: -DCMAKE_CXX_STANDARD=20
- python: '3.8'
args: -DCMAKE_CXX_STANDARD=17
- python: 3.7
- python: '3.7'
args: -DCMAKE_CXX_STANDARD=14


Expand Down Expand Up @@ -972,7 +1011,6 @@ jobs:
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
Expand All @@ -983,6 +1021,7 @@ jobs:
install: >-
git
mingw-w64-${{matrix.env}}-python-scipy
mingw-w64-${{matrix.env}}-eigen3
- uses: actions/checkout@v4

Expand Down Expand Up @@ -1078,7 +1117,7 @@ jobs:
uses: jwlawson/actions-setup-cmake@v2.0

- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v4
uses: seanmiddleditch/gha-setup-ninja@v5

- name: Run pip installs
run: |
Expand Down Expand Up @@ -1118,8 +1157,8 @@ jobs:
run: git clean -fdx

macos_brew_install_llvm:
name: "macos-latest • brew install llvm"
runs-on: macos-latest
name: "macos-13 • brew install llvm"
runs-on: macos-13

env:
# https://apple.stackexchange.com/questions/227026/how-to-install-recent-clang-with-homebrew
Expand Down
6 changes: 3 additions & 3 deletions extern/pybind11/.github/workflows/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-20.04, macos-latest, windows-latest]
runs-on: [ubuntu-20.04, macos-13, windows-latest]
arch: [x64]
cmake: ["3.26"]

Expand All @@ -35,9 +35,9 @@ jobs:

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

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

Expand Down
30 changes: 30 additions & 0 deletions extern/pybind11/.github/workflows/emscripten.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: WASM

on:
workflow_dispatch:
pull_request:
branches:
- master
- stable
- v*

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

jobs:
build-wasm-emscripten:
name: Pyodide wheel
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- uses: pypa/cibuildwheel@v2.20
env:
PYODIDE_BUILD_EXPORTS: whole_archive
with:
package-dir: tests
only: cp312-pyodide_wasm32
2 changes: 1 addition & 1 deletion extern/pybind11/.github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
# in .github/CONTRIBUTING.md and update as needed.
name: Clang-Tidy
runs-on: ubuntu-latest
container: silkeh/clang:15-bullseye
container: silkeh/clang:18-bookworm
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 1 addition & 1 deletion extern/pybind11/.github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
pull-requests: write
steps:

- uses: actions/labeler@v4
- uses: actions/labeler@v5
if: >
github.event.pull_request.merged == true &&
!startsWith(github.event.pull_request.title, 'chore(deps):') &&
Expand Down
Loading

0 comments on commit 4ecfed7

Please sign in to comment.