From c7759bfad43ae7b5ff798ce341ccca9a25706d67 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Wed, 13 Jan 2021 21:28:03 +0100 Subject: [PATCH 1/8] Disable builds for 3.10.0a4, and enable a nightly 3.10-dev build --- .github/workflows/ci.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7f1d49346b..1eae1f3ba3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: - 3.5 - 3.6 - 3.9 - - 3.10-dev + # - 3.10-dev # Re-enable once 3.10.0a5 is released - pypy2 - pypy3 @@ -42,6 +42,9 @@ jobs: python: 3.6 args: > -DPYBIND11_FINDPYTHON=ON + - runs-on: ubuntu-latest + python: 3.10-dev + nightly: true # These items will be removed from the build matrix, keys must match. exclude: @@ -62,10 +65,17 @@ jobs: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python }} + if: "!matrix.nightly" uses: actions/setup-python@v2 with: python-version: ${{ matrix.python }} + - name: Setup Python ${{ matrix.python }} (nightly) + if: matrix.nightly + uses: deadsnakes/action@v2.1.0 + with: + python-version: ${{ matrix.python }} + - name: Setup Boost (Windows / Linux latest) shell: bash run: echo "BOOST_ROOT=$BOOST_ROOT_1_72_0" >> $GITHUB_ENV From a930514288e2bf9291ec33d9883efb42fe658415 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Wed, 13 Jan 2021 21:33:33 +0100 Subject: [PATCH 2/8] Fix job name --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1eae1f3ba3..0b0575e33b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,7 +58,7 @@ jobs: - runs-on: ubuntu-latest python: pypy2 - name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}" + name: "🐍 ${{ matrix.python }} ${{ matrix.nightly && '(nightly)' || '' }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}" runs-on: ${{ matrix.runs-on }} steps: From fd9fcb4af21d55e9234ac53aced20a3587137ea4 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Wed, 13 Jan 2021 21:45:49 +0100 Subject: [PATCH 3/8] Remove deadsnakes job for now --- .github/workflows/ci.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b0575e33b..44a17e17e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,9 +42,6 @@ jobs: python: 3.6 args: > -DPYBIND11_FINDPYTHON=ON - - runs-on: ubuntu-latest - python: 3.10-dev - nightly: true # These items will be removed from the build matrix, keys must match. exclude: @@ -58,24 +55,17 @@ jobs: - runs-on: ubuntu-latest python: pypy2 - name: "🐍 ${{ matrix.python }} ${{ matrix.nightly && '(nightly)' || '' }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}" + name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}" runs-on: ${{ matrix.runs-on }} steps: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python }} - if: "!matrix.nightly" uses: actions/setup-python@v2 with: python-version: ${{ matrix.python }} - - name: Setup Python ${{ matrix.python }} (nightly) - if: matrix.nightly - uses: deadsnakes/action@v2.1.0 - with: - python-version: ${{ matrix.python }} - - name: Setup Boost (Windows / Linux latest) shell: bash run: echo "BOOST_ROOT=$BOOST_ROOT_1_72_0" >> $GITHUB_ENV From 51945669af105ee7240a03cd1b906350856b317b Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Wed, 13 Jan 2021 23:13:53 +0100 Subject: [PATCH 4/8] Add deadsnakes jobs --- .github/workflows/ci.yml | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44a17e17e8..48f234bf85 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -165,6 +165,51 @@ jobs: run: pytest tests/extra_setuptools + deadsnakes: + strategy: + fail-fast: false + matrix: + python: + - version: 2.7 + debug: true + - version: 3.9 + debug: true + - version: 3.10-dev + debug: false + + name: "🐍 ${{ matrix.python.version }}${{ matrix.python.debug && ' (debug)' || '' }} • deadsnakes • x64" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Setup Python ${{ matrix.python.version }} + uses: deadsnakes/action@v2.1.0 + with: + python-version: ${{ matrix.python.version }} + debug: ${{ matrix.python.version.debug }} + + - name: Prepare env + run: python -m pip install -r tests/requirements.txt --prefer-binary + + - name: Configure + run: > + cmake -S . -B build + -DPYBIND11_WERROR=ON + -DDOWNLOAD_CATCH=ON + -DDOWNLOAD_EIGEN=ON + -DCMAKE_CXX_STANDARD=17 + + - 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 + + # Testing on clang using the excellent silkeh clang docker images clang: runs-on: ubuntu-latest From 8b55c26b2c0001e8dec850d565acafdbf4eab051 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Wed, 13 Jan 2021 23:26:38 +0100 Subject: [PATCH 5/8] There's no deadsnakes 2.7 --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 48f234bf85..182b1b1ede 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -170,8 +170,6 @@ jobs: fail-fast: false matrix: python: - - version: 2.7 - debug: true - version: 3.9 debug: true - version: 3.10-dev From a386b2c9cf85d572d88e2d3ba258cd9fdcbe30c8 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Wed, 13 Jan 2021 23:36:17 +0100 Subject: [PATCH 6/8] Add 3.10 to versions to be discovered by legacy FindPython, and fix debug input to deadsnakes/action --- .github/workflows/ci.yml | 4 ++-- tools/pybind11Tools.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 182b1b1ede..a9e5864d51 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -181,11 +181,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Setup Python ${{ matrix.python.version }} + - name: Setup Python ${{ matrix.python.version }} (deadsnakes) uses: deadsnakes/action@v2.1.0 with: python-version: ${{ matrix.python.version }} - debug: ${{ matrix.python.version.debug }} + debug: ${{ matrix.python.debug }} - name: Prepare env run: python -m pip install -r tests/requirements.txt --prefer-binary diff --git a/tools/pybind11Tools.cmake b/tools/pybind11Tools.cmake index cdd1979597..aee60db28b 100644 --- a/tools/pybind11Tools.cmake +++ b/tools/pybind11Tools.cmake @@ -31,7 +31,7 @@ endif() # A user can set versions manually too set(Python_ADDITIONAL_VERSIONS - "3.9;3.8;3.7;3.6;3.5;3.4" + "3.10;3.9;3.8;3.7;3.6;3.5;3.4" CACHE INTERNAL "") list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}") From 4e01601d011262fa23d89388b04fe5c4ff3b16e9 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Thu, 14 Jan 2021 00:12:11 +0100 Subject: [PATCH 7/8] Try out branch with fix --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9e5864d51..a9a321963f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,7 +182,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python.version }} (deadsnakes) - uses: deadsnakes/action@v2.1.0 + uses: YannickJadoul/deadsnakes-action@fix-input-boolean with: python-version: ${{ matrix.python.version }} debug: ${{ matrix.python.debug }} From de40dadf4df948c7049a9fe51adc42f17b395b57 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Thu, 14 Jan 2021 01:03:04 +0100 Subject: [PATCH 8/8] Update to deadsnakes/action@v2.1.1 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9a321963f..3fa9c4eca4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,7 +182,7 @@ jobs: - uses: actions/checkout@v2 - name: Setup Python ${{ matrix.python.version }} (deadsnakes) - uses: YannickJadoul/deadsnakes-action@fix-input-boolean + uses: deadsnakes/action@v2.1.1 with: python-version: ${{ matrix.python.version }} debug: ${{ matrix.python.debug }}