@@ -122,33 +122,28 @@ jobs:
122122 if : runner.os == 'macOS'
123123 run : brew install boost
124124
125- - name : Update CMake
126- uses : jwlawson/actions-setup-cmake@v2.0
127-
128- - name : Cache wheels
129- if : runner.os == 'macOS'
130- uses : actions/cache@v4
125+ - name : Install uv
126+ uses : astral-sh/setup-uv@v5
131127 with :
132- # This path is specific to macOS - we really only need it for PyPy NumPy wheels
133- # See https://github.com/actions/cache/blob/master/examples.md#python---pip
134- # for ways to do this more generally
135- path : ~/Library/Caches/pip
136- # Look to see if there is a cache hit for the corresponding requirements file
137- key : ${{ runner.os }}-pip-${{ matrix.python }}-x64-${{ hashFiles('tests/requirements.txt') }}
128+ enable-cache : true
138129
139130 - name : Prepare env
140- run : |
141- python -m pip install -r tests/requirements.txt
131+ run : uv pip install --python=python --system -r tests/requirements.txt
142132
143133 - name : Setup annotations on Linux
144134 if : runner.os == 'Linux'
145- run : python -m pip install pytest-github-actions-annotate-failures
135+ run : uv pip install --python=python --system pytest-github-actions-annotate-failures
136+
137+ # TODO Resolve Windows Ninja shared object issue on Python 3.8+
138+ - name : Use Ninja except on Windows
139+ if : runner.os != 'Windows'
140+ run : echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"
146141
147142 # First build - C++11 mode and inplace
148143 # More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON here
149144 - name : Configure C++11 ${{ matrix.args }}
150145 run : >
151- cmake -S . -B .
146+ cmake -S. -B.
152147 -DPYBIND11_WERROR=ON
153148 -DPYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION=ON
154149 -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON
@@ -159,13 +154,13 @@ jobs:
159154 ${{ matrix.args }}
160155
161156 - name : Build C++11
162- run : cmake --build . -j 2
157+ run : cmake --build .
163158
164159 - name : Python tests C++11
165- run : cmake --build . --target pytest -j 2
160+ run : cmake --build . --target pytest
166161
167162 - name : C++11 tests
168- run : cmake --build . --target cpptest -j 2
163+ run : cmake --build . --target cpptest
169164
170165 - name : Interface test C++11
171166 run : cmake --build . --target test_cmake_build
@@ -177,7 +172,7 @@ jobs:
177172 # More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF here.
178173 - name : Configure C++17
179174 run : >
180- cmake -S . -B build2 -Werror=dev
175+ cmake -S. -Bbuild2 -Werror=dev
181176 -DPYBIND11_WERROR=ON
182177 -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
183178 -DPYBIND11_PYTEST_ARGS=-v
@@ -187,7 +182,7 @@ jobs:
187182 ${{ matrix.args }}
188183
189184 - name : Build
190- run : cmake --build build2 -j 2
185+ run : cmake --build build2
191186
192187 - name : Python tests
193188 run : cmake --build build2 --target pytest
@@ -202,7 +197,7 @@ jobs:
202197 # setuptools
203198 - name : Setuptools helpers test
204199 run : |
205- pip install setuptools
200+ uv pip install --python=python --system setuptools
206201 pytest tests/extra_setuptools
207202 if : " !(matrix.runs-on == 'windows-2022')"
208203
@@ -913,10 +908,7 @@ jobs:
913908 python-version : ${{ matrix.python }}
914909
915910 - name : Prepare env
916- # Ensure use of NumPy 2 (via NumPy nightlies but can be changed soon)
917- run : |
918- python3 -m pip install -r tests/requirements.txt
919- python3 -m pip install 'numpy>=2.0.0b1' 'scipy>=1.13.0rc1'
911+ run : python3 -m pip install -r tests/requirements.txt
920912
921913 - name : Update CMake
922914 uses : jwlawson/actions-setup-cmake@v2.0
0 commit comments