Tracking ci.yml changes from master.

Also disabling `-D_=1` (breaks smart_holder_poc_test.cpp).
This commit is contained in:
Ralf W. Grosse-Kunstleve 2022-02-14 16:20:48 -08:00
parent e1751c04f0
commit 5820767a18
3 changed files with 91 additions and 126 deletions

View File

@ -45,7 +45,7 @@ jobs:
python: '3.6'
args: >
-DPYBIND11_FINDPYTHON=ON
-DCMAKE_CXX_FLAGS="-D_=1"
# BREAKS -DCMAKE_CXX_FLAGS="-D_=1"
- runs-on: windows-latest
python: '3.6'
args: >

View File

@ -28,6 +28,8 @@ concurrency:
env:
PIP_ONLY_BINARY: numpy
FORCE_COLOR: 3
PYTEST_TIMEOUT: 300
jobs:
# This is the "main" test suite, which tests a large number of different
@ -38,8 +40,6 @@ jobs:
matrix:
runs-on: [ubuntu-latest, windows-2022, macos-latest]
python:
- '2.7'
- '3.5'
- '3.6'
- '3.9'
- '3.10'
@ -57,18 +57,14 @@ jobs:
python: '3.6'
args: >
-DPYBIND11_FINDPYTHON=ON
-DCMAKE_CXX_FLAGS="-D_=1"
# BREAKS -DCMAKE_CXX_FLAGS="-D_=1"
- runs-on: windows-latest
python: '3.6'
args: >
-DPYBIND11_FINDPYTHON=ON
- runs-on: macos-latest
python: 'pypy-2.7'
# Inject a couple Windows 2019 runs
- runs-on: windows-2019
python: '3.9'
- runs-on: windows-2019
python: '2.7'
name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}"
runs-on: ${{ matrix.runs-on }}
@ -184,27 +180,11 @@ jobs:
- name: Interface test
run: cmake --build build2 --target test_cmake_build
# Eventually Microsoft might have an action for setting up
# MSVC, but for now, this action works:
- name: Prepare compiler environment for Windows 🐍 2.7
if: matrix.python == 2.7 && runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1.10.0
with:
arch: x64
# This makes two environment variables available in the following step(s)
- name: Set Windows 🐍 2.7 environment variables
if: matrix.python == 2.7 && runner.os == 'Windows'
shell: bash
run: |
echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
echo "MSSdk=1" >> $GITHUB_ENV
# This makes sure the setup_helpers module can build packages using
# setuptools
- name: Setuptools helpers test
run: pytest tests/extra_setuptools
if: "!(matrix.python == '3.5' && matrix.runs-on == 'windows-2022')"
if: "!(matrix.runs-on == 'windows-2022')"
deadsnakes:
@ -668,9 +648,9 @@ jobs:
# This tests an "install" with the CMake tools
install-classic:
name: "🐍 3.5 • Debian • x86 • Install"
name: "🐍 3.7 • Debian • x86 • Install"
runs-on: ubuntu-latest
container: i386/debian:stretch
container: i386/debian:buster
steps:
- uses: actions/checkout@v1
@ -679,7 +659,7 @@ jobs:
run: |
apt-get update
apt-get install -y git make cmake g++ libeigen3-dev python3-dev python3-pip
pip3 install "pytest==3.1.*"
pip3 install "pytest==6.*"
- name: Configure for install
run: >
@ -749,12 +729,10 @@ jobs:
fail-fast: false
matrix:
python:
- 3.5
- 3.6
- 3.7
- 3.8
- 3.9
- pypy-3.6
include:
- python: 3.9
@ -802,55 +780,6 @@ jobs:
- name: Python tests
run: cmake --build build -t pytest
win32-msvc2015:
name: "🐍 ${{ matrix.python }} • MSVC 2015 • x64"
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python:
- 2.7
- 3.6
- 3.7
# todo: check/cpptest does not support 3.8+ yet
steps:
- uses: actions/checkout@v2
- name: Setup 🐍 ${{ matrix.python }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Update CMake
uses: jwlawson/actions-setup-cmake@v1.12
- name: Prepare MSVC
uses: ilammy/msvc-dev-cmd@v1.10.0
with:
toolset: 14.0
- name: Prepare env
run: |
python -m pip install -r tests/requirements.txt
# First build - C++11 mode and inplace
- name: Configure
run: >
cmake -S . -B build
-G "Visual Studio 14 2015" -A x64
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
- name: Build C++14
run: cmake --build build -j 2
- name: Run all checks
run: cmake --build build -t check
win32-msvc2017:
name: "🐍 ${{ matrix.python }} • MSVC 2017 • x64"
runs-on: windows-2016
@ -858,17 +787,12 @@ jobs:
fail-fast: false
matrix:
python:
- 2.7
- 3.5
- 3.6
- 3.7
std:
- 14
include:
- python: 2.7
std: 17
args: >
-DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
- python: 3.7
std: 17
args: >
@ -906,6 +830,52 @@ jobs:
- name: Run all checks
run: cmake --build build -t check
windows-2022:
strategy:
fail-fast: false
matrix:
python:
- 3.9
name: "🐍 ${{ matrix.python }} • MSVC 2022 C++20 • x64"
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v2
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@v1.12
- name: Configure C++20
run: >
cmake -S . -B build
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=OFF
-DCMAKE_CXX_STANDARD=20
-DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
- 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
mingw:
name: "🐍 3 • windows-latest • ${{ matrix.sys }}"
runs-on: windows-latest
@ -940,7 +910,7 @@ jobs:
- 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 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build
- name: Build C++11
run: cmake --build build -j 2
@ -958,7 +928,7 @@ jobs:
run: git clean -fdx
- name: Configure C++14
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build2
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DDOWNLOAD_CATCH=O -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build2
- name: Build C++14
run: cmake --build build2 -j 2
@ -976,7 +946,7 @@ jobs:
run: git clean -fdx
- name: Configure C++17
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build3
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DDOWNLOAD_CATCH=O -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build3
- name: Build C++17
run: cmake --build build3 -j 2

View File

@ -1,5 +1,5 @@
--- ci.yml 2022-02-03 15:07:04.351781701 -0800
+++ ci_sh_def.yml 2022-02-03 15:08:50.314616526 -0800
--- ci.yml 2022-02-14 18:01:36.161619977 -0800
+++ ci_sh_def.yml 2022-02-14 18:02:00.307267865 -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:
@@ -108,6 +120,7 @@
@@ -104,6 +116,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=11
@ -35,7 +35,7 @@
${{ matrix.args }}
- name: Build C++11
@@ -135,6 +148,7 @@
@@ -131,6 +144,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
@ -43,7 +43,7 @@
${{ matrix.args }}
- name: Build
@@ -156,6 +170,7 @@
@@ -152,6 +166,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 }}
@@ -259,6 +274,7 @@
@@ -239,6 +254,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
@ -59,7 +59,7 @@
- name: Build
run: cmake --build build -j 2
@@ -313,6 +329,7 @@
@@ -293,6 +309,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
@@ -342,7 +359,8 @@
@@ -322,7 +339,8 @@
run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy
- name: Configure
@ -77,7 +77,7 @@
- name: Build
run: cmake --build build -j2 --verbose
@@ -422,7 +440,7 @@
@@ -402,7 +420,7 @@
cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \
-DCMAKE_CXX_STANDARD=11 \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \
@ -86,7 +86,7 @@
-DPYBIND11_TEST_FILTER="test_smart_ptr.cpp;test_virtual_functions.cpp"
# Building before installing Pip should produce a warning but not an error
@@ -481,6 +499,7 @@
@@ -461,6 +479,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
@ -94,7 +94,7 @@
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
- name: Build
@@ -536,6 +555,7 @@
@@ -516,6 +535,7 @@
-DDOWNLOAD_CATCH=ON \
-DDOWNLOAD_EIGEN=OFF \
-DCMAKE_CXX_STANDARD=11 \
@ -102,7 +102,7 @@
-DCMAKE_CXX_COMPILER=$(which icpc) \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
@@ -568,6 +588,7 @@
@@ -548,6 +568,7 @@
-DDOWNLOAD_CATCH=ON \
-DDOWNLOAD_EIGEN=OFF \
-DCMAKE_CXX_STANDARD=17 \
@ -110,7 +110,7 @@
-DCMAKE_CXX_COMPILER=$(which icpc) \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
@@ -629,6 +650,7 @@
@@ -609,6 +630,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=11
@ -118,7 +118,7 @@
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
- name: Build
@@ -679,6 +701,7 @@
@@ -659,6 +681,7 @@
cmake ../pybind11-tests
-DDOWNLOAD_CATCH=ON
-DPYBIND11_WERROR=ON
@ -126,7 +126,7 @@
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
working-directory: /build-tests
@@ -771,6 +794,7 @@
@@ -749,6 +772,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
@ -134,20 +134,7 @@
${{ matrix.args }}
- name: Build C++11
run: cmake --build build -j 2
@@ -818,6 +842,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
- name: Build C++14
run: cmake --build build -j 2
@@ -843,11 +868,11 @@
- python: 2.7
std: 17
args: >
- -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR"
+ -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
@@ -772,7 +796,7 @@
- python: 3.7
std: 17
args: >
@ -156,30 +143,38 @@
steps:
- uses: actions/checkout@v2
@@ -915,7 +940,7 @@
@@ -838,6 +862,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=OFF
-DCMAKE_CXX_STANDARD=20
+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
- name: Build C++20
run: cmake --build build -j 2
@@ -885,7 +910,7 @@
- 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 -S . -B build
+ run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build
- run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DDOWNLOAD_CATCH=ON -S . -B build
+ run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build
- name: Build C++11
run: cmake --build build -j 2
@@ -933,7 +958,7 @@
@@ -903,7 +928,7 @@
run: git clean -fdx
- name: Configure C++14
- run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -S . -B build2
+ run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build2
- run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DDOWNLOAD_CATCH=ON -S . -B build2
+ run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DDOWNLOAD_CATCH=O -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build2
- name: Build C++14
run: cmake --build build2 -j 2
@@ -951,7 +976,7 @@
@@ -921,7 +946,7 @@
run: git clean -fdx
- name: Configure C++17
- run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -S . -B build3
+ run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build3
- run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DDOWNLOAD_CATCH=ON -S . -B build3
+ run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DDOWNLOAD_CATCH=O -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build3
- name: Build C++17
run: cmake --build build3 -j 2