|
| 1 | +name: Python312 |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + pull_request: |
| 6 | + |
| 7 | +concurrency: |
| 8 | + group: python312-${{ github.ref }} |
| 9 | + cancel-in-progress: false |
| 10 | + |
| 11 | +env: |
| 12 | + PYTEST_TIMEOUT: 300 |
| 13 | + |
| 14 | +jobs: |
| 15 | + standard: |
| 16 | + name: "🐍 3.12 latest • ubuntu-latest • x64" |
| 17 | + runs-on: ubuntu-latest |
| 18 | + if: "contains(github.event.pull_request.labels.*.name, 'python dev')" |
| 19 | + |
| 20 | + steps: |
| 21 | + - name: Show env |
| 22 | + run: env |
| 23 | + |
| 24 | + - uses: actions/checkout@v3 |
| 25 | + |
| 26 | + - name: Setup Python 3.12 |
| 27 | + uses: actions/setup-python@v4 |
| 28 | + with: |
| 29 | + python-version: "3.12-dev" |
| 30 | + |
| 31 | + - name: Setup Boost |
| 32 | + run: sudo apt-get install libboost-dev |
| 33 | + |
| 34 | + - name: Update CMake |
| 35 | + |
| 36 | + |
| 37 | + - name: Run pip installs |
| 38 | + run: | |
| 39 | + python -m pip install --upgrade pip |
| 40 | + python -m pip install --prefer-binary -r tests/requirements.txt |
| 41 | + # python -m pip install --prefer-binary numpy # SLOW |
| 42 | + # python -m pip install --prefer-binary scipy # FAILED ~Nov 2022 |
| 43 | + |
| 44 | + - name: Show platform info |
| 45 | + run: python -m platform |
| 46 | + |
| 47 | + - name: Show CMake version |
| 48 | + run: cmake --version |
| 49 | + |
| 50 | + # FIRST BUILD |
| 51 | + - name: Configure C++11 |
| 52 | + run: > |
| 53 | + cmake -S . -B build11 |
| 54 | + -DCMAKE_VERBOSE_MAKEFILE=ON |
| 55 | + -DPYBIND11_WERROR=ON |
| 56 | + -DDOWNLOAD_CATCH=ON |
| 57 | + -DDOWNLOAD_EIGEN=ON |
| 58 | + -DCMAKE_CXX_STANDARD=11 |
| 59 | + -DCMAKE_BUILD_TYPE=Debug |
| 60 | +
|
| 61 | + - name: Build C++11 |
| 62 | + run: cmake --build build11 -j 2 |
| 63 | + |
| 64 | + - name: Python tests C++11 |
| 65 | + run: cmake --build build11 --target pytest -j 2 |
| 66 | + |
| 67 | + # python-3.12.0-alpha.1-linux-22.04-x64.tar.gz PASSED |
| 68 | + # python-3.12.0-alpha.2-linux-22.04-x64.tar.gz FAILED |
| 69 | + # python-3.12.0-alpha.3-linux-22.04-x64.tar.gz FAILED |
| 70 | + # free(): invalid pointer |
| 71 | + # Custom PyConfig |
| 72 | + # /home/runner/work/pybind11/pybind11/tests/test_embed/test_interpreter.cpp:175 |
| 73 | + # /home/runner/work/pybind11/pybind11/tests/test_embed/test_interpreter.cpp:179: FAILED: |
| 74 | + # gdb traceback points here: |
| 75 | + # https://github.com/python/cpython/blame/54289f85b2af1ecf046089ddf535dda1bdf6af24/Python/import.c#L524 |
| 76 | + # - name: C++ tests C++11 |
| 77 | + # run: cmake --build build11 --target cpptest -j 2 |
| 78 | + |
| 79 | + - name: Interface test C++11 |
| 80 | + run: cmake --build build11 --target test_cmake_build |
| 81 | + |
| 82 | + - name: Clean directory |
| 83 | + run: git clean -fdx |
| 84 | + |
| 85 | + # SECOND BUILD |
| 86 | + - name: Configure C++17 |
| 87 | + run: > |
| 88 | + cmake -S . -B build17 |
| 89 | + -DCMAKE_VERBOSE_MAKEFILE=ON |
| 90 | + -DPYBIND11_WERROR=ON |
| 91 | + -DDOWNLOAD_CATCH=ON |
| 92 | + -DDOWNLOAD_EIGEN=ON |
| 93 | + -DCMAKE_CXX_STANDARD=17 |
| 94 | + -DCMAKE_BUILD_TYPE=Debug |
| 95 | +
|
| 96 | + - name: Build C++17 |
| 97 | + run: cmake --build build17 -j 2 |
| 98 | + |
| 99 | + - name: Python tests C++17 |
| 100 | + run: cmake --build build17 --target pytest |
| 101 | + |
| 102 | + # - name: C++ tests C++17 |
| 103 | + # run: cmake --build build17 --target cpptest |
| 104 | + |
| 105 | + - name: Interface test C++17 |
| 106 | + run: cmake --build build17 --target test_cmake_build |
| 107 | + |
| 108 | + - name: Clean directory |
| 109 | + run: git clean -fdx |
| 110 | + |
| 111 | + # THIRD BUILD |
| 112 | + - name: Configure C++17 max DPYBIND11_INTERNALS_VERSION |
| 113 | + run: > |
| 114 | + cmake -S . -B build17max |
| 115 | + -DCMAKE_VERBOSE_MAKEFILE=ON |
| 116 | + -DPYBIND11_WERROR=ON |
| 117 | + -DDOWNLOAD_CATCH=ON |
| 118 | + -DDOWNLOAD_EIGEN=ON |
| 119 | + -DCMAKE_CXX_STANDARD=17 |
| 120 | + -DCMAKE_BUILD_TYPE=Debug |
| 121 | + -DPYBIND11_INTERNALS_VERSION=10000000 |
| 122 | +
|
| 123 | + - name: Build C++17 max DPYBIND11_INTERNALS_VERSION |
| 124 | + run: cmake --build build17max -j 2 |
| 125 | + |
| 126 | + - name: Python tests C++17 max DPYBIND11_INTERNALS_VERSION |
| 127 | + run: cmake --build build17max --target pytest |
| 128 | + |
| 129 | + # - name: C++ tests C++17 max DPYBIND11_INTERNALS_VERSION |
| 130 | + # run: cmake --build build17max --target cpptest |
| 131 | + |
| 132 | + - name: Interface test C++17 max DPYBIND11_INTERNALS_VERSION |
| 133 | + run: cmake --build build17max --target test_cmake_build |
| 134 | + |
| 135 | + # Ensure the setup_helpers module can build packages using setuptools |
| 136 | + - name: Setuptools helpers test |
| 137 | + run: pytest tests/extra_setuptools |
| 138 | + |
| 139 | + - name: Clean directory |
| 140 | + run: git clean -fdx |
0 commit comments