@@ -16,6 +16,8 @@ concurrency:
1616
1717env :
1818 PIP_ONLY_BINARY : numpy
19+ FORCE_COLOR : 3
20+ PYTEST_TIMEOUT : 300
1921
2022jobs :
2123 # This is the "main" test suite, which tests a large number of different
2628 matrix :
2729 runs-on : [ubuntu-latest, windows-2022, macos-latest]
2830 python :
29- - ' 2.7'
30- - ' 3.5'
3131 - ' 3.6'
3232 - ' 3.9'
3333 - ' 3.10'
5050 python : ' 3.6'
5151 args : >
5252 -DPYBIND11_FINDPYTHON=ON
53- - runs-on : macos-latest
54- python : ' pypy-2.7'
5553 # Inject a couple Windows 2019 runs
5654 - runs-on : windows-2019
5755 python : ' 3.9'
58- - runs-on : windows-2019
59- python : ' 2.7'
6056
6157 name : " 🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}"
6258 runs-on : ${{ matrix.runs-on }}
@@ -169,27 +165,11 @@ jobs:
169165 - name : Interface test
170166 run : cmake --build build2 --target test_cmake_build
171167
172- # Eventually Microsoft might have an action for setting up
173- # MSVC, but for now, this action works:
174- - name : Prepare compiler environment for Windows 🐍 2.7
175- if : matrix.python == 2.7 && runner.os == 'Windows'
176- 177- with :
178- arch : x64
179-
180- # This makes two environment variables available in the following step(s)
181- - name : Set Windows 🐍 2.7 environment variables
182- if : matrix.python == 2.7 && runner.os == 'Windows'
183- shell : bash
184- run : |
185- echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
186- echo "MSSdk=1" >> $GITHUB_ENV
187-
188168 # This makes sure the setup_helpers module can build packages using
189169 # setuptools
190170 - name : Setuptools helpers test
191171 run : pytest tests/extra_setuptools
192- if : " !(matrix.python == '3.5' && matrix. runs-on == 'windows-2022')"
172+ if : " !(matrix.runs-on == 'windows-2022')"
193173
194174
195175 deadsnakes :
@@ -646,9 +626,9 @@ jobs:
646626
647627 # This tests an "install" with the CMake tools
648628 install-classic :
649- name : " 🐍 3.5 • Debian • x86 • Install"
629+ name : " 🐍 3.7 • Debian • x86 • Install"
650630 runs-on : ubuntu-latest
651- container : i386/debian:stretch
631+ container : i386/debian:buster
652632
653633 steps :
654634 - uses : actions/checkout@v1
@@ -657,7 +637,7 @@ jobs:
657637 run : |
658638 apt-get update
659639 apt-get install -y git make cmake g++ libeigen3-dev python3-dev python3-pip
660- pip3 install "pytest==3.1 .*"
640+ pip3 install "pytest==6 .*"
661641
662642 - name : Configure for install
663643 run : >
@@ -726,12 +706,10 @@ jobs:
726706 fail-fast : false
727707 matrix :
728708 python :
729- - 3.5
730709 - 3.6
731710 - 3.7
732711 - 3.8
733712 - 3.9
734- - pypy-3.6
735713
736714 include :
737715 - python : 3.9
@@ -778,17 +756,23 @@ jobs:
778756 - name : Python tests
779757 run : cmake --build build -t pytest
780758
781- win32-msvc2015 :
782- name : " 🐍 ${{ matrix.python }} • MSVC 2015 • x64"
783- runs-on : windows-latest
759+ win32-msvc2017 :
760+ name : " 🐍 ${{ matrix.python }} • MSVC 2017 • x64"
761+ runs-on : windows-2016
784762 strategy :
785763 fail-fast : false
786764 matrix :
787765 python :
788- - 2.7
789766 - 3.6
790767 - 3.7
791- # todo: check/cpptest does not support 3.8+ yet
768+ std :
769+ - 14
770+
771+ include :
772+ - python : 3.7
773+ std : 17
774+ args : >
775+ -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR"
792776
793777 steps :
794778 - uses : actions/checkout@v2
@@ -801,11 +785,6 @@ jobs:
801785 - name : Update CMake
802786803787
804- - name : Prepare MSVC
805- 806- with :
807- toolset : 14.0
808-
809788 - name : Prepare env
810789 run : |
811790 python -m pip install -r tests/requirements.txt
@@ -814,72 +793,63 @@ jobs:
814793 - name : Configure
815794 run : >
816795 cmake -S . -B build
817- -G "Visual Studio 14 2015 " -A x64
796+ -G "Visual Studio 15 2017 " -A x64
818797 -DPYBIND11_WERROR=ON
819798 -DDOWNLOAD_CATCH=ON
820799 -DDOWNLOAD_EIGEN=ON
800+ -DCMAKE_CXX_STANDARD=${{ matrix.std }}
801+ ${{ matrix.args }}
821802
822- - name : Build C++14
803+ - name : Build ${{ matrix.std }}
823804 run : cmake --build build -j 2
824805
825806 - name : Run all checks
826807 run : cmake --build build -t check
827808
828-
829- win32-msvc2017 :
830- name : " 🐍 ${{ matrix.python }} • MSVC 2017 • x64"
831- runs-on : windows-2016
809+ windows-2022 :
832810 strategy :
833811 fail-fast : false
834812 matrix :
835813 python :
836- - 2.7
837- - 3.5
838- - 3.7
839- std :
840- - 14
814+ - 3.9
841815
842- include :
843- - python : 2.7
844- std : 17
845- args : >
846- -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR"
847- - python : 3.7
848- std : 17
849- args : >
850- -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR"
816+ name : " 🐍 ${{ matrix.python }} • MSVC 2022 C++20 • x64"
817+ runs-on : windows-2022
851818
852819 steps :
853820 - uses : actions/checkout@v2
854821
855- - name : Setup 🐍 ${{ matrix.python }}
822+ - name : Setup Python ${{ matrix.python }}
856823 uses : actions/setup-python@v2
857824 with :
858825 python-version : ${{ matrix.python }}
859826
860- - name : Update CMake
861- 862-
863827 - name : Prepare env
864828 run : |
865- python -m pip install -r tests/requirements.txt
829+ python3 -m pip install -r tests/requirements.txt
866830
867- # First build - C++11 mode and inplace
868- - name : Configure
831+ - name : Update CMake
832+ 833+
834+ - name : Configure C++20
869835 run : >
870836 cmake -S . -B build
871- -G "Visual Studio 15 2017" -A x64
872837 -DPYBIND11_WERROR=ON
873838 -DDOWNLOAD_CATCH=ON
874- -DDOWNLOAD_EIGEN=ON
875- -DCMAKE_CXX_STANDARD=${{ matrix.std }}
876- ${{ matrix.args }}
839+ -DDOWNLOAD_EIGEN=OFF
840+ -DCMAKE_CXX_STANDARD=20
877841
878- - name : Build ${{ matrix.std }}
842+ - name : Build C++20
879843 run : cmake --build build -j 2
880844
881- - name : Run all checks
882- run : cmake --build build -t check
845+ - name : Python tests
846+ run : cmake --build build --target pytest
847+
848+ - name : C++20 tests
849+ run : cmake --build build --target cpptest -j 2
850+
851+ - name : Interface test C++20
852+ run : cmake --build build --target test_cmake_build
883853
884854 mingw :
885855 name : " 🐍 3 • windows-latest • ${{ matrix.sys }}"
@@ -915,7 +885,7 @@ jobs:
915885 - name : Configure C++11
916886 # LTO leads to many undefined reference like
917887 # `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&)
918- run : cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -S . -B build
888+ run : cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DDOWNLOAD_CATCH=ON - S . -B build
919889
920890 - name : Build C++11
921891 run : cmake --build build -j 2
@@ -933,7 +903,7 @@ jobs:
933903 run : git clean -fdx
934904
935905 - name : Configure C++14
936- run : cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -S . -B build2
906+ run : cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DDOWNLOAD_CATCH=ON - S . -B build2
937907
938908 - name : Build C++14
939909 run : cmake --build build2 -j 2
@@ -951,7 +921,7 @@ jobs:
951921 run : git clean -fdx
952922
953923 - name : Configure C++17
954- run : cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -S . -B build3
924+ run : cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DDOWNLOAD_CATCH=ON - S . -B build3
955925
956926 - name : Build C++17
957927 run : cmake --build build3 -j 2
0 commit comments