diff --git a/.github/workflows/http3-linux.yml b/.github/workflows/http3-linux.yml index 12e3fa18e7f5..8949dea59275 100644 --- a/.github/workflows/http3-linux.yml +++ b/.github/workflows/http3-linux.yml @@ -328,6 +328,7 @@ jobs: libtasn1-6-dev libidn2-0-dev gawk gperf libtss2-dev dns-root-data bison gtk-doc-tools \ texinfo texlive texlive-extra-utils autopoint libev-dev \ apache2 apache2-dev libnghttp2-dev vsftpd + python3 -m venv $HOME/venv echo 'CC=gcc-12' >> $GITHUB_ENV echo 'CXX=g++-12' >> $GITHUB_ENV name: 'install prereqs' @@ -501,12 +502,14 @@ jobs: - name: 'install test prereqs' run: | - sudo python3 -m pip install --break-system-packages -r tests/requirements.txt + source $HOME/venv/bin/activate + python3 -m pip install -r tests/requirements.txt - name: 'run tests' env: TFLAGS: "${{ matrix.build.tflags }}" run: | + source $HOME/venv/bin/activate if [ -n '${{ matrix.build.generate }}' ]; then cmake --build . --verbose --target test-ci else @@ -515,13 +518,15 @@ jobs: - name: 'install pytest prereqs' run: | - sudo python3 -m pip install --break-system-packages -r tests/http/requirements.txt + source $HOME/venv/bin/activate + python3 -m pip install -r tests/http/requirements.txt - name: 'run pytest' env: TFLAGS: "${{ matrix.build.tflags }}" CURL_CI: github run: | + source $HOME/venv/bin/activate if [ -n '${{ matrix.build.generate }}' ]; then cmake --build . --verbose --target curl-pytest-ci else diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2d23058cb7e4..88b4b1bde518 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -290,6 +290,7 @@ jobs: libtool autoconf automake pkgconf ninja-build stunnel4 \ libpsl-dev libbrotli-dev libzstd-dev \ ${{ matrix.build.install_packages }} + python3 -m venv $HOME/venv name: 'install prereqs' - if: contains(matrix.build.name, 'i686') @@ -301,6 +302,7 @@ jobs: libtool autoconf automake pkgconf stunnel4 \ libpsl-dev:i386 libbrotli-dev:i386 libzstd-dev:i386 \ ${{ matrix.build.install_packages }} + python3 -m venv $HOME/venv name: 'install prereqs' - if: contains(matrix.build.install_steps, 'pytest') @@ -616,7 +618,8 @@ jobs: - name: 'install test prereqs' if: ${{ matrix.build.install_steps != 'skipall' && matrix.build.container == null }} run: | - sudo python3 -m pip install --break-system-packages -r tests/requirements.txt + [ -x "$HOME/venv/bin/activate" ] && source $HOME/venv/bin/activate + python3 -m pip install -r tests/requirements.txt - name: 'run tests' if: ${{ matrix.build.install_steps != 'skipall' && matrix.build.install_steps != 'skiprun' }} @@ -631,6 +634,7 @@ jobs: TFLAGS+=' ~2077 ~2078' # valgrind errors fi fi + [ -x "$HOME/venv/bin/activate" ] && source $HOME/venv/bin/activate if [ -n '${{ matrix.build.generate }}' ]; then cmake --build . --verbose --target ${{ matrix.build.torture && 'test-torture' || 'test-ci' }} else @@ -640,7 +644,8 @@ jobs: - name: 'install pytest prereqs' if: contains(matrix.build.install_steps, 'pytest') run: | - sudo python3 -m pip install --break-system-packages -r tests/http/requirements.txt + [ -x "$HOME/venv/bin/activate" ] && source $HOME/venv/bin/activate + python3 -m pip install -r tests/http/requirements.txt - name: 'run pytest' if: contains(matrix.build.install_steps, 'pytest') @@ -648,6 +653,7 @@ jobs: TFLAGS: "${{ matrix.build.tflags }}" CURL_CI: github run: | + [ -x "$HOME/venv/bin/activate" ] && source $HOME/venv/bin/activate if [ -n '${{ matrix.build.generate }}' ]; then cmake --build . --verbose --target curl-pytest-ci else