@@ -28,6 +28,8 @@ concurrency:
28
28
29
29
env :
30
30
PIP_ONLY_BINARY : numpy
31
+ FORCE_COLOR : 3
32
+ PYTEST_TIMEOUT : 300
31
33
32
34
jobs :
33
35
# This is the "main" test suite, which tests a large number of different
38
40
matrix :
39
41
runs-on : [ubuntu-latest, windows-2022, macos-latest]
40
42
python :
41
- - ' 2.7'
42
- - ' 3.5'
43
43
- ' 3.6'
44
44
- ' 3.9'
45
45
- ' 3.10'
@@ -57,18 +57,14 @@ jobs:
57
57
python : ' 3.6'
58
58
args : >
59
59
-DPYBIND11_FINDPYTHON=ON
60
- -DCMAKE_CXX_FLAGS="-D_=1"
60
+ # BREAKS -DCMAKE_CXX_FLAGS="-D_=1"
61
61
- runs-on : windows-latest
62
62
python : ' 3.6'
63
63
args : >
64
64
-DPYBIND11_FINDPYTHON=ON
65
- - runs-on : macos-latest
66
- python : ' pypy-2.7'
67
65
# Inject a couple Windows 2019 runs
68
66
- runs-on : windows-2019
69
67
python : ' 3.9'
70
- - runs-on : windows-2019
71
- python : ' 2.7'
72
68
73
69
name : " 🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}"
74
70
runs-on : ${{ matrix.runs-on }}
@@ -184,27 +180,11 @@ jobs:
184
180
- name : Interface test
185
181
run : cmake --build build2 --target test_cmake_build
186
182
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
-
203
183
# This makes sure the setup_helpers module can build packages using
204
184
# setuptools
205
185
- name : Setuptools helpers test
206
186
run : pytest tests/extra_setuptools
207
- if : " !(matrix.python == '3.5' && matrix. runs-on == 'windows-2022')"
187
+ if : " !(matrix.runs-on == 'windows-2022')"
208
188
209
189
210
190
deadsnakes :
@@ -668,9 +648,9 @@ jobs:
668
648
669
649
# This tests an "install" with the CMake tools
670
650
install-classic :
671
- name : " 🐍 3.5 • Debian • x86 • Install"
651
+ name : " 🐍 3.7 • Debian • x86 • Install"
672
652
runs-on : ubuntu-latest
673
- container : i386/debian:stretch
653
+ container : i386/debian:buster
674
654
675
655
steps :
676
656
- uses : actions/checkout@v1
@@ -679,7 +659,7 @@ jobs:
679
659
run : |
680
660
apt-get update
681
661
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 .*"
683
663
684
664
- name : Configure for install
685
665
run : >
@@ -749,12 +729,10 @@ jobs:
749
729
fail-fast : false
750
730
matrix :
751
731
python :
752
- - 3.5
753
732
- 3.6
754
733
- 3.7
755
734
- 3.8
756
735
- 3.9
757
- - pypy-3.6
758
736
759
737
include :
760
738
- python : 3.9
@@ -802,17 +780,23 @@ jobs:
802
780
- name : Python tests
803
781
run : cmake --build build -t pytest
804
782
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
808
786
strategy :
809
787
fail-fast : false
810
788
matrix :
811
789
python :
812
- - 2.7
813
790
- 3.6
814
791
- 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"
816
800
817
801
steps :
818
802
- uses : actions/checkout@v2
@@ -825,11 +809,6 @@ jobs:
825
809
- name : Update CMake
826
810
uses : jwlawson/actions-setup-cmake@v1.12
827
811
828
- - name : Prepare MSVC
829
- uses : ilammy/msvc-dev-cmd@v1.10.0
830
- with :
831
- toolset : 14.0
832
-
833
812
- name : Prepare env
834
813
run : |
835
814
python -m pip install -r tests/requirements.txt
@@ -838,73 +817,64 @@ jobs:
838
817
- name : Configure
839
818
run : >
840
819
cmake -S . -B build
841
- -G "Visual Studio 14 2015 " -A x64
820
+ -G "Visual Studio 15 2017 " -A x64
842
821
-DPYBIND11_WERROR=ON
843
822
-DDOWNLOAD_CATCH=ON
844
823
-DDOWNLOAD_EIGEN=ON
845
- -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
824
+ -DCMAKE_CXX_STANDARD=${{ matrix.std }}
825
+ ${{ matrix.args }}
846
826
847
- - name : Build C++14
827
+ - name : Build ${{ matrix.std }}
848
828
run : cmake --build build -j 2
849
829
850
830
- name : Run all checks
851
831
run : cmake --build build -t check
852
832
853
-
854
- win32-msvc2017 :
855
- name : " 🐍 ${{ matrix.python }} • MSVC 2017 • x64"
856
- runs-on : windows-2016
833
+ windows-2022 :
857
834
strategy :
858
835
fail-fast : false
859
836
matrix :
860
837
python :
861
- - 2.7
862
- - 3.5
863
- - 3.7
864
- std :
865
- - 14
838
+ - 3.9
866
839
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
876
842
877
843
steps :
878
844
- uses : actions/checkout@v2
879
845
880
- - name : Setup 🐍 ${{ matrix.python }}
846
+ - name : Setup Python ${{ matrix.python }}
881
847
uses : actions/setup-python@v2
882
848
with :
883
849
python-version : ${{ matrix.python }}
884
850
885
- - name : Update CMake
886
- uses : jwlawson/actions-setup-cmake@v1.12
887
-
888
851
- name : Prepare env
889
852
run : |
890
- python -m pip install -r tests/requirements.txt
853
+ python3 -m pip install -r tests/requirements.txt
891
854
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
894
859
run : >
895
860
cmake -S . -B build
896
- -G "Visual Studio 15 2017" -A x64
897
861
-DPYBIND11_WERROR=ON
898
862
-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"
902
866
903
- - name : Build ${{ matrix.std }}
867
+ - name : Build C++20
904
868
run : cmake --build build -j 2
905
869
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
908
878
909
879
mingw :
910
880
name : " 🐍 3 • windows-latest • ${{ matrix.sys }}"
@@ -940,7 +910,7 @@ jobs:
940
910
- name : Configure C++11
941
911
# LTO leads to many undefined reference like
942
912
# `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
944
914
945
915
- name : Build C++11
946
916
run : cmake --build build -j 2
@@ -958,7 +928,7 @@ jobs:
958
928
run : git clean -fdx
959
929
960
930
- 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
962
932
963
933
- name : Build C++14
964
934
run : cmake --build build2 -j 2
@@ -976,7 +946,7 @@ jobs:
976
946
run : git clean -fdx
977
947
978
948
- 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
980
950
981
951
- name : Build C++17
982
952
run : cmake --build build3 -j 2
0 commit comments