@@ -220,9 +220,8 @@ jobs:
220220 id : pip-cache
221221 uses : actions/cache@v4
222222 with :
223- path : |
224- ${{ env.PIP_CACHE_DIR }}
225- key : pip-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}${{ matrix.python-abiflags }}-${{ hashFiles('pyproject.toml', '**/requirements.txt') }}
223+ path : ${{ env.PIP_CACHE_DIR }}
224+ key : pip-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}${{ matrix.python-abiflags }}-${{ hashFiles('pyproject.toml', 'requirements*.txt', '*/requirements*.txt') }}$
226225
227226 - name : Set up Environment
228227 shell : bash
@@ -250,8 +249,10 @@ jobs:
250249 "${PYTHON_EXE}" -m venv venv # PATH is already updated in step setup-pyenv
251250 echo "::group::Python executables"
252251 if [[ "${{ runner.os }}" != 'Windows' ]]; then
252+ source venv/bin/activate
253253 ls -alh venv/bin
254254 else
255+ source venv/Scripts/activate
255256 ls -alh venv/Scripts
256257 fi
257258 echo "::endgroup::"
@@ -316,6 +317,12 @@ jobs:
316317 github.event_name == 'pull_request' &&
317318 contains(github.event.pull_request.labels.*.name, 'test-with-nightly-pybind11')
318319 run : |
320+ if [[ "${{ runner.os }}" != 'Windows' ]]; then
321+ source venv/bin/activate
322+ else
323+ source venv/Scripts/activate
324+ fi
325+
319326 ${{ env.PYTHON }} .github/workflows/set_setup_requires.py
320327 echo "::group::pyproject.toml"
321328 cat pyproject.toml
@@ -324,16 +331,36 @@ jobs:
324331
325332 - name : Test buildable without Python frontend
326333 if : runner.os != 'Windows'
334+ shell : bash
327335 run : |
336+ if [[ "${{ runner.os }}" != 'Windows' ]]; then
337+ source venv/bin/activate
338+ else
339+ source venv/Scripts/activate
340+ fi
341+
328342 make cmake-build PYTHON="${{ env.PYTHON }}" && make clean
329343
330344 - name : Install OpTree
345+ shell : bash
331346 run : |
347+ if [[ "${{ runner.os }}" != 'Windows' ]]; then
348+ source venv/bin/activate
349+ else
350+ source venv/Scripts/activate
351+ fi
352+
332353 ${{ env.PYTHON }} -m pip install -v --editable '.[test]'
333354
334355 - name : Test with pytest
335356 shell : bash
336357 run : |
358+ if [[ "${{ runner.os }}" != 'Windows' ]]; then
359+ source venv/bin/activate
360+ else
361+ source venv/Scripts/activate
362+ fi
363+
337364 set -x
338365 ulimit -c unlimited
339366 ulimit -a
0 commit comments