39
39
# - 'pypy-3.8'
40
40
# - 'pypy-3.9'
41
41
# - 'pypy-3.10'
42
+ numpy_version :
43
+ - ' 1.x'
44
+ - ' 2.x'
42
45
43
46
# Items in here will either be added to the build matrix (if not
44
47
# present), or add new keys to an existing matrix element if all the
66
69
# - runs-on: windows-2019
67
70
# python: '2.7'
68
71
69
- name : " 🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}"
72
+ name : " 🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 • NumPy ${{ matrix.numpy_version }} • ${{ matrix.args }}"
70
73
runs-on : ${{ matrix.runs-on }}
71
74
72
75
steps :
@@ -104,6 +107,10 @@ jobs:
104
107
run : |
105
108
python -m pip install -r tests/requirements.txt
106
109
110
+ - name : Install NumPy >= 2
111
+ if : matrix.numpy_version == '2.x'
112
+ run : pip install 'numpy>=2.0.0b1' 'scipy>=1.13.0rc1'
113
+
107
114
- name : Setup annotations on Linux
108
115
if : runner.os == 'Linux'
109
116
run : python -m pip install pytest-github-actions-annotate-failures
@@ -117,7 +124,7 @@ jobs:
117
124
-DPYBIND11_WERROR=ON
118
125
-DPYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION=ON
119
126
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON
120
- -DPYBIND11_NUMPY_1_ONLY=ON
127
+ -DPYBIND11_NUMPY_1_ONLY=${{ matrix.numpy_version == '1.x' && 'ON' || 'OFF' }}
121
128
-DDOWNLOAD_CATCH=ON
122
129
-DDOWNLOAD_EIGEN=ON
123
130
-DCMAKE_CXX_STANDARD=11
@@ -148,7 +155,7 @@ jobs:
148
155
cmake -S . -B build2
149
156
-DPYBIND11_WERROR=ON
150
157
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
151
- -DPYBIND11_NUMPY_1_ONLY=ON
158
+ -DPYBIND11_NUMPY_1_ONLY=${{ matrix.numpy_version == '1.x' && 'ON' || 'OFF' }}
152
159
-DDOWNLOAD_CATCH=ON
153
160
-DDOWNLOAD_EIGEN=ON
154
161
-DCMAKE_CXX_STANDARD=17
@@ -170,6 +177,7 @@ jobs:
170
177
run : >
171
178
cmake -S . -B build3
172
179
-DPYBIND11_WERROR=ON
180
+ -DPYBIND11_NUMPY_1_ONLY=${{ matrix.numpy_version == '1.x' && 'ON' || 'OFF' }}
173
181
-DDOWNLOAD_CATCH=ON
174
182
-DDOWNLOAD_EIGEN=ON
175
183
-DCMAKE_CXX_STANDARD=17
0 commit comments