From 6b9f7ca115eb549275be1b90fb23d121f368a57d Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sun, 11 Dec 2022 16:58:28 -0800 Subject: [PATCH 01/13] Replace upstream.yml with new python312.yml --- .github/workflows/python312.yml | 140 ++++++++++++++++++++++++++++++++ .github/workflows/upstream.yml | 114 -------------------------- 2 files changed, 140 insertions(+), 114 deletions(-) create mode 100644 .github/workflows/python312.yml delete mode 100644 .github/workflows/upstream.yml diff --git a/.github/workflows/python312.yml b/.github/workflows/python312.yml new file mode 100644 index 00000000..b296e9c6 --- /dev/null +++ b/.github/workflows/python312.yml @@ -0,0 +1,140 @@ +name: Python312 + +on: + workflow_dispatch: + pull_request: + +concurrency: + group: python312-${{ github.ref }} + cancel-in-progress: false + +env: + PYTEST_TIMEOUT: 300 + +jobs: + standard: + name: "🐍 3.12 latest • ubuntu-latest • x64" + runs-on: ubuntu-latest + if: "contains(github.event.pull_request.labels.*.name, 'python dev')" + + steps: + - name: Show env + run: env + + - uses: actions/checkout@v3 + + - name: Setup Python 3.12 + uses: actions/setup-python@v4 + with: + python-version: "3.12-dev" + + - name: Setup Boost + run: sudo apt-get install libboost-dev + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v1.13 + + - name: Run pip installs + run: | + python -m pip install --upgrade pip + python -m pip install --prefer-binary -r tests/requirements.txt + # python -m pip install --prefer-binary numpy # SLOW + # python -m pip install --prefer-binary scipy # FAILED ~Nov 2022 + + - name: Show platform info + run: python -m platform + + - name: Show CMake version + run: cmake --version + + # FIRST BUILD + - name: Configure C++11 + run: > + cmake -S . -B build11 + -DCMAKE_VERBOSE_MAKEFILE=ON + -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 + + # python-3.12.0-alpha.1-linux-22.04-x64.tar.gz PASSED + # python-3.12.0-alpha.2-linux-22.04-x64.tar.gz FAILED + # python-3.12.0-alpha.3-linux-22.04-x64.tar.gz FAILED + # free(): invalid pointer + # Custom PyConfig + # /home/runner/work/pybind11/pybind11/tests/test_embed/test_interpreter.cpp:175 + # /home/runner/work/pybind11/pybind11/tests/test_embed/test_interpreter.cpp:179: FAILED: + # gdb traceback points here: + # https://github.com/python/cpython/blame/54289f85b2af1ecf046089ddf535dda1bdf6af24/Python/import.c#L524 + # - name: C++ tests C++11 + # run: cmake --build build11 --target cpptest -j 2 + + - name: Interface test C++11 + run: cmake --build build11 --target test_cmake_build + + - name: Clean directory + run: git clean -fdx + + # SECOND BUILD + - name: Configure C++17 + run: > + cmake -S . -B build17 + -DCMAKE_VERBOSE_MAKEFILE=ON + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_BUILD_TYPE=Debug + + - name: Build C++17 + run: cmake --build build17 -j 2 + + - name: Python tests C++17 + run: cmake --build build17 --target pytest + + # - name: C++ tests C++17 + # run: cmake --build build17 --target cpptest + + - name: Interface test C++17 + run: cmake --build build17 --target test_cmake_build + + - name: Clean directory + run: git clean -fdx + + # THIRD BUILD + - name: Configure C++17 max DPYBIND11_INTERNALS_VERSION + run: > + cmake -S . -B build17max + -DCMAKE_VERBOSE_MAKEFILE=ON + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + -DCMAKE_BUILD_TYPE=Debug + -DPYBIND11_INTERNALS_VERSION=10000000 + + - name: Build C++17 max DPYBIND11_INTERNALS_VERSION + run: cmake --build build17max -j 2 + + - name: Python tests C++17 max DPYBIND11_INTERNALS_VERSION + run: cmake --build build17max --target pytest + + # - name: C++ tests C++17 max DPYBIND11_INTERNALS_VERSION + # run: cmake --build build17max --target cpptest + + - name: Interface test C++17 max DPYBIND11_INTERNALS_VERSION + run: cmake --build build17max --target test_cmake_build + + # Ensure the setup_helpers module can build packages using setuptools + - name: Setuptools helpers test + run: pytest tests/extra_setuptools + + - name: Clean directory + run: git clean -fdx diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml deleted file mode 100644 index a15861ee..00000000 --- a/.github/workflows/upstream.yml +++ /dev/null @@ -1,114 +0,0 @@ - -name: Upstream - -on: - workflow_dispatch: - pull_request: - -concurrency: - group: upstream-${{ github.ref }} - cancel-in-progress: true - -env: - PIP_ONLY_BINARY: numpy - # For cmake: - VERBOSE: 1 - -jobs: - standard: - name: "🐍 3.11 latest internals • ubuntu-latest • x64" - runs-on: ubuntu-latest - if: "contains(github.event.pull_request.labels.*.name, 'python dev')" - - steps: - - uses: actions/checkout@v3 - - - name: Setup Python 3.11 - uses: actions/setup-python@v4 - with: - python-version: "3.11-dev" - - - name: Setup Boost (Linux) - if: runner.os == 'Linux' - run: sudo apt-get install libboost-dev - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.13 - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - - name: Setup annotations on Linux - if: runner.os == 'Linux' - run: python -m pip install pytest-github-actions-annotate-failures - - # First build - C++11 mode and inplace - - name: Configure C++11 - run: > - cmake -S . -B . - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=11 - - - name: Build C++11 - run: cmake --build . -j 2 - - - name: Python tests C++11 - run: cmake --build . --target pytest -j 2 - - - name: C++11 tests - run: cmake --build . --target cpptest -j 2 - - - name: Interface test C++11 - run: cmake --build . --target test_cmake_build - - - name: Clean directory - run: git clean -fdx - - # Second build - C++17 mode and in a build directory - - name: Configure C++17 - run: > - cmake -S . -B build2 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - ${{ matrix.args }} - ${{ matrix.args2 }} - - - name: Build - run: cmake --build build2 -j 2 - - - name: Python tests - run: cmake --build build2 --target pytest - - - name: C++ tests - 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 build3 --target test_cmake_build - - # This makes sure the setup_helpers module can build packages using - # setuptools - - name: Setuptools helpers test - run: pytest tests/extra_setuptools From 409a65f641fc998e6f20f5b5d2c0375f76c19439 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 15 Dec 2022 21:42:51 -0800 Subject: [PATCH 02/13] Revert "Replace upstream.yml with new python312.yml" This reverts commit 9a6b9b4e6fee7a4b9d88f09f666f7cba9773265a. --- .github/workflows/python312.yml | 140 -------------------------------- .github/workflows/upstream.yml | 112 +++++++++++++++++++++++++ 2 files changed, 112 insertions(+), 140 deletions(-) delete mode 100644 .github/workflows/python312.yml create mode 100644 .github/workflows/upstream.yml diff --git a/.github/workflows/python312.yml b/.github/workflows/python312.yml deleted file mode 100644 index b296e9c6..00000000 --- a/.github/workflows/python312.yml +++ /dev/null @@ -1,140 +0,0 @@ -name: Python312 - -on: - workflow_dispatch: - pull_request: - -concurrency: - group: python312-${{ github.ref }} - cancel-in-progress: false - -env: - PYTEST_TIMEOUT: 300 - -jobs: - standard: - name: "🐍 3.12 latest • ubuntu-latest • x64" - runs-on: ubuntu-latest - if: "contains(github.event.pull_request.labels.*.name, 'python dev')" - - steps: - - name: Show env - run: env - - - uses: actions/checkout@v3 - - - name: Setup Python 3.12 - uses: actions/setup-python@v4 - with: - python-version: "3.12-dev" - - - name: Setup Boost - run: sudo apt-get install libboost-dev - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.13 - - - name: Run pip installs - run: | - python -m pip install --upgrade pip - python -m pip install --prefer-binary -r tests/requirements.txt - # python -m pip install --prefer-binary numpy # SLOW - # python -m pip install --prefer-binary scipy # FAILED ~Nov 2022 - - - name: Show platform info - run: python -m platform - - - name: Show CMake version - run: cmake --version - - # FIRST BUILD - - name: Configure C++11 - run: > - cmake -S . -B build11 - -DCMAKE_VERBOSE_MAKEFILE=ON - -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 - - # python-3.12.0-alpha.1-linux-22.04-x64.tar.gz PASSED - # python-3.12.0-alpha.2-linux-22.04-x64.tar.gz FAILED - # python-3.12.0-alpha.3-linux-22.04-x64.tar.gz FAILED - # free(): invalid pointer - # Custom PyConfig - # /home/runner/work/pybind11/pybind11/tests/test_embed/test_interpreter.cpp:175 - # /home/runner/work/pybind11/pybind11/tests/test_embed/test_interpreter.cpp:179: FAILED: - # gdb traceback points here: - # https://github.com/python/cpython/blame/54289f85b2af1ecf046089ddf535dda1bdf6af24/Python/import.c#L524 - # - name: C++ tests C++11 - # run: cmake --build build11 --target cpptest -j 2 - - - name: Interface test C++11 - run: cmake --build build11 --target test_cmake_build - - - name: Clean directory - run: git clean -fdx - - # SECOND BUILD - - name: Configure C++17 - run: > - cmake -S . -B build17 - -DCMAKE_VERBOSE_MAKEFILE=ON - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - -DCMAKE_BUILD_TYPE=Debug - - - name: Build C++17 - run: cmake --build build17 -j 2 - - - name: Python tests C++17 - run: cmake --build build17 --target pytest - - # - name: C++ tests C++17 - # run: cmake --build build17 --target cpptest - - - name: Interface test C++17 - run: cmake --build build17 --target test_cmake_build - - - name: Clean directory - run: git clean -fdx - - # THIRD BUILD - - name: Configure C++17 max DPYBIND11_INTERNALS_VERSION - run: > - cmake -S . -B build17max - -DCMAKE_VERBOSE_MAKEFILE=ON - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - -DCMAKE_BUILD_TYPE=Debug - -DPYBIND11_INTERNALS_VERSION=10000000 - - - name: Build C++17 max DPYBIND11_INTERNALS_VERSION - run: cmake --build build17max -j 2 - - - name: Python tests C++17 max DPYBIND11_INTERNALS_VERSION - run: cmake --build build17max --target pytest - - # - name: C++ tests C++17 max DPYBIND11_INTERNALS_VERSION - # run: cmake --build build17max --target cpptest - - - name: Interface test C++17 max DPYBIND11_INTERNALS_VERSION - run: cmake --build build17max --target test_cmake_build - - # Ensure the setup_helpers module can build packages using setuptools - - name: Setuptools helpers test - run: pytest tests/extra_setuptools - - - name: Clean directory - run: git clean -fdx diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml new file mode 100644 index 00000000..366284ac --- /dev/null +++ b/.github/workflows/upstream.yml @@ -0,0 +1,112 @@ + +name: Upstream + +on: + workflow_dispatch: + pull_request: + +concurrency: + group: upstream-${{ github.ref }} + cancel-in-progress: true + +env: + PIP_ONLY_BINARY: numpy + +jobs: + standard: + name: "🐍 3.11 latest internals • ubuntu-latest • x64" + runs-on: ubuntu-latest + if: "contains(github.event.pull_request.labels.*.name, 'python dev')" + + steps: + - uses: actions/checkout@v3 + + - name: Setup Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: "3.11-dev" + + - name: Setup Boost (Linux) + if: runner.os == 'Linux' + run: sudo apt-get install libboost-dev + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v1.13 + + - name: Prepare env + run: | + python -m pip install -r tests/requirements.txt + + - name: Setup annotations on Linux + if: runner.os == 'Linux' + run: python -m pip install pytest-github-actions-annotate-failures + + # First build - C++11 mode and inplace + - name: Configure C++11 + run: > + cmake -S . -B . + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=11 + + - name: Build C++11 + run: cmake --build . -j 2 + + - name: Python tests C++11 + run: cmake --build . --target pytest -j 2 + + - name: C++11 tests + run: cmake --build . --target cpptest -j 2 + + - name: Interface test C++11 + run: cmake --build . --target test_cmake_build + + - name: Clean directory + run: git clean -fdx + + # Second build - C++17 mode and in a build directory + - name: Configure C++17 + run: > + cmake -S . -B build2 + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + ${{ matrix.args }} + ${{ matrix.args2 }} + + - name: Build + run: cmake --build build2 -j 2 + + - name: Python tests + run: cmake --build build2 --target pytest + + - name: C++ tests + 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 build3 --target test_cmake_build + + # This makes sure the setup_helpers module can build packages using + # setuptools + - name: Setuptools helpers test + run: pytest tests/extra_setuptools From a015c9eb9f16190a51201c9e326f3f532e8060aa Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 15 Dec 2022 21:52:19 -0800 Subject: [PATCH 03/13] Bring back python312.yml as upstream.yml --- .github/workflows/upstream.yml | 118 +++++++++++++++++++++------------ 1 file changed, 74 insertions(+), 44 deletions(-) diff --git a/.github/workflows/upstream.yml b/.github/workflows/upstream.yml index 366284ac..721a9202 100644 --- a/.github/workflows/upstream.yml +++ b/.github/workflows/upstream.yml @@ -1,4 +1,3 @@ - name: Upstream on: @@ -7,106 +6,137 @@ on: concurrency: group: upstream-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: false env: - PIP_ONLY_BINARY: numpy + PYTEST_TIMEOUT: 300 jobs: standard: - name: "🐍 3.11 latest internals • ubuntu-latest • x64" + name: "🐍 3.12 latest • ubuntu-latest • x64" runs-on: ubuntu-latest + + # Hint: Select the 'python dev' label in the PR web view. if: "contains(github.event.pull_request.labels.*.name, 'python dev')" steps: + - name: Show env + run: env + - uses: actions/checkout@v3 - - name: Setup Python 3.11 + - name: Setup Python 3.12 uses: actions/setup-python@v4 with: - python-version: "3.11-dev" + python-version: "3.12-dev" - - name: Setup Boost (Linux) - if: runner.os == 'Linux' + - name: Setup Boost run: sudo apt-get install libboost-dev - name: Update CMake uses: jwlawson/actions-setup-cmake@v1.13 - - name: Prepare env + - name: Run pip installs run: | - python -m pip install -r tests/requirements.txt + python -m pip install --upgrade pip + python -m pip install --prefer-binary -r tests/requirements.txt + # python -m pip install --prefer-binary numpy # SLOW + # python -m pip install --prefer-binary scipy # FAILED ~Nov 2022 + + - name: Show platform info + run: python -m platform - - name: Setup annotations on Linux - if: runner.os == 'Linux' - run: python -m pip install pytest-github-actions-annotate-failures + - name: Show CMake version + run: cmake --version - # First build - C++11 mode and inplace + # FIRST BUILD - name: Configure C++11 run: > - cmake -S . -B . + cmake -S . -B build11 + -DCMAKE_VERBOSE_MAKEFILE=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=11 + -DCMAKE_BUILD_TYPE=Debug - name: Build C++11 - run: cmake --build . -j 2 + run: cmake --build build11 -j 2 - name: Python tests C++11 - run: cmake --build . --target pytest -j 2 - - - name: C++11 tests - run: cmake --build . --target cpptest -j 2 + run: cmake --build build11 --target pytest -j 2 + + # python-3.12.0-alpha.1-linux-22.04-x64.tar.gz PASSED + # python-3.12.0-alpha.2-linux-22.04-x64.tar.gz FAILED + # python-3.12.0-alpha.3-linux-22.04-x64.tar.gz FAILED + # free(): invalid pointer + # Custom PyConfig + # /home/runner/work/pybind11/pybind11/tests/test_embed/test_interpreter.cpp:175 + # /home/runner/work/pybind11/pybind11/tests/test_embed/test_interpreter.cpp:179: FAILED: + # gdb traceback points here: + # https://github.com/python/cpython/blame/54289f85b2af1ecf046089ddf535dda1bdf6af24/Python/import.c#L524 + # - name: C++ tests C++11 + # run: cmake --build build11 --target cpptest -j 2 - name: Interface test C++11 - run: cmake --build . --target test_cmake_build + run: cmake --build build11 --target test_cmake_build - name: Clean directory run: git clean -fdx - # Second build - C++17 mode and in a build directory + # SECOND BUILD - name: Configure C++17 run: > - cmake -S . -B build2 + cmake -S . -B build17 + -DCMAKE_VERBOSE_MAKEFILE=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=17 - ${{ matrix.args }} - ${{ matrix.args2 }} + -DCMAKE_BUILD_TYPE=Debug + + - name: Build C++17 + run: cmake --build build17 -j 2 - - name: Build - run: cmake --build build2 -j 2 + - name: Python tests C++17 + run: cmake --build build17 --target pytest - - name: Python tests - run: cmake --build build2 --target pytest + # - name: C++ tests C++17 + # run: cmake --build build17 --target cpptest - - name: C++ tests - run: cmake --build build2 --target cpptest + - name: Interface test C++17 + run: cmake --build build17 --target test_cmake_build - # Third build - C++17 mode with unstable ABI - - name: Configure (unstable ABI) + - name: Clean directory + run: git clean -fdx + + # THIRD BUILD + - name: Configure C++17 max DPYBIND11_INTERNALS_VERSION run: > - cmake -S . -B build3 + cmake -S . -B build17max + -DCMAKE_VERBOSE_MAKEFILE=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=17 + -DCMAKE_BUILD_TYPE=Debug -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: Build C++17 max DPYBIND11_INTERNALS_VERSION + run: cmake --build build17max -j 2 + + - name: Python tests C++17 max DPYBIND11_INTERNALS_VERSION + run: cmake --build build17max --target pytest - - name: Python tests (unstable ABI) - run: cmake --build build3 --target pytest + # - name: C++ tests C++17 max DPYBIND11_INTERNALS_VERSION + # run: cmake --build build17max --target cpptest - - name: Interface test - run: cmake --build build3 --target test_cmake_build + - name: Interface test C++17 max DPYBIND11_INTERNALS_VERSION + run: cmake --build build17max --target test_cmake_build - # This makes sure the setup_helpers module can build packages using - # setuptools + # Ensure the setup_helpers module can build packages using setuptools - name: Setuptools helpers test run: pytest tests/extra_setuptools + + - name: Clean directory + run: git clean -fdx From d2a9bdc3a35da479d7192b60b24ee6bc0c51bc86 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 9 Mar 2023 06:32:41 -0800 Subject: [PATCH 04/13] Move upstream.yml back to python312.yml --- .github/workflows/{upstream.yml => python312.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{upstream.yml => python312.yml} (100%) diff --git a/.github/workflows/upstream.yml b/.github/workflows/python312.yml similarity index 100% rename from .github/workflows/upstream.yml rename to .github/workflows/python312.yml From 78479b666b230b1bbaa70060f45a3dddbbf4c6c8 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 9 Mar 2023 06:40:03 -0800 Subject: [PATCH 05/13] Move python312.yml to python312dev.yml --- .../workflows/{python312.yml => python312dev.yml} | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) rename .github/workflows/{python312.yml => python312dev.yml} (94%) diff --git a/.github/workflows/python312.yml b/.github/workflows/python312dev.yml similarity index 94% rename from .github/workflows/python312.yml rename to .github/workflows/python312dev.yml index 721a9202..e6ca7d46 100644 --- a/.github/workflows/python312.yml +++ b/.github/workflows/python312dev.yml @@ -1,11 +1,11 @@ -name: Upstream +name: python312dev on: workflow_dispatch: pull_request: concurrency: - group: upstream-${{ github.ref }} + group: python312dev-${{ github.ref }} cancel-in-progress: false env: @@ -13,11 +13,11 @@ env: jobs: standard: - name: "🐍 3.12 latest • ubuntu-latest • x64" + name: "🐍 3.12-dev • ubuntu-latest • x64" runs-on: ubuntu-latest - # Hint: Select the 'python dev' label in the PR web view. - if: "contains(github.event.pull_request.labels.*.name, 'python dev')" + # Hint: Select the 'python312dev' label in the PR web view. + if: "contains(github.event.pull_request.labels.*.name, 'python312dev')" steps: - name: Show env @@ -25,7 +25,7 @@ jobs: - uses: actions/checkout@v3 - - name: Setup Python 3.12 + - name: Setup Python 3.12-dev uses: actions/setup-python@v4 with: python-version: "3.12-dev" From d69bb150962cd85dbd5814773fd721086685728a Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 9 Mar 2023 07:33:08 -0800 Subject: [PATCH 06/13] Change label python312dev to gha_wf_python312dev_enable; introduce label gha_wf_ci_disable. --- .github/workflows/ci.yml | 3 ++ .github/workflows/ci_sh_def.yml | 3 ++ .github/workflows/ci_sh_def.yml.patch | 44 +++++++++++++-------------- .github/workflows/python312dev.yml | 4 +-- 4 files changed, 30 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9256955..a345c9f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,9 @@ jobs: # This is the "main" test suite, which tests a large number of different # versions of default compilers and Python versions in GitHub Actions. standard: + # Hint: Select the label in the PR web view. + if: "!contains(github.event.pull_request.labels.*.name, 'gha_wf_ci_disable')" + strategy: fail-fast: false matrix: diff --git a/.github/workflows/ci_sh_def.yml b/.github/workflows/ci_sh_def.yml index 508665e2..ee3ea45a 100644 --- a/.github/workflows/ci_sh_def.yml +++ b/.github/workflows/ci_sh_def.yml @@ -37,6 +37,9 @@ jobs: # This is the "main" test suite, which tests a large number of different # versions of default compilers and Python versions in GitHub Actions. standard: + # Hint: Select the label in the PR web view. + if: "!contains(github.event.pull_request.labels.*.name, 'gha_wf_ci_disable')" + strategy: fail-fast: false matrix: diff --git a/.github/workflows/ci_sh_def.yml.patch b/.github/workflows/ci_sh_def.yml.patch index 655f551d..8cfd5148 100644 --- a/.github/workflows/ci_sh_def.yml.patch +++ b/.github/workflows/ci_sh_def.yml.patch @@ -1,5 +1,5 @@ ---- ci.yml 2023-02-16 15:01:55.421851299 -0800 -+++ ci_sh_def.yml 2023-02-16 15:03:24.958936294 -0800 +--- ci.yml 2023-03-09 07:30:49.828172934 -0800 ++++ ci_sh_def.yml 2023-03-09 07:31:08.686111794 -0800 @@ -1,4 +1,16 @@ -name: CI +# PLEASE KEEP THIS GROUP OF FILES IN SYNC AT ALL TIMES: @@ -27,7 +27,7 @@ cancel-in-progress: true env: -@@ -114,6 +126,7 @@ +@@ -117,6 +129,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=11 @@ -35,7 +35,7 @@ ${{ matrix.args }} - name: Build C++11 -@@ -143,6 +156,7 @@ +@@ -146,6 +159,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=17 @@ -43,7 +43,7 @@ ${{ matrix.args }} - name: Build -@@ -164,6 +178,7 @@ +@@ -167,6 +181,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=17 @@ -51,7 +51,7 @@ -DPYBIND11_INTERNALS_VERSION=10000000 "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" ${{ matrix.args }} -@@ -251,6 +266,7 @@ +@@ -254,6 +269,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=17 @@ -59,7 +59,7 @@ - name: Build run: cmake --build build -j 2 -@@ -316,6 +332,7 @@ +@@ -319,6 +335,7 @@ -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} @@ -67,7 +67,7 @@ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - name: Build -@@ -345,7 +362,7 @@ +@@ -348,7 +365,7 @@ run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy - name: Configure @@ -76,7 +76,7 @@ - name: Build run: cmake --build build -j2 --verbose -@@ -425,7 +442,7 @@ +@@ -428,7 +445,7 @@ cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \ -DCMAKE_CXX_STANDARD=11 \ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \ @@ -85,7 +85,7 @@ -DPYBIND11_TEST_FILTER="test_smart_ptr.cpp" # Building before installing Pip should produce a warning but not an error -@@ -484,6 +501,7 @@ +@@ -487,6 +504,7 @@ -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} @@ -93,7 +93,7 @@ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - name: Build -@@ -539,6 +557,7 @@ +@@ -542,6 +560,7 @@ -DDOWNLOAD_CATCH=ON \ -DDOWNLOAD_EIGEN=OFF \ -DCMAKE_CXX_STANDARD=11 \ @@ -101,7 +101,7 @@ -DCMAKE_CXX_COMPILER=$(which icpc) \ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") -@@ -571,6 +590,7 @@ +@@ -574,6 +593,7 @@ -DDOWNLOAD_CATCH=ON \ -DDOWNLOAD_EIGEN=OFF \ -DCMAKE_CXX_STANDARD=17 \ @@ -109,7 +109,7 @@ -DCMAKE_CXX_COMPILER=$(which icpc) \ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") -@@ -638,6 +658,7 @@ +@@ -641,6 +661,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=11 @@ -117,7 +117,7 @@ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - name: Build -@@ -688,6 +709,7 @@ +@@ -691,6 +712,7 @@ cmake ../pybind11-tests -DDOWNLOAD_CATCH=ON -DPYBIND11_WERROR=ON @@ -125,7 +125,7 @@ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") working-directory: /build-tests -@@ -783,6 +805,7 @@ +@@ -786,6 +808,7 @@ -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON @@ -133,7 +133,7 @@ ${{ matrix.args }} - name: Build C++11 run: cmake --build build -j 2 -@@ -837,6 +860,7 @@ +@@ -840,6 +863,7 @@ -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON @@ -141,7 +141,7 @@ ${{ matrix.args }} - name: Build C++11 run: cmake --build build --config Debug -j 2 -@@ -877,6 +901,7 @@ +@@ -880,6 +904,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=20 @@ -149,7 +149,7 @@ - name: Build C++20 run: cmake --build build -j 2 -@@ -924,7 +949,7 @@ +@@ -927,7 +952,7 @@ - name: Configure C++11 # LTO leads to many undefined reference like # `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&) @@ -158,7 +158,7 @@ - name: Build C++11 run: cmake --build build -j 2 -@@ -942,7 +967,7 @@ +@@ -945,7 +970,7 @@ run: git clean -fdx - name: Configure C++14 @@ -167,7 +167,7 @@ - name: Build C++14 run: cmake --build build2 -j 2 -@@ -960,7 +985,7 @@ +@@ -963,7 +988,7 @@ run: git clean -fdx - name: Configure C++17 @@ -176,7 +176,7 @@ - name: Build C++17 run: cmake --build build3 -j 2 -@@ -1027,6 +1052,7 @@ +@@ -1030,6 +1055,7 @@ -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=17 @@ -184,7 +184,7 @@ - name: Build run: cmake --build . -j 2 -@@ -1092,6 +1118,7 @@ +@@ -1095,6 +1121,7 @@ -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=17 diff --git a/.github/workflows/python312dev.yml b/.github/workflows/python312dev.yml index e6ca7d46..3f926b8a 100644 --- a/.github/workflows/python312dev.yml +++ b/.github/workflows/python312dev.yml @@ -16,8 +16,8 @@ jobs: name: "🐍 3.12-dev • ubuntu-latest • x64" runs-on: ubuntu-latest - # Hint: Select the 'python312dev' label in the PR web view. - if: "contains(github.event.pull_request.labels.*.name, 'python312dev')" + # Hint: Select the label in the PR web view. + if: "contains(github.event.pull_request.labels.*.name, 'gha_wf_python312dev_enable')" steps: - name: Show env From d38c9daa2a20e91945a1a0c510e0b4b3e00bedd0 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 9 Mar 2023 10:52:22 -0800 Subject: [PATCH 07/13] FlakyException failure_point_init debugging prints --- include/pybind11/pytypes.h | 2 ++ tests/test_exceptions.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index f11ed5da..14e3d502 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -492,6 +492,7 @@ struct error_fetch_and_normalize { "of the original active exception type."); } m_lazy_error_string = exc_type_name_orig; + printf("\nLOOOK exc_type_name_orig=%s %s:%d\n", exc_type_name_orig, __FILE__, __LINE__); fflush(stdout); // PyErr_NormalizeException() may change the exception type if there are cascading // failures. This can potentially be extremely confusing. PyErr_NormalizeException(&m_type.ptr(), &m_value.ptr(), &m_trace.ptr()); @@ -506,6 +507,7 @@ struct error_fetch_and_normalize { + " failed to obtain the name " "of the normalized active exception type."); } + printf("\nLOOOK exc_type_name_norm=%s %s:%d\n", exc_type_name_norm, __FILE__, __LINE__); fflush(stdout); #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x07030a00 // This behavior runs the risk of masking errors in the error handling, but avoids a // conflict with PyPy, which relies on the normalization here to change OSError to diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py index 7f80a5da..cd14cbf4 100644 --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -292,6 +292,7 @@ def test_error_already_set_message_with_malformed_utf8(): class FlakyException(Exception): def __init__(self, failure_point): if failure_point == "failure_point_init": + print("\nLOOOK FlakyException failure_point_init", flush=True) raise ValueError("triggered_failure_point_init") self.failure_point = failure_point @@ -319,6 +320,8 @@ def test_error_already_set_what_with_happy_exceptions( @pytest.mark.skipif("env.PYPY", reason="PyErr_NormalizeException Segmentation fault") def test_flaky_exception_failure_point_init(): + tup = m.error_already_set_what(FlakyException, ("failure_point_init",)) + print("\nLOOOK tup", tup, flush=True) with pytest.raises(RuntimeError) as excinfo: m.error_already_set_what(FlakyException, ("failure_point_init",)) lines = str(excinfo.value).splitlines() From b4fcc79da4688dd7c3de765b1ba9491af2ecab0c Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 9 Mar 2023 10:52:35 -0800 Subject: [PATCH 08/13] Revert "FlakyException failure_point_init debugging prints" This reverts commit d38c9daa2a20e91945a1a0c510e0b4b3e00bedd0. --- include/pybind11/pytypes.h | 2 -- tests/test_exceptions.py | 3 --- 2 files changed, 5 deletions(-) diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h index 14e3d502..f11ed5da 100644 --- a/include/pybind11/pytypes.h +++ b/include/pybind11/pytypes.h @@ -492,7 +492,6 @@ struct error_fetch_and_normalize { "of the original active exception type."); } m_lazy_error_string = exc_type_name_orig; - printf("\nLOOOK exc_type_name_orig=%s %s:%d\n", exc_type_name_orig, __FILE__, __LINE__); fflush(stdout); // PyErr_NormalizeException() may change the exception type if there are cascading // failures. This can potentially be extremely confusing. PyErr_NormalizeException(&m_type.ptr(), &m_value.ptr(), &m_trace.ptr()); @@ -507,7 +506,6 @@ struct error_fetch_and_normalize { + " failed to obtain the name " "of the normalized active exception type."); } - printf("\nLOOOK exc_type_name_norm=%s %s:%d\n", exc_type_name_norm, __FILE__, __LINE__); fflush(stdout); #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x07030a00 // This behavior runs the risk of masking errors in the error handling, but avoids a // conflict with PyPy, which relies on the normalization here to change OSError to diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py index cd14cbf4..7f80a5da 100644 --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -292,7 +292,6 @@ def test_error_already_set_message_with_malformed_utf8(): class FlakyException(Exception): def __init__(self, failure_point): if failure_point == "failure_point_init": - print("\nLOOOK FlakyException failure_point_init", flush=True) raise ValueError("triggered_failure_point_init") self.failure_point = failure_point @@ -320,8 +319,6 @@ def test_error_already_set_what_with_happy_exceptions( @pytest.mark.skipif("env.PYPY", reason="PyErr_NormalizeException Segmentation fault") def test_flaky_exception_failure_point_init(): - tup = m.error_already_set_what(FlakyException, ("failure_point_init",)) - print("\nLOOOK tup", tup, flush=True) with pytest.raises(RuntimeError) as excinfo: m.error_already_set_what(FlakyException, ("failure_point_init",)) lines = str(excinfo.value).splitlines() From 6543814943b73924f13339ae2190032d8aefc078 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 9 Mar 2023 11:39:29 -0800 Subject: [PATCH 09/13] Skip failing test specifically for 3.12alpha6 Root problem: * Up to and including 3.12alpha3: `PyErr_Fetch()` produces the `FlakyException` type. * With 3.12alpha6: `PyErr_Fetch()` produces the `ValueError` type instead. Additional detail: Up to and including 3.12alpha3: only `PyErr_NormalizeException()` hits the `ValueError` in `FlakyException._init__`, but not `PyErr_Fetch()`. --- tests/test_exceptions.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_exceptions.py b/tests/test_exceptions.py index 7f80a5da..0a097f2a 100644 --- a/tests/test_exceptions.py +++ b/tests/test_exceptions.py @@ -317,6 +317,11 @@ def test_error_already_set_what_with_happy_exceptions( assert what == expected_what +@pytest.mark.skipif( + # Intentionally very specific: + "sys.version_info == (3, 12, 0, 'alpha', 6)", + reason="Suspected bug in 3.12alpha6", +) @pytest.mark.skipif("env.PYPY", reason="PyErr_NormalizeException Segmentation fault") def test_flaky_exception_failure_point_init(): with pytest.raises(RuntimeError) as excinfo: From 9ebd5f7422bbf3fae356c4a65f5084c223a6b926 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 9 Mar 2023 11:27:44 -0800 Subject: [PATCH 10/13] Remove test code that does not exercise anything in pybind11, but breaks between Python 3.12alpha3 (still working) and 3.12alpha6 (broken): ``` str(OrderedDict([(1, "a"), (2, "b")])) ``` Old: ``` OrderedDict([(1, 'a'), (2, 'b')]) ``` New: ``` OrderedDict({1: 'a', 2: 'b'}) ``` --- tests/test_modules.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_modules.py b/tests/test_modules.py index 3d73e3fb..2f6d825b 100644 --- a/tests/test_modules.py +++ b/tests/test_modules.py @@ -63,7 +63,6 @@ def test_importing(): from pybind11_tests.modules import OD assert OD is OrderedDict - assert str(OD([(1, "a"), (2, "b")])) == "OrderedDict([(1, 'a'), (2, 'b')])" def test_pydoc(): From 73e653b1451b0d0c051b96b8df42f87b4d3ad276 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 9 Mar 2023 11:46:09 -0800 Subject: [PATCH 11/13] Document that test_embed is still failing (tested only interactively with locally install 3.12alpha6, but the behavior is exactly the same as previously observed in the GH workflow). --- .github/workflows/python312dev.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python312dev.yml b/.github/workflows/python312dev.yml index 3f926b8a..cf61d6dd 100644 --- a/.github/workflows/python312dev.yml +++ b/.github/workflows/python312dev.yml @@ -69,6 +69,7 @@ jobs: # python-3.12.0-alpha.1-linux-22.04-x64.tar.gz PASSED # python-3.12.0-alpha.2-linux-22.04-x64.tar.gz FAILED # python-3.12.0-alpha.3-linux-22.04-x64.tar.gz FAILED + # python-3.12.0-alpha.6-linux-22.04-x64.tar.gz FAILED # free(): invalid pointer # Custom PyConfig # /home/runner/work/pybind11/pybind11/tests/test_embed/test_interpreter.cpp:175 From 128d2278756c6b0ae38f63d30e3e72881bd92a24 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 9 Mar 2023 12:03:56 -0800 Subject: [PATCH 12/13] Try again: gha_wf_ci_disable --- .github/workflows/ci.yml | 5 ++- .github/workflows/ci_sh_def.yml | 5 ++- .github/workflows/ci_sh_def.yml.patch | 44 +++++++++++++-------------- 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a345c9f8..4e13308e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,13 +21,12 @@ env: # For cmake: VERBOSE: 1 +# Hint: Select the label in the PR web view. +if: "!contains(github.event.pull_request.labels.*.name, 'gha_wf_ci_disable')" jobs: # This is the "main" test suite, which tests a large number of different # versions of default compilers and Python versions in GitHub Actions. standard: - # Hint: Select the label in the PR web view. - if: "!contains(github.event.pull_request.labels.*.name, 'gha_wf_ci_disable')" - strategy: fail-fast: false matrix: diff --git a/.github/workflows/ci_sh_def.yml b/.github/workflows/ci_sh_def.yml index ee3ea45a..3e9bb412 100644 --- a/.github/workflows/ci_sh_def.yml +++ b/.github/workflows/ci_sh_def.yml @@ -33,13 +33,12 @@ env: # For cmake: VERBOSE: 1 +# Hint: Select the label in the PR web view. +if: "!contains(github.event.pull_request.labels.*.name, 'gha_wf_ci_disable')" jobs: # This is the "main" test suite, which tests a large number of different # versions of default compilers and Python versions in GitHub Actions. standard: - # Hint: Select the label in the PR web view. - if: "!contains(github.event.pull_request.labels.*.name, 'gha_wf_ci_disable')" - strategy: fail-fast: false matrix: diff --git a/.github/workflows/ci_sh_def.yml.patch b/.github/workflows/ci_sh_def.yml.patch index 8cfd5148..325b5c81 100644 --- a/.github/workflows/ci_sh_def.yml.patch +++ b/.github/workflows/ci_sh_def.yml.patch @@ -1,5 +1,5 @@ ---- ci.yml 2023-03-09 07:30:49.828172934 -0800 -+++ ci_sh_def.yml 2023-03-09 07:31:08.686111794 -0800 +--- ci.yml 2023-03-09 12:31:40.524207369 -0800 ++++ ci_sh_def.yml 2023-03-09 12:32:23.868662852 -0800 @@ -1,4 +1,16 @@ -name: CI +# PLEASE KEEP THIS GROUP OF FILES IN SYNC AT ALL TIMES: @@ -27,7 +27,7 @@ cancel-in-progress: true env: -@@ -117,6 +129,7 @@ +@@ -116,6 +128,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=11 @@ -35,7 +35,7 @@ ${{ matrix.args }} - name: Build C++11 -@@ -146,6 +159,7 @@ +@@ -145,6 +158,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=17 @@ -43,7 +43,7 @@ ${{ matrix.args }} - name: Build -@@ -167,6 +181,7 @@ +@@ -166,6 +180,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=17 @@ -51,7 +51,7 @@ -DPYBIND11_INTERNALS_VERSION=10000000 "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" ${{ matrix.args }} -@@ -254,6 +269,7 @@ +@@ -253,6 +268,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=17 @@ -59,7 +59,7 @@ - name: Build run: cmake --build build -j 2 -@@ -319,6 +335,7 @@ +@@ -318,6 +334,7 @@ -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} @@ -67,7 +67,7 @@ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - name: Build -@@ -348,7 +365,7 @@ +@@ -347,7 +364,7 @@ run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy - name: Configure @@ -76,7 +76,7 @@ - name: Build run: cmake --build build -j2 --verbose -@@ -428,7 +445,7 @@ +@@ -427,7 +444,7 @@ cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \ -DCMAKE_CXX_STANDARD=11 \ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \ @@ -85,7 +85,7 @@ -DPYBIND11_TEST_FILTER="test_smart_ptr.cpp" # Building before installing Pip should produce a warning but not an error -@@ -487,6 +504,7 @@ +@@ -486,6 +503,7 @@ -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} @@ -93,7 +93,7 @@ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - name: Build -@@ -542,6 +560,7 @@ +@@ -541,6 +559,7 @@ -DDOWNLOAD_CATCH=ON \ -DDOWNLOAD_EIGEN=OFF \ -DCMAKE_CXX_STANDARD=11 \ @@ -101,7 +101,7 @@ -DCMAKE_CXX_COMPILER=$(which icpc) \ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") -@@ -574,6 +593,7 @@ +@@ -573,6 +592,7 @@ -DDOWNLOAD_CATCH=ON \ -DDOWNLOAD_EIGEN=OFF \ -DCMAKE_CXX_STANDARD=17 \ @@ -109,7 +109,7 @@ -DCMAKE_CXX_COMPILER=$(which icpc) \ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") -@@ -641,6 +661,7 @@ +@@ -640,6 +660,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=11 @@ -117,7 +117,7 @@ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - name: Build -@@ -691,6 +712,7 @@ +@@ -690,6 +711,7 @@ cmake ../pybind11-tests -DDOWNLOAD_CATCH=ON -DPYBIND11_WERROR=ON @@ -125,7 +125,7 @@ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") working-directory: /build-tests -@@ -786,6 +808,7 @@ +@@ -785,6 +807,7 @@ -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON @@ -133,7 +133,7 @@ ${{ matrix.args }} - name: Build C++11 run: cmake --build build -j 2 -@@ -840,6 +863,7 @@ +@@ -839,6 +862,7 @@ -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON @@ -141,7 +141,7 @@ ${{ matrix.args }} - name: Build C++11 run: cmake --build build --config Debug -j 2 -@@ -880,6 +904,7 @@ +@@ -879,6 +903,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=20 @@ -149,7 +149,7 @@ - name: Build C++20 run: cmake --build build -j 2 -@@ -927,7 +952,7 @@ +@@ -926,7 +951,7 @@ - name: Configure C++11 # LTO leads to many undefined reference like # `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&) @@ -158,7 +158,7 @@ - name: Build C++11 run: cmake --build build -j 2 -@@ -945,7 +970,7 @@ +@@ -944,7 +969,7 @@ run: git clean -fdx - name: Configure C++14 @@ -167,7 +167,7 @@ - name: Build C++14 run: cmake --build build2 -j 2 -@@ -963,7 +988,7 @@ +@@ -962,7 +987,7 @@ run: git clean -fdx - name: Configure C++17 @@ -176,7 +176,7 @@ - name: Build C++17 run: cmake --build build3 -j 2 -@@ -1030,6 +1055,7 @@ +@@ -1029,6 +1054,7 @@ -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=17 @@ -184,7 +184,7 @@ - name: Build run: cmake --build . -j 2 -@@ -1095,6 +1121,7 @@ +@@ -1094,6 +1120,7 @@ -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=17 From ba3c870f5c6692d7229dddbb96d374873cf6260a Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 9 Mar 2023 12:59:39 -0800 Subject: [PATCH 13/13] Give up on trying to use label to disable entire workflow file. --- .github/workflows/ci.yml | 2 -- .github/workflows/ci_sh_def.yml | 2 -- .github/workflows/ci_sh_def.yml.patch | 44 +++++++++++++-------------- 3 files changed, 22 insertions(+), 26 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e13308e..b9256955 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,8 +21,6 @@ env: # For cmake: VERBOSE: 1 -# Hint: Select the label in the PR web view. -if: "!contains(github.event.pull_request.labels.*.name, 'gha_wf_ci_disable')" jobs: # This is the "main" test suite, which tests a large number of different # versions of default compilers and Python versions in GitHub Actions. diff --git a/.github/workflows/ci_sh_def.yml b/.github/workflows/ci_sh_def.yml index 3e9bb412..508665e2 100644 --- a/.github/workflows/ci_sh_def.yml +++ b/.github/workflows/ci_sh_def.yml @@ -33,8 +33,6 @@ env: # For cmake: VERBOSE: 1 -# Hint: Select the label in the PR web view. -if: "!contains(github.event.pull_request.labels.*.name, 'gha_wf_ci_disable')" jobs: # This is the "main" test suite, which tests a large number of different # versions of default compilers and Python versions in GitHub Actions. diff --git a/.github/workflows/ci_sh_def.yml.patch b/.github/workflows/ci_sh_def.yml.patch index 325b5c81..655f551d 100644 --- a/.github/workflows/ci_sh_def.yml.patch +++ b/.github/workflows/ci_sh_def.yml.patch @@ -1,5 +1,5 @@ ---- ci.yml 2023-03-09 12:31:40.524207369 -0800 -+++ ci_sh_def.yml 2023-03-09 12:32:23.868662852 -0800 +--- ci.yml 2023-02-16 15:01:55.421851299 -0800 ++++ ci_sh_def.yml 2023-02-16 15:03:24.958936294 -0800 @@ -1,4 +1,16 @@ -name: CI +# PLEASE KEEP THIS GROUP OF FILES IN SYNC AT ALL TIMES: @@ -27,7 +27,7 @@ cancel-in-progress: true env: -@@ -116,6 +128,7 @@ +@@ -114,6 +126,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=11 @@ -35,7 +35,7 @@ ${{ matrix.args }} - name: Build C++11 -@@ -145,6 +158,7 @@ +@@ -143,6 +156,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=17 @@ -43,7 +43,7 @@ ${{ matrix.args }} - name: Build -@@ -166,6 +180,7 @@ +@@ -164,6 +178,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=17 @@ -51,7 +51,7 @@ -DPYBIND11_INTERNALS_VERSION=10000000 "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" ${{ matrix.args }} -@@ -253,6 +268,7 @@ +@@ -251,6 +266,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=17 @@ -59,7 +59,7 @@ - name: Build run: cmake --build build -j 2 -@@ -318,6 +334,7 @@ +@@ -316,6 +332,7 @@ -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} @@ -67,7 +67,7 @@ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - name: Build -@@ -347,7 +364,7 @@ +@@ -345,7 +362,7 @@ run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy - name: Configure @@ -76,7 +76,7 @@ - name: Build run: cmake --build build -j2 --verbose -@@ -427,7 +444,7 @@ +@@ -425,7 +442,7 @@ cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \ -DCMAKE_CXX_STANDARD=11 \ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \ @@ -85,7 +85,7 @@ -DPYBIND11_TEST_FILTER="test_smart_ptr.cpp" # Building before installing Pip should produce a warning but not an error -@@ -486,6 +503,7 @@ +@@ -484,6 +501,7 @@ -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=${{ matrix.std }} @@ -93,7 +93,7 @@ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - name: Build -@@ -541,6 +559,7 @@ +@@ -539,6 +557,7 @@ -DDOWNLOAD_CATCH=ON \ -DDOWNLOAD_EIGEN=OFF \ -DCMAKE_CXX_STANDARD=11 \ @@ -101,7 +101,7 @@ -DCMAKE_CXX_COMPILER=$(which icpc) \ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") -@@ -573,6 +592,7 @@ +@@ -571,6 +590,7 @@ -DDOWNLOAD_CATCH=ON \ -DDOWNLOAD_EIGEN=OFF \ -DCMAKE_CXX_STANDARD=17 \ @@ -109,7 +109,7 @@ -DCMAKE_CXX_COMPILER=$(which icpc) \ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") -@@ -640,6 +660,7 @@ +@@ -638,6 +658,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=11 @@ -117,7 +117,7 @@ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - name: Build -@@ -690,6 +711,7 @@ +@@ -688,6 +709,7 @@ cmake ../pybind11-tests -DDOWNLOAD_CATCH=ON -DPYBIND11_WERROR=ON @@ -125,7 +125,7 @@ -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") working-directory: /build-tests -@@ -785,6 +807,7 @@ +@@ -783,6 +805,7 @@ -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON @@ -133,7 +133,7 @@ ${{ matrix.args }} - name: Build C++11 run: cmake --build build -j 2 -@@ -839,6 +862,7 @@ +@@ -837,6 +860,7 @@ -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON @@ -141,7 +141,7 @@ ${{ matrix.args }} - name: Build C++11 run: cmake --build build --config Debug -j 2 -@@ -879,6 +903,7 @@ +@@ -877,6 +901,7 @@ -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_STANDARD=20 @@ -149,7 +149,7 @@ - name: Build C++20 run: cmake --build build -j 2 -@@ -926,7 +951,7 @@ +@@ -924,7 +949,7 @@ - name: Configure C++11 # LTO leads to many undefined reference like # `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&) @@ -158,7 +158,7 @@ - name: Build C++11 run: cmake --build build -j 2 -@@ -944,7 +969,7 @@ +@@ -942,7 +967,7 @@ run: git clean -fdx - name: Configure C++14 @@ -167,7 +167,7 @@ - name: Build C++14 run: cmake --build build2 -j 2 -@@ -962,7 +987,7 @@ +@@ -960,7 +985,7 @@ run: git clean -fdx - name: Configure C++17 @@ -176,7 +176,7 @@ - name: Build C++17 run: cmake --build build3 -j 2 -@@ -1029,6 +1054,7 @@ +@@ -1027,6 +1052,7 @@ -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=17 @@ -184,7 +184,7 @@ - name: Build run: cmake --build . -j 2 -@@ -1094,6 +1120,7 @@ +@@ -1092,6 +1118,7 @@ -DDOWNLOAD_EIGEN=ON -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_STANDARD=17