Skip to content

Commit 5820767

Browse files
committed
Tracking ci.yml changes from master.
Also disabling `-D_=1` (breaks smart_holder_poc_test.cpp).
1 parent e1751c0 commit 5820767

File tree

3 files changed

+81
-116
lines changed

3 files changed

+81
-116
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
python: '3.6'
4646
args: >
4747
-DPYBIND11_FINDPYTHON=ON
48-
-DCMAKE_CXX_FLAGS="-D_=1"
48+
# BREAKS -DCMAKE_CXX_FLAGS="-D_=1"
4949
- runs-on: windows-latest
5050
python: '3.6'
5151
args: >

.github/workflows/ci_sh_def.yml

Lines changed: 47 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ concurrency:
2828

2929
env:
3030
PIP_ONLY_BINARY: numpy
31+
FORCE_COLOR: 3
32+
PYTEST_TIMEOUT: 300
3133

3234
jobs:
3335
# This is the "main" test suite, which tests a large number of different
@@ -38,8 +40,6 @@ jobs:
3840
matrix:
3941
runs-on: [ubuntu-latest, windows-2022, macos-latest]
4042
python:
41-
- '2.7'
42-
- '3.5'
4343
- '3.6'
4444
- '3.9'
4545
- '3.10'
@@ -57,18 +57,14 @@ jobs:
5757
python: '3.6'
5858
args: >
5959
-DPYBIND11_FINDPYTHON=ON
60-
-DCMAKE_CXX_FLAGS="-D_=1"
60+
# BREAKS -DCMAKE_CXX_FLAGS="-D_=1"
6161
- runs-on: windows-latest
6262
python: '3.6'
6363
args: >
6464
-DPYBIND11_FINDPYTHON=ON
65-
- runs-on: macos-latest
66-
python: 'pypy-2.7'
6765
# Inject a couple Windows 2019 runs
6866
- runs-on: windows-2019
6967
python: '3.9'
70-
- runs-on: windows-2019
71-
python: '2.7'
7268

7369
name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}"
7470
runs-on: ${{ matrix.runs-on }}
@@ -184,27 +180,11 @@ jobs:
184180
- name: Interface test
185181
run: cmake --build build2 --target test_cmake_build
186182

187-
# Eventually Microsoft might have an action for setting up
188-
# MSVC, but for now, this action works:
189-
- name: Prepare compiler environment for Windows 🐍 2.7
190-
if: matrix.python == 2.7 && runner.os == 'Windows'
191-
uses: ilammy/msvc-dev-cmd@v1.10.0
192-
with:
193-
arch: x64
194-
195-
# This makes two environment variables available in the following step(s)
196-
- name: Set Windows 🐍 2.7 environment variables
197-
if: matrix.python == 2.7 && runner.os == 'Windows'
198-
shell: bash
199-
run: |
200-
echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
201-
echo "MSSdk=1" >> $GITHUB_ENV
202-
203183
# This makes sure the setup_helpers module can build packages using
204184
# setuptools
205185
- name: Setuptools helpers test
206186
run: pytest tests/extra_setuptools
207-
if: "!(matrix.python == '3.5' && matrix.runs-on == 'windows-2022')"
187+
if: "!(matrix.runs-on == 'windows-2022')"
208188

209189

210190
deadsnakes:
@@ -668,9 +648,9 @@ jobs:
668648

669649
# This tests an "install" with the CMake tools
670650
install-classic:
671-
name: "🐍 3.5 • Debian • x86 • Install"
651+
name: "🐍 3.7 • Debian • x86 • Install"
672652
runs-on: ubuntu-latest
673-
container: i386/debian:stretch
653+
container: i386/debian:buster
674654

675655
steps:
676656
- uses: actions/checkout@v1
@@ -679,7 +659,7 @@ jobs:
679659
run: |
680660
apt-get update
681661
apt-get install -y git make cmake g++ libeigen3-dev python3-dev python3-pip
682-
pip3 install "pytest==3.1.*"
662+
pip3 install "pytest==6.*"
683663
684664
- name: Configure for install
685665
run: >
@@ -749,12 +729,10 @@ jobs:
749729
fail-fast: false
750730
matrix:
751731
python:
752-
- 3.5
753732
- 3.6
754733
- 3.7
755734
- 3.8
756735
- 3.9
757-
- pypy-3.6
758736

759737
include:
760738
- python: 3.9
@@ -802,17 +780,23 @@ jobs:
802780
- name: Python tests
803781
run: cmake --build build -t pytest
804782

