@@ -343,8 +343,16 @@ jobs:
343343 steps :
344344 - uses : actions/checkout@v4
345345
346- - name : Add wget and python3
347- run : apt-get update && apt-get install -y python3-dev python3-numpy python3-pytest libeigen3-dev
346+ - name : Add python3
347+ run : apt-get update && apt-get install -y python3-dev libeigen3-dev
348+
349+ - name : Install uv
350+ uses : astral-sh/setup-uv@v6
351+ with :
352+ enable-cache : true
353+
354+ - name : Prepare env
355+ run : uv pip install --python=python3 --system -r tests/requirements.txt
348356
349357 - name : Configure
350358 shell : bash
@@ -380,7 +388,15 @@ jobs:
380388
381389 # tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND
382390 - name : Install 🐍 3
383- run : apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy
391+ run : apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev
392+
393+ - name : Install uv
394+ uses : astral-sh/setup-uv@v6
395+ with :
396+ enable-cache : true
397+
398+ - name : Prepare env
399+ run : uv pip install --python=python3 --system -r tests/requirements.txt
384400
385401 - name : Configure
386402 run : cmake -S . -B build -DPYBIND11_CUDA_TESTS=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON
@@ -455,11 +471,11 @@ jobs:
455471 - name : Install 🐍 3 & NVHPC
456472 run : |
457473 sudo apt-get update -y && \
458- sudo apt-get install -y cmake environment-modules git python3-dev python3-pip python3-numpy && \
474+ sudo apt-get install -y cmake environment-modules git python3-dev python3-pip && \
459475 sudo apt-get install -y --no-install-recommends nvhpc-23-5 && \
460476 sudo rm -rf /var/lib/apt/lists/*
461477 python3 -m pip install --upgrade pip
462- python3 -m pip install --upgrade pytest
478+ python3 -m pip install --system -r tests/requirements.txt
463479
464480 # On some systems, you many need further workarounds:
465481 # https://github.com/pybind/pybind11/pull/2475
@@ -506,10 +522,15 @@ jobs:
506522 - uses : actions/checkout@v4
507523
508524 - name : Add Python 3
509- run : apt-get update; apt-get install -y python3-dev python3-numpy python3-pytest python3-pip libeigen3-dev
525+ run : apt-get update; apt-get install -y python3-dev libeigen3-dev
510526
511- - name : Update pip
512- run : python3 -m pip install --upgrade pip
527+ - name : Install uv
528+ uses : astral-sh/setup-uv@v6
529+ with :
530+ enable-cache : true
531+
532+ - name : Prepare env
533+ run : uv pip install --python=python3 --system -r tests/requirements.txt
513534
514535 - name : Update CMake
515536 uses : jwlawson/actions-setup-cmake@v2.0
@@ -724,7 +745,7 @@ jobs:
724745 run : |
725746 apt-get update
726747 apt-get install -y git make cmake g++ libeigen3-dev python3-dev python3-pip
727- pip3 install "pytest==6.*"
748+ pip3 install -r tests/requirements.txt
728749
729750 - name : Configure for install
730751 run : >
@@ -977,7 +998,6 @@ jobs:
977998 mingw-w64-${{matrix.env}}-python-pip
978999 mingw-w64-${{matrix.env}}-cmake
9791000 mingw-w64-${{matrix.env}}-make
980- mingw-w64-${{matrix.env}}-python-pytest
9811001 mingw-w64-${{matrix.env}}-boost
9821002 mingw-w64-${{matrix.env}}-catch
9831003
@@ -986,12 +1006,19 @@ jobs:
9861006 with :
9871007 msystem : ${{matrix.sys}}
9881008 install : >-
989- mingw-w64-${{matrix.env}}-python-numpy
990- mingw-w64-${{matrix.env}}-python-scipy
9911009 mingw-w64-${{matrix.env}}-eigen3
9921010
9931011 - uses : actions/checkout@v4
9941012
1013+ - name : Install uv
1014+ uses : astral-sh/setup-uv@v6
1015+ with :
1016+ enable-cache : true
1017+
1018+ - name : Prepare env
1019+ run : uv pip install --python=python --system -r tests/requirements.txt
1020+
1021+
9951022 - name : Configure C++11
9961023 # LTO leads to many undefined reference like
9971024 # `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&)
0 commit comments