From a77c59455659e4a78247abd84a23cd7f4a30dbef Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 28 Nov 2025 22:56:58 -0800 Subject: [PATCH 1/9] Temporarily remove non-cibw workflows for faster CI iteration --- .github/workflows/ci.yml | 1207 ----------------------- .github/workflows/configure.yml | 85 -- .github/workflows/docs-link.yml | 41 - .github/workflows/format.yml | 54 - .github/workflows/labeler.yml | 25 - .github/workflows/nightlies.yml | 59 -- .github/workflows/pip.yml | 118 --- .github/workflows/reusable-standard.yml | 97 -- .github/workflows/upstream.yml | 116 --- 9 files changed, 1802 deletions(-) delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/configure.yml delete mode 100644 .github/workflows/docs-link.yml delete mode 100644 .github/workflows/format.yml delete mode 100644 .github/workflows/labeler.yml delete mode 100644 .github/workflows/nightlies.yml delete mode 100644 .github/workflows/pip.yml delete mode 100644 .github/workflows/reusable-standard.yml delete mode 100644 .github/workflows/upstream.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 15f031ad6c..0000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,1207 +0,0 @@ -name: CI - -on: - workflow_dispatch: - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review - -permissions: read-all - -concurrency: - group: test-${{ github.ref }} - cancel-in-progress: true - -env: - PYTHONDEVMODE: 1 - PIP_BREAK_SYSTEM_PACKAGES: 1 - PIP_ONLY_BINARY: numpy - FORCE_COLOR: 3 - PYTEST_TIMEOUT: 300 - # For cmake: - VERBOSE: 1 - CMAKE_COLOR_DIAGNOSTICS: 1 - -jobs: - # This is the "main" test suite, which tests a large number of different - # versions of default compilers and Python versions in GitHub Actions. - # It is in two parts: one that always runs, and one that runs on non-draft - standard-small: - if: github.event.action != 'ready_for_review' - strategy: - fail-fast: false - matrix: - include: - - runs-on: ubuntu-22.04 - python-version: '3.8' - cmake-args: -DPYBIND11_FINDPYTHON=OFF -DPYBIND11_NUMPY_1_ONLY=ON - - runs-on: ubuntu-latest - python-version: '3.13' - cmake-args: -DCMAKE_CXX_STANDARD=23 -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON - - runs-on: ubuntu-latest - python-version: '3.14t' - cmake-args: -DCMAKE_CXX_STANDARD=17 -DPYBIND11_TEST_SMART_HOLDER=ON - - runs-on: ubuntu-latest - python-version: 'pypy3.11' - cmake-args: -DCMAKE_CXX_STANDARD=17 - - runs-on: ubuntu-latest - python-version: 'graalpy-24.2' - cmake-args: -DCMAKE_CXX_STANDARD=20 - - runs-on: macos-latest - python-version: '3.14' - cmake-args: -DCMAKE_CXX_STANDARD=14 - - runs-on: windows-2022 - python-version: '3.8' - cmake-args: -DPYBIND11_FINDPYTHON=OFF - - - name: ๐Ÿ - uses: ./.github/workflows/reusable-standard.yml - with: - runs-on: ${{ matrix.runs-on }} - python-version: ${{ matrix.python-version }} - cmake-args: ${{ matrix.cmake-args }} - - standard-large: - if: github.event.pull_request.draft == false - strategy: - fail-fast: false - matrix: - include: - - runs-on: ubuntu-latest - python-version: '3.8' - cmake-args: -DPYBIND11_FINDPYTHON=ON -DCMAKE_CXX_STANDARD=17 - - runs-on: ubuntu-latest - python-version: '3.10' - cmake-args: -DCMAKE_CXX_STANDARD=20 - - runs-on: ubuntu-latest - python-version: '3.11' - cmake-args: -DPYBIND11_TEST_SMART_HOLDER=ON -DCMAKE_CXX_STANDARD=17 - - runs-on: ubuntu-latest - python-version: '3.12' - cmake-args: -DPYBIND11_TEST_SMART_HOLDER=ON -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON - - runs-on: ubuntu-latest - python-version: '3.13t' - cmake-args: -DCMAKE_CXX_STANDARD=20 -DPYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION=ON - - runs-on: ubuntu-latest - python-version: '3.14' - cmake-args: -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_FLAGS="-DPYBIND11_HAS_SUBINTERPRETER_SUPPORT=0" - - runs-on: ubuntu-latest - python-version: 'pypy-3.10' - cmake-args: -DCMAKE_CXX_STANDARD=14 - - runs-on: ubuntu-latest - python-version: 'graalpy-24.1' - - # No SciPy for macOS ARM - - runs-on: macos-13 - python-version: '3.8' - cmake-args: -DCMAKE_CXX_STANDARD=14 - - runs-on: macos-13 - python-version: '3.11' - cmake-args: -DPYBIND11_TEST_SMART_HOLDER=ON - - runs-on: macos-latest - python-version: '3.12' - cmake-args: -DCMAKE_CXX_STANDARD=17 -DPYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION=ON - - runs-on: macos-13 - python-version: '3.13t' - cmake-args: -DCMAKE_CXX_STANDARD=11 - - runs-on: macos-latest - python-version: '3.14t' - cmake-args: -DCMAKE_CXX_STANDARD=20 - - runs-on: macos-13 - python-version: 'pypy-3.10' - cmake-args: -DCMAKE_CXX_STANDARD=17 - - runs-on: macos-latest - python-version: 'pypy-3.11' - - runs-on: macos-latest - python-version: 'graalpy-24.2' - - - runs-on: windows-latest - python-version: '3.9' - cmake-args: -DPYBIND11_TEST_SMART_HOLDER=ON - - runs-on: windows-2022 - python-version: '3.8' - cmake-args: -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DPYBIND11_NUMPY_1_ONLY=ON - - runs-on: windows-2022 - python-version: '3.9' - cmake-args: -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DCMAKE_CXX_STANDARD=14 - # This needs a python built with MTd - # - runs-on: windows-2022 - # python-version: '3.11' - # cmake-args: -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebug - - runs-on: windows-2022 - python-version: '3.10' - cmake-args: -DPYBIND11_TEST_SMART_HOLDER=ON -DCMAKE_CXX_FLAGS="/GR /EHsc" - - runs-on: windows-2022 - python-version: '3.13' - cmake-args: -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL - - runs-on: windows-latest - python-version: '3.13t' - cmake-args: -DCMAKE_CXX_STANDARD=17 - - runs-on: windows-latest - python-version: '3.14' - cmake-args: -DCMAKE_CXX_STANDARD=20 - - runs-on: windows-latest - python-version: '3.14t' - cmake-args: -DCMAKE_CXX_STANDARD=23 - - runs-on: windows-latest - python-version: 'pypy-3.10' - cmake-args: -DCMAKE_CXX_STANDARD=17 - - runs-on: windows-latest - python-version: 'pypy3.11' - cmake-args: -DCMAKE_CXX_STANDARD=20 - # The setup-python action currently doesn't have graalpy for windows - # See https://github.com/actions/setup-python/pull/880 - - name: ๐Ÿ - uses: ./.github/workflows/reusable-standard.yml - with: - runs-on: ${{ matrix.runs-on }} - python-version: ${{ matrix.python-version }} - cmake-args: ${{ matrix.cmake-args }} - - # This checks inplace builds with C++11 - inplace: - if: github.event.pull_request.draft == false - strategy: - fail-fast: false - matrix: - include: - - runs-on: ubuntu-latest - python-version: '3.9' - - runs-on: macos-latest - python-version: '3.12' - - runs-on: windows-latest - python-version: '3.11' - - name: "๐Ÿ ${{ matrix.python-version }} โ€ข ${{ matrix.runs-on }} โ€ข x64 inplace C++14" - runs-on: ${{ matrix.runs-on }} - timeout-minutes: 90 - - steps: - - uses: actions/checkout@v5 - - - name: Setup Python ${{ matrix.python-version }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python-version }} - allow-prereleases: true - - - name: Install uv - uses: astral-sh/setup-uv@v6 - with: - enable-cache: true - - - name: Prepare env - run: uv pip install --python=python --system -r tests/requirements.txt - - # TODO Resolve Windows Ninja shared object issue on Python 3.8+ - - name: Use Ninja except on Windows - if: runner.os != 'Windows' - run: echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV" - - # More-or-less randomly adding a few extra flags here. - # In particular, use this one to test the next ABI bump (internals version). - - name: Configure - run: > - cmake -S. -B. - -DPYBIND11_WERROR=ON - -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON - -DPYBIND11_PYTEST_ARGS=-v - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=14 - -DPYBIND11_INTERNALS_VERSION=10000000 - - # Checks to makes sure defining `_` is allowed - # Triggers EHsc missing error on Windows - - name: Add underscore check - if: runner.os != 'Windows' - run: cmake -S. -B. -DCMAKE_CXX_FLAGS="-D_=1" - - - name: Build - run: cmake --build . - - - name: Python tests - run: cmake --build . --target pytest - - - name: Compiled tests - run: cmake --build . --target cpptest - - - name: Interface test - run: cmake --build . --target test_cmake_build - - - name: Visibility test - run: cmake --build . --target test_cross_module_rtti - - - manylinux: - name: Manylinux on ๐Ÿ 3.13t โ€ข GIL - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - timeout-minutes: 40 - container: quay.io/pypa/musllinux_1_2_x86_64:latest - steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Prepare uv's path - run: echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Install ninja - run: uv tool install ninja - - - name: Configure via preset - run: cmake --preset venv -DPYBIND11_CREATE_WITH_UV=python3.13t - - - name: Build C++11 - run: cmake --build --preset venv - - - name: Python tests C++11 - run: cmake --build --preset testsvenv -t pytest - - deadsnakes: - if: github.event.pull_request.draft == false - strategy: - fail-fast: false - matrix: - include: - # TODO: Fails on 3.10, investigate - # JOB DISABLED (NEEDS WORK): https://github.com/pybind/pybind11/issues/4889 - # - python-version: "3.9" - # python-debug: true - # valgrind: true - - python-version: "3.11" - python-debug: false - - name: "๐Ÿ ${{ matrix.python-version }}${{ matrix.python-debug && '-dbg' || '' }} (deadsnakes)${{ matrix.valgrind && ' โ€ข Valgrind' || '' }} โ€ข x64" - runs-on: ubuntu-latest - timeout-minutes: 90 - - steps: - - uses: actions/checkout@v5 - - - name: Setup Python ${{ matrix.python-version }} (deadsnakes) - uses: deadsnakes/action@v3.2.0 - with: - python-version: ${{ matrix.python-version }} - debug: ${{ matrix.python-debug }} - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v2.0 - - - name: Valgrind cache - if: matrix.valgrind - uses: actions/cache@v4 - id: cache-valgrind - with: - path: valgrind - key: 3.16.1 # Valgrind version - - - name: Compile Valgrind - if: matrix.valgrind && steps.cache-valgrind.outputs.cache-hit != 'true' - run: | - VALGRIND_VERSION=3.16.1 - curl https://sourceware.org/pub/valgrind/valgrind-$VALGRIND_VERSION.tar.bz2 -o - | tar xj - mv valgrind-$VALGRIND_VERSION valgrind - cd valgrind - ./configure - make -j 2 > /dev/null - - - name: Install Valgrind - if: matrix.valgrind - working-directory: valgrind - run: | - sudo make install - sudo apt-get update - sudo apt-get install ninja-build libc6-dbg - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - - name: Configure - run: cmake --preset default -DCMAKE_CXX_STANDARD=17 - - - name: Build - run: cmake --build --preset default - - - name: Python tests - run: cmake --build --preset default --target pytest - - - name: C++ tests - run: cmake --build --preset default --target cpptest - - - name: Visibility test - run: cmake --build --preset default --target test_cross_module_rtti - - - name: Run Valgrind on Python tests - if: matrix.valgrind - run: cmake --build --preset default --target memcheck - - - # Testing on clang using the excellent silkeh clang docker images - clang: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - clang: 5 - std: 14 - - clang: 11 - std: 20 - - clang: 14 - std: 20 - - clang: 16 - std: 20 - container_suffix: "-bullseye" - - clang: 18 - std: 20 - cxx_flags: "-Werror -Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls" - container_suffix: "-bookworm" - - name: "๐Ÿ 3 โ€ข Clang ${{ matrix.clang }} โ€ข C++${{ matrix.std }} โ€ข x64${{ matrix.cxx_flags && ' โ€ข cxx_flags' || '' }}" - container: "silkeh/clang:${{ matrix.clang }}${{ matrix.container_suffix }}" - timeout-minutes: 90 - - steps: - - uses: actions/checkout@v5 - - - name: Add wget and python3 - run: apt-get update && apt-get install -y python3-dev python3-numpy python3-pytest libeigen3-dev - - - name: Configure - shell: bash - run: > - cmake -S . -B build - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DCMAKE_CXX_STANDARD=${{ matrix.std }} - -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Interface test - run: cmake --build build --target test_cmake_build - - - name: Visibility test - run: cmake --build build --target test_cross_module_rtti - - # Testing NVCC; forces sources to behave like .cu files - cuda: - runs-on: ubuntu-latest - name: "๐Ÿ 3.10 โ€ข CUDA 12.2 โ€ข Ubuntu 22.04" - container: nvidia/cuda:12.2.0-devel-ubuntu22.04 - timeout-minutes: 90 - - steps: - - uses: actions/checkout@v5 - - # tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND - - name: Install ๐Ÿ 3 - run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy - - - name: Configure - run: cmake -S . -B build -DPYBIND11_CUDA_TESTS=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON - - - name: Build - run: cmake --build build -j2 --verbose - - - name: Python tests - run: cmake --build build --target pytest - - -# TODO: Internal compiler error - report to NVidia -# # Testing CentOS 8 + PGI compilers -# centos-nvhpc8: -# runs-on: ubuntu-latest -# name: "๐Ÿ 3 โ€ข CentOS8 / PGI 20.11 โ€ข x64" -# container: centos:8 -# -# steps: -# - uses: actions/checkout@v5 -# -# - name: Add Python 3 and a few requirements -# run: yum update -y && yum install -y git python3-devel python3-numpy python3-pytest make environment-modules -# -# - name: Install CMake with pip -# run: | -# python3 -m pip install --upgrade pip -# python3 -m pip install cmake --prefer-binary -# -# - name: Install NVidia HPC SDK -# run: > -# yum -y install -# https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc-20-11-20.11-1.x86_64.rpm -# https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc-2020-20.11-1.x86_64.rpm -# -# - name: Configure -# shell: bash -# run: | -# source /etc/profile.d/modules.sh -# module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/20.11 -# cmake -S . -B build -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=14 -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") -# -# - name: Build -# run: cmake --build build -j 2 --verbose -# -# - name: Python tests -# run: cmake --build build --target pytest -# -# - name: C++ tests -# run: cmake --build build --target cpptest -# -# - name: Interface test -# run: cmake --build build --target test_cmake_build - - - # Testing on Ubuntu + NVHPC (previous PGI) compilers, which seems to require more workarounds - ubuntu-nvhpc7: - if: github.event.pull_request.draft == false - runs-on: ubuntu-22.04 - name: "๐Ÿ 3 โ€ข NVHPC 23.5 โ€ข C++17 โ€ข x64" - timeout-minutes: 90 - - env: - # tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND - DEBIAN_FRONTEND: 'noninteractive' - steps: - - uses: actions/checkout@v5 - - - name: Add NVHPC Repo - run: | - echo 'deb [trusted=yes] https://developer.download.nvidia.com/hpc-sdk/ubuntu/amd64 /' | \ - sudo tee /etc/apt/sources.list.d/nvhpc.list - - - name: Install ๐Ÿ 3 & NVHPC - run: | - sudo apt-get update -y && \ - sudo apt-get install -y cmake environment-modules git python3-dev python3-pip python3-numpy && \ - sudo apt-get install -y --no-install-recommends nvhpc-23-5 && \ - sudo rm -rf /var/lib/apt/lists/* - python3 -m pip install --upgrade pip - python3 -m pip install --upgrade pytest - - # On some systems, you many need further workarounds: - # https://github.com/pybind/pybind11/pull/2475 - - name: Configure - shell: bash - run: | - source /etc/profile.d/modules.sh - module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/23.5 - cmake -S . -B build -DDOWNLOAD_CATCH=ON \ - -DCMAKE_CXX_STANDARD=17 \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \ - -DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \ - -DPYBIND11_TEST_FILTER="test_smart_ptr.cpp" - - - name: Build - run: cmake --build build -j 2 --verbose - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Interface test - run: cmake --build build --target test_cmake_build - - - name: Visibility test - run: cmake --build build --target test_cross_module_rtti - - # Testing on GCC using the GCC docker images (only recent images supported) - gcc: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - { gcc: 9, std: 20 } - - { gcc: 10, std: 17 } - - { gcc: 10, std: 20 } - - { gcc: 13, std: 20, cxx_flags: "-Wall -Wextra -Wwrite-strings -Wunreachable-code -Wpointer-arith -Wredundant-decls" } - - name: "๐Ÿ 3 โ€ข GCC ${{ matrix.gcc }} โ€ข C++${{ matrix.std }} โ€ข x64${{ matrix.cxx_flags && ' โ€ข cxx_flags' || '' }}" - container: "gcc:${{ matrix.gcc }}" - timeout-minutes: 90 - - steps: - - uses: actions/checkout@v5 - - - name: Add Python 3 - run: apt-get update; apt-get install -y python3-dev python3-numpy python3-pytest python3-pip libeigen3-dev - - - name: Update pip - run: python3 -m pip install --upgrade pip - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v2.0 - - - name: Configure - shell: bash - run: > - cmake -S . -B build - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DCMAKE_CXX_STANDARD=${{ matrix.std }} - -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Interface test - run: cmake --build build --target test_cmake_build - - - name: Visibility test - run: cmake --build build --target test_cross_module_rtti - - - 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: - if: github.event.pull_request.draft == false - runs-on: ubuntu-22.04 - timeout-minutes: 90 - - name: "๐Ÿ 3 โ€ข ICC latest โ€ข x64" - - steps: - - uses: actions/checkout@v5 - - - name: Add apt repo - run: | - sudo apt-get update - sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg - wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB - sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB - echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - - - name: Add ICC & Python 3 - run: sudo apt-get update; sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic cmake python3-dev python3-numpy python3-pytest python3-pip - - - name: Update pip - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - python3 -m pip install --upgrade pip - - - name: Install dependencies - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - python3 -m pip install -r tests/requirements.txt - - - name: Configure C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake -S . -B build-11 \ - -DPYBIND11_WERROR=ON \ - -DDOWNLOAD_CATCH=ON \ - -DDOWNLOAD_EIGEN=OFF \ - -DCMAKE_CXX_STANDARD=11 \ - -DCMAKE_CXX_COMPILER=$(which icpc) \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-11 -j 2 -v - - - name: Python tests C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - sudo service apport stop - cmake --build build-11 --target check - - - name: C++ tests C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-11 --target cpptest - - - name: Interface test C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-11 --target test_cmake_build - - - name: Visibility test - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-11 --target test_cross_module_rtti - - - name: Configure C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake -S . -B build-17 \ - -DPYBIND11_WERROR=ON \ - -DDOWNLOAD_CATCH=ON \ - -DDOWNLOAD_EIGEN=OFF \ - -DCMAKE_CXX_STANDARD=17 \ - -DCMAKE_CXX_COMPILER=$(which icpc) \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-17 -j 2 -v - - - name: Python tests C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - sudo service apport stop - cmake --build build-17 --target check - - - name: C++ tests C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-17 --target cpptest - - - name: Interface test C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-17 --target test_cmake_build - - - name: Visibility test - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-17 --target test_cross_module_rtti - - # Testing on CentOS (manylinux uses a centos base). - centos: - if: github.event.pull_request.draft == false - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - container: - - "almalinux:8" - - "almalinux:9" - - name: "๐Ÿ 3 โ€ข ${{ matrix.container }} โ€ข x64" - container: "${{ matrix.container }}" - timeout-minutes: 90 - - steps: - - name: Latest actions/checkout - uses: actions/checkout@v5 - - - 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 (default) - if: matrix.container != 'almalinux:8' - run: dnf update -y && dnf install -y python3-devel gcc-c++ make git - - - name: Update pip - run: python3 -m pip install --upgrade pip - - - name: Install dependencies - run: | - python3 -m pip install cmake -r tests/requirements.txt - - - name: Ensure NumPy 2 is used (required Python >= 3.9) - if: matrix.container == 'almalinux:9' - run: | - python3 -m pip install 'numpy>=2.0.0b1' 'scipy>=1.13.0rc1' - - - name: Configure - shell: bash - run: > - cmake -S . -B build - -DCMAKE_BUILD_TYPE=MinSizeRel - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=11 - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Interface test - run: cmake --build build --target test_cmake_build - - - name: Visibility test - run: cmake --build build --target test_cross_module_rtti - - - # This tests an "install" with the CMake tools - install-classic: - if: github.event.pull_request.draft == false - name: "๐Ÿ 3.9 โ€ข Debian โ€ข x86 โ€ข Install" - runs-on: ubuntu-latest - container: i386/debian:bullseye - timeout-minutes: 90 - - steps: - - uses: actions/checkout@v1 # v1 is required to run inside docker - - - name: Install requirements - run: | - apt-get update - apt-get install -y git make cmake g++ libeigen3-dev python3-dev python3-pip - pip3 install "pytest==6.*" - - - name: Configure for install - run: > - cmake . - -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0 - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Make and install - run: make install - - - name: Copy tests to new directory - run: cp -a tests /pybind11-tests - - - name: Make a new test directory - run: mkdir /build-tests - - - name: Configure tests - run: > - cmake ../pybind11-tests - -DDOWNLOAD_CATCH=ON - -DPYBIND11_WERROR=ON - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - working-directory: /build-tests - - - name: Python tests - run: make pytest -j 2 - working-directory: /build-tests - - - # This verifies that the documentation is not horribly broken, and does a - # basic validation check on the SDist. - doxygen: - if: github.event.pull_request.draft == false - name: "Documentation build test" - runs-on: ubuntu-latest - timeout-minutes: 90 - - steps: - - uses: actions/checkout@v5 - - - uses: actions/setup-python@v6 - with: - python-version: "3.x" - - - name: Install Doxygen - run: sudo apt-get install -y doxygen librsvg2-bin # Changed to rsvg-convert in 20.04 - - - name: Build docs - run: pipx run nox -s docs - - - name: Make SDist - run: pipx run nox -s build -- --sdist - - - run: git status --ignored - - - name: Check local include dir - run: > - ls pybind11; - python3 -c "import pybind11, pathlib; assert (a := pybind11.get_include()) == (b := str(pathlib.Path('include').resolve())), f'{a} != {b}'" - - - name: Compare Dists (headers only) - working-directory: include - run: | - python3 -m pip install --user -U ../dist/*.tar.gz - installed=$(python3 -c "import pybind11; print(pybind11.get_include() + '/pybind11')") - diff -rq $installed ./pybind11 - - win32: - if: github.event.pull_request.draft == false - strategy: - fail-fast: false - matrix: - include: - - python: '3.8' - args: -DCMAKE_CXX_STANDARD=17 - - python: '3.10' - args: -DCMAKE_CXX_STANDARD=20 - - python: '3.13' - - - name: "๐Ÿ ${{ matrix.python }} โ€ข MSVC 2022 โ€ข x86 ${{ matrix.args }}" - runs-on: windows-2022 - timeout-minutes: 90 - - steps: - - uses: actions/checkout@v5 - - - name: Setup Python ${{ matrix.python }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python }} - architecture: x86 - # Python 3.13.4 broken on Windows - check-latest: >- - ${{ matrix.python == '3.13' && runner.os == 'Windows' }} - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v2.0 - - - name: Prepare MSVC - uses: ilammy/msvc-dev-cmd@v1.13.0 - with: - arch: x86 - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - - name: Configure ${{ matrix.args }} - run: > - cmake -S . -B build - -G "Visual Studio 17 2022" -A Win32 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - ${{ matrix.args }} - - name: Build C++11 - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build -t pytest - - win32-debug: - if: github.event.pull_request.draft == false - strategy: - fail-fast: false - matrix: - include: - - python: 3.9 - args: -DCMAKE_CXX_STANDARD=20 - - python: 3.8 - args: -DCMAKE_CXX_STANDARD=17 - - name: "๐Ÿ ${{ matrix.python }} โ€ข MSVC 2022 (Debug) โ€ข x86 ${{ matrix.args }}" - runs-on: windows-2022 - timeout-minutes: 90 - - steps: - - uses: actions/checkout@v5 - - - name: Setup Python ${{ matrix.python }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python }} - architecture: x86 - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v2.0 - - - name: Prepare MSVC - uses: ilammy/msvc-dev-cmd@v1.13.0 - with: - arch: x86 - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - - name: Configure ${{ matrix.args }} - run: > - cmake -S . -B build - -G "Visual Studio 17 2022" -A Win32 - -DCMAKE_BUILD_TYPE=Debug - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - ${{ matrix.args }} - - name: Build C++11 - run: cmake --build build --config Debug -j 2 - - - name: Python tests - run: cmake --build build --config Debug -t pytest - - - windows-2022: - if: github.event.pull_request.draft == false - strategy: - fail-fast: false - matrix: - python: - - 3.9 - - name: "๐Ÿ ${{ matrix.python }} โ€ข MSVC 2022 C++20 โ€ข x64" - runs-on: windows-2022 - timeout-minutes: 90 - - steps: - - uses: actions/checkout@v5 - - - name: Setup Python ${{ matrix.python }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python }} - - - name: Prepare env - run: python3 -m pip install -r tests/requirements.txt - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v2.0 - - - name: Configure C++20 - run: > - cmake -S . -B build - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=20 - - - name: Build C++20 - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++20 tests - run: cmake --build build --target cpptest -j 2 - - - name: Interface test C++20 - run: cmake --build build --target test_cmake_build - - - name: Visibility test - run: cmake --build build --target test_cross_module_rtti - - - 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: - if: github.event.pull_request.draft == false - name: "๐Ÿ 3 โ€ข windows-latest โ€ข ${{ matrix.sys }}" - runs-on: windows-latest - timeout-minutes: 90 - defaults: - run: - shell: msys2 {0} - strategy: - fail-fast: false - matrix: - include: - - sys: mingw32 - env: i686 - extra_install: "" - - sys: mingw64 - env: x86_64 - extra_install: | - mingw-w64-x86_64-python-numpy - mingw-w64-x86_64-python-scipy - mingw-w64-x86_64-eigen3 - steps: - - uses: msys2/setup-msys2@v2 - with: - msystem: ${{matrix.sys}} - install: >- - git - mingw-w64-${{matrix.env}}-gcc - mingw-w64-${{matrix.env}}-python-pip - mingw-w64-${{matrix.env}}-cmake - mingw-w64-${{matrix.env}}-make - mingw-w64-${{matrix.env}}-python-pytest - mingw-w64-${{matrix.env}}-boost - mingw-w64-${{matrix.env}}-catch - ${{ matrix.extra_install }} - - - uses: actions/checkout@v5 - - - 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" -DCMAKE_CXX_STANDARD=11 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON - -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") - -S . -B build - - - name: Build C++11 - run: cmake --build build -j 2 - - - name: Python tests C++11 - run: cmake --build build --target pytest -j 2 - - - name: C++11 tests - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target cpptest -j 2 - - - name: Interface test C++11 - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target test_cmake_build - - - name: Visibility test - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target test_cross_module_rtti - - - name: Clean directory - run: git clean -fdx - - - name: Configure C++14 - run: >- - cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON - -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") - -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: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target cpptest -j 2 - - - name: Interface test C++14 - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target test_cmake_build - - - name: Visibility test - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target test_cross_module_rtti - - - name: Clean directory - run: git clean -fdx - - - name: Configure C++17 - run: >- - cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON - -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") - -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: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target cpptest -j 2 - - - name: Interface test C++17 - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target test_cmake_build - - - name: Visibility test - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target test_cross_module_rtti - - windows_clang: - if: github.event.pull_request.draft == false - - strategy: - matrix: - os: [windows-latest] - python: ['3.10'] - - runs-on: "${{ matrix.os }}" - timeout-minutes: 90 - - name: "๐Ÿ ${{ matrix.python }} โ€ข ${{ matrix.os }} โ€ข clang-latest" - - steps: - - name: Show env - run: env - - - name: Checkout - uses: actions/checkout@v5 - - - name: Set up Clang - uses: egor-tensin/setup-clang@v1 - - - name: Setup Python ${{ matrix.python }} - uses: actions/setup-python@v6 - with: - python-version: ${{ matrix.python }} - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v2.0 - - - name: Install ninja-build tool - uses: seanmiddleditch/gha-setup-ninja@v6 - - - name: Run pip installs - run: | - python -m pip install --upgrade pip - python -m pip install -r tests/requirements.txt - - - name: Show Clang++ version - run: clang++ --version - - - name: Show CMake version - run: cmake --version - - # TODO: WERROR=ON - - name: Configure Clang - run: > - cmake -G Ninja -S . -B . - -DPYBIND11_WERROR=OFF - -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_COMPILER=clang++ - -DCMAKE_CXX_STANDARD=17 - - - name: Build - run: cmake --build . -j 2 - - - name: Python tests - run: cmake --build . --target pytest -j 2 - - - name: C++ tests - run: cmake --build . --target cpptest -j 2 - - - name: Interface test - run: cmake --build . --target test_cmake_build -j 2 - - - name: Visibility test - run: cmake --build . --target test_cross_module_rtti -j 2 - - - name: Clean directory - run: git clean -fdx diff --git a/.github/workflows/configure.yml b/.github/workflows/configure.yml deleted file mode 100644 index c498d39b7d..0000000000 --- a/.github/workflows/configure.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: Config - -on: - workflow_dispatch: - pull_request: - types: - - opened - - synchronize - - reopened - - ready_for_review - push: - branches: - - master - - stable - - v* - -permissions: - contents: read - -jobs: - # This tests various versions of CMake in various combinations, to make sure - # the configure step passes. - cmake: - if: github.event.pull_request.draft == false - strategy: - fail-fast: false - matrix: - include: - - runs-on: ubuntu-22.04 - cmake: "3.15" - - - runs-on: ubuntu-24.04 - cmake: "3.26" - - - runs-on: ubuntu-24.04 - cmake: "3.29" - - - runs-on: macos-13 - cmake: "3.15" - - - runs-on: macos-14 - cmake: "4.0" - - - runs-on: windows-latest - cmake: "4.0" - - name: ๐Ÿ 3.11 โ€ข CMake ${{ matrix.cmake }} โ€ข ${{ matrix.runs-on }} - runs-on: ${{ matrix.runs-on }} - - steps: - - uses: actions/checkout@v5 - - - name: Setup Python 3.11 - uses: actions/setup-python@v6 - with: - python-version: 3.11 - - - name: Install uv - uses: astral-sh/setup-uv@v6 - - - name: Prepare env - run: uv pip install --python=python --system -r tests/requirements.txt - - # 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@v2.0 - with: - cmake-version: ${{ matrix.cmake }} - - # These steps use a directory with a space in it intentionally - - name: Configure - shell: bash - run: cmake -S. -B"build dir" -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON - - # Only build and test if this was manually triggered in the GitHub UI - - name: Build - working-directory: build dir - if: github.event_name == 'workflow_dispatch' - run: cmake --build . --config Release - - - name: Test - working-directory: build dir - if: github.event_name == 'workflow_dispatch' - run: cmake --build . --config Release --target check diff --git a/.github/workflows/docs-link.yml b/.github/workflows/docs-link.yml deleted file mode 100644 index 2f397aff97..0000000000 --- a/.github/workflows/docs-link.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Read the Docs PR preview - -on: - pull_request_target: - types: - - opened - - synchronize - -permissions: - contents: read - pull-requests: write - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -jobs: - documentation-links: - runs-on: ubuntu-latest - if: github.event.repository.fork == false - steps: - - uses: actions/checkout@v5 - - - name: Check for docs changes - id: docs_changes - run: | - # Fetch the PR head - git fetch origin pull/${{ github.event.pull_request.number }}/head:pr-head - - # Show diff between base (current checkout) and PR head - if git diff --name-only HEAD pr-head | grep -q '^docs/'; then - echo "docs_changed=true" >> "$GITHUB_OUTPUT" - else - echo "docs_changed=false" >> "$GITHUB_OUTPUT" - fi - - - uses: readthedocs/actions/preview@v1 - if: steps.docs_changes.outputs.docs_changed == 'true' - with: - project-slug: "pybind11" - single-version: "true" diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml deleted file mode 100644 index a01e60ba49..0000000000 --- a/.github/workflows/format.yml +++ /dev/null @@ -1,54 +0,0 @@ -# This is a format job. Pre-commit has a first-party GitHub action, so we use -# that: https://github.com/pre-commit/action - -name: Format - -on: - workflow_dispatch: - pull_request: - push: - branches: - - master - - stable - - "v*" - -permissions: - contents: read - -env: - FORCE_COLOR: 3 - # For cmake: - VERBOSE: 1 - -jobs: - pre-commit: - name: Format - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - - uses: actions/setup-python@v6 - with: - python-version: "3.x" - - name: Add matchers - run: echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json" - - uses: pre-commit/action@v3.0.1 - - clang-tidy: - # When making changes here, please also review the "Clang-Tidy" section - # in .github/CONTRIBUTING.md and update as needed. - name: Clang-Tidy - runs-on: ubuntu-latest - container: silkeh/clang:20 - steps: - - uses: actions/checkout@v5 - - - name: Install requirements - run: apt-get update && apt-get install -y git python3-dev python3-pytest ninja-build - - - name: Configure - run: cmake --preset tidy - - name: Build - run: cmake --build --preset tidy - - - name: Embedded - run: cmake --build --preset tidy -t cpptest diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml deleted file mode 100644 index f5b618ba82..0000000000 --- a/.github/workflows/labeler.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Labeler -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@v6 - if: > - github.event.pull_request.merged == true && - !startsWith(github.event.pull_request.title, 'chore(deps):') && - !startsWith(github.event.pull_request.title, 'ci(fix):') && - !startsWith(github.event.pull_request.title, 'docs(changelog):') - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - configuration-path: .github/labeler_merged.yml diff --git a/.github/workflows/nightlies.yml b/.github/workflows/nightlies.yml deleted file mode 100644 index 3197f5abad..0000000000 --- a/.github/workflows/nightlies.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Upload nightly wheels to Anaconda Cloud - -on: - # Run daily at 2:34 UTC to upload nightly wheels to Anaconda Cloud - schedule: - - cron: "34 2 * * *" - # Run on demand with workflow dispatch - workflow_dispatch: - -permissions: - actions: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build_wheel: - name: Build and upload wheel - if: github.repository_owner == 'pybind' - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Install uv - uses: astral-sh/setup-uv@v6 - - - name: Build SDist and wheels - run: | - uv tool install nox - nox -s build - nox -s build_global - - - uses: actions/upload-artifact@v4 - with: - name: Packages - path: dist/* - - upload_nightly_wheels: - name: Upload nightly wheels to Anaconda Cloud - if: github.repository_owner == 'pybind' - needs: [build_wheel] - runs-on: ubuntu-latest - steps: - - uses: actions/download-artifact@v5 - with: - name: Packages - path: dist - - - name: List wheel to be deployed - run: ls -lha dist/*.whl - - - name: Upload wheel to Anaconda Cloud as nightly - uses: scientific-python/upload-nightly-action@b36e8c0c10dbcfd2e05bf95f17ef8c14fd708dbf # 0.6.2 - with: - artifacts_path: dist - anaconda_nightly_upload_token: ${{ secrets.ANACONDA_ORG_UPLOAD_TOKEN }} diff --git a/.github/workflows/pip.yml b/.github/workflows/pip.yml deleted file mode 100644 index a5e7ffb519..0000000000 --- a/.github/workflows/pip.yml +++ /dev/null @@ -1,118 +0,0 @@ -name: Pip - -on: - workflow_dispatch: - pull_request: - push: - branches: - - master - - stable - - v* - release: - types: - - published - -permissions: - contents: read - -jobs: - # This builds the sdists and wheels and makes sure the files are exactly as - # expected. - test-packaging: - name: ๐Ÿ 3.8 โ€ข ๐Ÿ“ฆ tests โ€ข windows-latest - runs-on: windows-latest - - steps: - - uses: actions/checkout@v5 - - - name: Setup ๐Ÿ 3.8 - uses: actions/setup-python@v6 - with: - python-version: 3.8 - - - name: Install uv - uses: astral-sh/setup-uv@v6 - - - name: Prepare env - run: uv pip install --system -r tests/requirements.txt - - - name: Python Packaging tests - run: pytest tests/extra_python_package/ - - - # This runs the packaging tests and also builds and saves the packages as - # artifacts. - packaging: - name: ๐Ÿ 3.8 โ€ข ๐Ÿ“ฆ & ๐Ÿ“ฆ tests โ€ข ubuntu-latest - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v5 - - - name: Setup ๐Ÿ 3.8 - uses: actions/setup-python@v6 - with: - python-version: 3.8 - - - name: Install uv - uses: astral-sh/setup-uv@v6 - - - name: Prepare env - run: uv pip install --system -r tests/requirements.txt twine nox - - - name: Python Packaging tests - run: pytest tests/extra_python_package/ - - - name: Build SDist and wheels - run: | - nox -s build - nox -s build_global - - - name: Check metadata - run: twine check dist/* - - - name: Save standard package - uses: actions/upload-artifact@v4 - with: - name: standard - path: dist/pybind11-* - - - name: Save global package - uses: actions/upload-artifact@v4 - with: - name: global - path: dist/*global-* - - - - # When a GitHub release is made, upload the artifacts to PyPI - upload: - name: Upload to PyPI - runs-on: ubuntu-latest - if: github.event_name == 'release' && github.event.action == 'published' - needs: [packaging] - environment: - name: pypi - url: https://pypi.org/p/pybind11 - permissions: - id-token: write - attestations: write - - steps: - # Downloads all to directories matching the artifact names - - uses: actions/download-artifact@v5 - - - name: Generate artifact attestation for sdist and wheel - uses: actions/attest-build-provenance@v3 - with: - subject-path: "*/pybind11*" - - - name: Publish standard package - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: standard/ - - - name: Publish global package - uses: pypa/gh-action-pypi-publish@release/v1 - with: - packages-dir: global/ diff --git a/.github/workflows/reusable-standard.yml b/.github/workflows/reusable-standard.yml deleted file mode 100644 index 8bd0d340e3..0000000000 --- a/.github/workflows/reusable-standard.yml +++ /dev/null @@ -1,97 +0,0 @@ -name: Reusable Standard Test - -on: - workflow_call: - inputs: - python-version: - required: true - type: string - cmake-args: - required: false - type: string - default: '' - runs-on: - required: true - type: string - -env: - PYTHONDEVMODE: 1 - PIP_BREAK_SYSTEM_PACKAGES: 1 - PIP_ONLY_BINARY: numpy - FORCE_COLOR: 3 - PYTEST_TIMEOUT: 300 - # For cmake: - VERBOSE: 1 - CMAKE_COLOR_DIAGNOSTICS: 1 - -jobs: - standard: - name: ๐Ÿงช - runs-on: ${{ inputs.runs-on }} - timeout-minutes: 90 - - steps: - - uses: actions/checkout@v5 - - - name: Setup Python ${{ inputs.python-version }} - uses: actions/setup-python@v6 - with: - python-version: ${{ inputs.python-version }} - allow-prereleases: true - # Python 3.13.4 broken on Windows - check-latest: >- - ${{ inputs.python-version == '3.13' && runner.os == 'Windows' }} - - - name: Setup Boost (Linux) - if: runner.os == 'Linux' - run: sudo apt-get install libboost-dev - - - name: Setup Boost (macOS) - if: runner.os == 'macOS' - run: brew install boost - - - name: Install uv - uses: astral-sh/setup-uv@v6 - with: - enable-cache: true - - - name: Prepare env - run: uv pip install --python=python --system -r tests/requirements.txt - - - name: Setup annotations on Linux - if: runner.os == 'Linux' - run: uv pip install --python=python --system pytest-github-actions-annotate-failures - - # TODO Resolve Windows Ninja shared object issue on Python 3.8+ - - name: Use Ninja except on Windows - if: runner.os != 'Windows' - run: echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV" - - - name: Configure - run: > - cmake -S. -Bbuild -Werror=dev - -DPYBIND11_WERROR=ON - -DPYBIND11_PYTEST_ARGS=-v - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - ${{ inputs.cmake-args }} - - - name: Build - run: cmake --build build - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Interface test - run: cmake --build build --target test_cmake_build - - - name: Visibility test - run: cmake --build build --target test_cross_module_rtti - - - name: Setuptools helpers test - run: | - uv pip install --python=python --system setuptools - pytest tests/extra_setuptools diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml deleted file mode 100644 index edc09f51e2..0000000000 --- a/.github/workflows/upstream.yml +++ /dev/null @@ -1,116 +0,0 @@ -name: Upstream - -on: - workflow_dispatch: - pull_request: - -permissions: - contents: read - -concurrency: - group: upstream-${{ github.ref }} - cancel-in-progress: true - -env: - PIP_BREAK_SYSTEM_PACKAGES: 1 - # For cmake: - VERBOSE: 1 - -jobs: - standard: - name: "๐Ÿ 3.13 latest โ€ข ubuntu-latest โ€ข x64" - runs-on: ubuntu-latest - # Only runs when the 'python dev' label is selected - if: "contains(github.event.pull_request.labels.*.name, 'python dev')" - - steps: - - uses: actions/checkout@v5 - - - name: Setup Python 3.13 - uses: actions/setup-python@v6 - with: - python-version: "3.13" - allow-prereleases: true - - - name: Setup Boost - run: sudo apt-get install libboost-dev - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v2.0 - - - name: Run pip installs - run: | - python -m pip install --upgrade pip - python -m pip install -r tests/requirements.txt - - - name: Show platform info - run: | - python -m platform - cmake --version - pip list - - # First build - C++11 mode and inplace - - name: Configure C++11 - run: > - cmake -S . -B build11 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=11 - -DCMAKE_BUILD_TYPE=Debug - - - name: Build C++11 - run: cmake --build build11 -j 2 - - - name: Python tests C++11 - run: cmake --build build11 --target pytest -j 2 - - - name: C++11 tests - run: cmake --build build11 --target cpptest -j 2 - - - name: Interface test C++11 - run: cmake --build build11 --target test_cmake_build - - # Second build - C++17 mode and in a build directory - - name: Configure C++17 - run: > - cmake -S . -B build17 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - - - name: Build C++17 - run: cmake --build build17 -j 2 - - - name: Python tests C++17 - run: cmake --build build17 --target pytest - - - name: C++17 tests - run: cmake --build build17 --target cpptest - - # Third build - C++17 mode with unstable ABI - - name: Configure (unstable ABI) - run: > - cmake -S . -B build17max - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - -DPYBIND11_INTERNALS_VERSION=10000000 - - - name: Build (unstable ABI) - run: cmake --build build17max -j 2 - - - name: Python tests (unstable ABI) - run: cmake --build build17max --target pytest - - - name: Interface test (unstable ABI) - run: cmake --build build17max --target test_cmake_build - - # This makes sure the setup_helpers module can build packages using - # setuptools - - name: Setuptools helpers test - run: | - pip install setuptools - pytest tests/extra_setuptools From 42a90bd28e788e717b8e5faba72486a2c0369017 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 28 Nov 2025 22:57:13 -0800 Subject: [PATCH 2/9] Bump cibuildwheel to v3.3 in tests-cibw workflow --- .github/workflows/tests-cibw.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests-cibw.yml b/.github/workflows/tests-cibw.yml index f232544bd9..082aab4b3e 100644 --- a/.github/workflows/tests-cibw.yml +++ b/.github/workflows/tests-cibw.yml @@ -22,7 +22,7 @@ jobs: submodules: true fetch-depth: 0 - - uses: pypa/cibuildwheel@v3.1 + - uses: pypa/cibuildwheel@v3.3 env: PYODIDE_BUILD_EXPORTS: whole_archive with: @@ -45,7 +45,7 @@ jobs: # We have to uninstall first because GH is now using a local tap to build cmake<4, iOS needs cmake>=4 - run: brew uninstall cmake && brew install cmake - - uses: pypa/cibuildwheel@v3.1 + - uses: pypa/cibuildwheel@v3.3 env: CIBW_PLATFORM: ios CIBW_SKIP: cp314-* # https://github.com/pypa/cibuildwheel/issues/2494 @@ -80,7 +80,7 @@ jobs: - run: pipx install patchelf - - uses: pypa/cibuildwheel@v3.1 + - uses: pypa/cibuildwheel@v3.3 env: CIBW_PLATFORM: android with: From 8934861bb16306be0685cc87e0757ecf98e9eb81 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 28 Nov 2025 23:19:17 -0800 Subject: [PATCH 3/9] Skip AppVeyor builds for gha_fixes branch --- .appveyor.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 391cf1071c..6ecc2537be 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,6 +1,11 @@ version: 1.0.{build} image: - Visual Studio 2017 + +branches: + except: + - gha_fixes + test: off skip_branch_with_pr: true build: From 2398bb9746fe22fa73392315c21864cbba844e20 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 28 Nov 2025 23:23:40 -0800 Subject: [PATCH 4/9] Limit CIBW workflow to Android ubuntu-latest job only --- .github/workflows/tests-cibw.yml | 53 ++------------------------------ 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/.github/workflows/tests-cibw.yml b/.github/workflows/tests-cibw.yml index 082aab4b3e..79bee400ec 100644 --- a/.github/workflows/tests-cibw.yml +++ b/.github/workflows/tests-cibw.yml @@ -13,66 +13,17 @@ concurrency: cancel-in-progress: true jobs: - build-wasm-emscripten: - name: Pyodide wheel - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v5 - with: - submodules: true - fetch-depth: 0 - - - uses: pypa/cibuildwheel@v3.3 - env: - PYODIDE_BUILD_EXPORTS: whole_archive - with: - package-dir: tests - only: cp312-pyodide_wasm32 - - build-ios: - name: iOS wheel ${{ matrix.runs-on }} - runs-on: ${{ matrix.runs-on }} - strategy: - fail-fast: false - matrix: - runs-on: [macos-14, macos-13] - steps: - - uses: actions/checkout@v5 - with: - submodules: true - fetch-depth: 0 - - # We have to uninstall first because GH is now using a local tap to build cmake<4, iOS needs cmake>=4 - - run: brew uninstall cmake && brew install cmake - - - uses: pypa/cibuildwheel@v3.3 - env: - CIBW_PLATFORM: ios - CIBW_SKIP: cp314-* # https://github.com/pypa/cibuildwheel/issues/2494 - with: - package-dir: tests - build-android: - name: Android wheel ${{ matrix.runs-on }} - runs-on: ${{ matrix.runs-on }} - strategy: - fail-fast: false - matrix: - runs-on: [macos-latest, macos-13, ubuntu-latest] + name: Android wheel ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 with: submodules: true fetch-depth: 0 - # GitHub Actions can't currently run the Android emulator on macOS. - - name: Skip Android tests on macOS - if: contains(matrix.runs-on, 'macos') - run: echo "CIBW_TEST_COMMAND=" >> "$GITHUB_ENV" - # https://github.blog/changelog/2024-04-02-github-actions-hardware-accelerated-android-virtualization-now-available/ - name: Enable KVM for Android emulator - if: contains(matrix.runs-on, 'ubuntu') run: | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules sudo udevadm control --reload-rules From de84648a8f14f51f2d1e8a8d1e3e6c3b07607f9d Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 28 Nov 2025 23:36:29 -0800 Subject: [PATCH 5/9] Run Android cibuildwheel job on ubuntu-22.04 runner --- .github/workflows/tests-cibw.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-cibw.yml b/.github/workflows/tests-cibw.yml index 79bee400ec..cebf7b09ff 100644 --- a/.github/workflows/tests-cibw.yml +++ b/.github/workflows/tests-cibw.yml @@ -14,8 +14,8 @@ concurrency: jobs: build-android: - name: Android wheel ubuntu-latest - runs-on: ubuntu-latest + name: Android wheel ubuntu-22.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v5 with: From b2b6c774bb40cdaaf1fe5bc79ee655ef63641b32 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 28 Nov 2025 23:48:59 -0800 Subject: [PATCH 6/9] Revert "Run Android cibuildwheel job on ubuntu-22.04 runner" This reverts commit de84648a8f14f51f2d1e8a8d1e3e6c3b07607f9d. --- .github/workflows/tests-cibw.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests-cibw.yml b/.github/workflows/tests-cibw.yml index cebf7b09ff..79bee400ec 100644 --- a/.github/workflows/tests-cibw.yml +++ b/.github/workflows/tests-cibw.yml @@ -14,8 +14,8 @@ concurrency: jobs: build-android: - name: Android wheel ubuntu-22.04 - runs-on: ubuntu-22.04 + name: Android wheel ubuntu-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v5 with: From 7054940d67886ea699020f517b152fa88c970189 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 28 Nov 2025 23:41:58 -0800 Subject: [PATCH 7/9] Revert "Skip AppVeyor builds for gha_fixes branch" This reverts commit 8934861bb16306be0685cc87e0757ecf98e9eb81. --- .appveyor.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 6ecc2537be..391cf1071c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,11 +1,6 @@ version: 1.0.{build} image: - Visual Studio 2017 - -branches: - except: - - gha_fixes - test: off skip_branch_with_pr: true build: From 5a730b67e100e41cbc14a26c32b3dd167ee0d269 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 28 Nov 2025 23:42:07 -0800 Subject: [PATCH 8/9] Disable AppVeyor builds via skip_commits message filter --- .appveyor.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 391cf1071c..f1a0bf1048 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,6 +2,8 @@ version: 1.0.{build} image: - Visual Studio 2017 test: off +skip_commits: + message: /.*/ # Skip ALL commits. skip_branch_with_pr: true build: parallel: true From 66bd1faa6c567c9d053bf60d606d45ce4cc3e16f Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 28 Nov 2025 23:47:17 -0800 Subject: [PATCH 9/9] Build Android cibuildwheel wheels without running emulator tests --- .github/workflows/tests-cibw.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests-cibw.yml b/.github/workflows/tests-cibw.yml index 79bee400ec..12922d35e5 100644 --- a/.github/workflows/tests-cibw.yml +++ b/.github/workflows/tests-cibw.yml @@ -34,5 +34,6 @@ jobs: - uses: pypa/cibuildwheel@v3.3 env: CIBW_PLATFORM: android + CIBW_TEST_COMMAND: "" # Temporarily disable Android tests; emulator setup is broken. with: package-dir: tests