805-
win32-msvc2015:
806-
name: "🐍 ${{ matrix.python }} • MSVC 2015 • x64"
807-
runs-on: windows-latest
783+
win32-msvc2017:
784+
name: "🐍 ${{ matrix.python }} • MSVC 2017 • x64"
785+
runs-on: windows-2016
808786
strategy:
809787
fail-fast: false
810788
matrix:
811789
python:
812-
- 2.7
813790
- 3.6
814791
- 3.7
815-
# todo: check/cpptest does not support 3.8+ yet
792+
std:
793+
- 14
794+
795+
include:
796+
- python: 3.7
797+
std: 17
798+
args: >
799+
-DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
816800
817801
steps:
818802
- uses: actions/checkout@v2
@@ -825,11 +809,6 @@ jobs:
825809
- name: Update CMake
826810
uses: jwlawson/actions-setup-cmake@v1.12
827811

828-
- name: Prepare MSVC
829-
uses: ilammy/msvc-dev-cmd@v1.10.0
830-
with:
831-
toolset: 14.0
832-
833812
- name: Prepare env
834813
run: |
835814
python -m pip install -r tests/requirements.txt
@@ -838,73 +817,64 @@ jobs:
838817
- name: Configure
839818
run: >
840819
cmake -S . -B build
841-
-G "Visual Studio 14 2015" -A x64
820+
-G "Visual Studio 15 2017" -A x64
842821
-DPYBIND11_WERROR=ON
843822
-DDOWNLOAD_CATCH=ON
844823
-DDOWNLOAD_EIGEN=ON
845-
-DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
824+
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
825+
${{ matrix.args }}
846826
847-
- name: Build C++14
827+
- name: Build ${{ matrix.std }}
848828
run: cmake --build build -j 2
849829

850830
- name: Run all checks
851831
run: cmake --build build -t check
852832

853-
854-
win32-msvc2017:
855-
name: "🐍 ${{ matrix.python }} • MSVC 2017 • x64"
856-
runs-on: windows-2016
833+
windows-2022:
857834
strategy:
858835
fail-fast: false
859836
matrix:
860837
python:
861-
- 2.7
862-
- 3.5
863-
- 3.7
864-
std:
865-
- 14
838+
- 3.9
866839

867-
include:
868-
- python: 2.7
869-
std: 17
870-
args: >
871-
-DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
872-
- python: 3.7
873-
std: 17
874-
args: >
875-
-DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
840+
name: "🐍 ${{ matrix.python }} • MSVC 2022 C++20 • x64"
841+
runs-on: windows-2022
876842

877843
steps:
878844
- uses: actions/checkout@v2
879845

880-
- name: Setup 🐍 ${{ matrix.python }}
846+
- name: Setup Python ${{ matrix.python }}
881847
uses: actions/setup-python@v2
882848
with:
883849
python-version: ${{ matrix.python }}
884850

885-
- name: Update CMake
886-
uses: jwlawson/actions-setup-cmake@v1.12
887-
888851
- name: Prepare env
889852
run: |
890-
python -m pip install -r tests/requirements.txt
853+
python3 -m pip install -r tests/requirements.txt
891854
892-
# First build - C++11 mode and inplace
893-
- name: Configure
855+
- name: Update CMake
856+
uses: jwlawson/actions-setup-cmake@v1.12
857+
858+
- name: Configure C++20
894859
run: >
895860
cmake -S . -B build
896-
-G "Visual Studio 15 2017" -A x64
897861
-DPYBIND11_WERROR=ON
898862
-DDOWNLOAD_CATCH=ON
899-
-DDOWNLOAD_EIGEN=ON
900-
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
901-
${{ matrix.args }}
863+
-DDOWNLOAD_EIGEN=OFF
864+
-DCMAKE_CXX_STANDARD=20
865+
-DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
902866
903-
- name: Build ${{ matrix.std }}
867+
- name: Build C++20
904868
run: cmake --build build -j 2
905869

906-
- name: Run all checks
907-
run: cmake --build build -t check
870+
- name: Python tests
871+
run: cmake --build build --target pytest
872+
873+
- name: C++20 tests
874+
run: cmake --build build --target cpptest -j 2
875+
876+
- name: Interface test C++20
877+
run: cmake --build build --target test_cmake_build
908878

909879
mingw:
910880
name: "🐍 3 • windows-latest • ${{ matrix.sys }}"
@@ -940,7 +910,7 @@ jobs:
940910
- name: Configure C++11
941911
# LTO leads to many undefined reference like
942912
# `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&)
943-
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build
913+
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build
944914

945915
- name: Build C++11
946916
run: cmake --build build -j 2
@@ -958,7 +928,7 @@ jobs:
958928
run: git clean -fdx
959929

960930
- name: Configure C++14
961-
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build2
931+
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DDOWNLOAD_CATCH=O -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build2
962932

963933
- name: Build C++14
964934
run: cmake --build build2 -j 2
@@ -976,7 +946,7 @@ jobs:
976946
run: git clean -fdx
977947

978948
- name: Configure C++17
979-
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build3
949+
run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DDOWNLOAD_CATCH=O -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build3
980950

981951
- name: Build C++17
982952
run: cmake --build build3 -j 2

0 commit comments

Comments
 (0)