From 74b818000fc1669013b3d860516541f0f8112cb1 Mon Sep 17 00:00:00 2001 From: Frank Dietze Date: Wed, 29 Jul 2026 16:51:39 +0200 Subject: [PATCH] ci: upgrade pip before installing python dependencies --- .ci/fpga/templates/job-build-fpga.yml | 1 + .ci/fpga/templates/job-run-testbenches.yml | 1 + .ci/templates/job-rfnoc_modtool-test-testbenches.yml | 1 + .ci/templates/job-uhd-devtest.yml | 4 ++++ .ci/templates/job-uhd-rf-tests.yml | 1 + .ci/templates/job-uhd-usrp-tests.yml | 1 + .ci/templates/steps-build-uhd-installer-msbuild-nsis.yml | 1 + .ci/templates/steps-build-uhd-make-homebrew-macos.yml | 1 + .ci/templates/steps-rfnoc-block-test.yml | 1 + .../tests/templates/job-uhd-x4xx-hardware-tests.yml | 6 ++++-- 10 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.ci/fpga/templates/job-build-fpga.yml b/.ci/fpga/templates/job-build-fpga.yml index bdcff040b..ddcaf07cf 100644 --- a/.ci/fpga/templates/job-build-fpga.yml +++ b/.ci/fpga/templates/job-build-fpga.yml @@ -91,6 +91,7 @@ jobs: # twice. echo "##[group]Setting up build environment..." source $(Build.SourcesDirectory)/uhddev/.ci/fpga/scripts/run_setup.sh ./ + python3 -m pip install --upgrade pip pip3 install -U numpy mako "ruamel.yaml<0.18.0" jsonschema set -o xtrace # hwsetup.sh injects garbage cmake versions into PATH, so avoid that by diff --git a/.ci/fpga/templates/job-run-testbenches.yml b/.ci/fpga/templates/job-run-testbenches.yml index 020730efc..4e1f8c5bd 100644 --- a/.ci/fpga/templates/job-run-testbenches.yml +++ b/.ci/fpga/templates/job-run-testbenches.yml @@ -36,6 +36,7 @@ jobs: echo "---- Run testbenches ----" pushd ./tools/utils + python3 -m pip install --upgrade pip pip3 install -r requirements.txt python3 ./run_testbenches.py --logged --simulator ${{ parameters.simulator }} --excludes=${{ variables.excludes_file }}.excludes -j4 --report $(Build.ArtifactStagingDirectory)/junit.xml run popd diff --git a/.ci/templates/job-rfnoc_modtool-test-testbenches.yml b/.ci/templates/job-rfnoc_modtool-test-testbenches.yml index 30fc6579d..ceb68860e 100644 --- a/.ci/templates/job-rfnoc_modtool-test-testbenches.yml +++ b/.ci/templates/job-rfnoc_modtool-test-testbenches.yml @@ -44,6 +44,7 @@ jobs: # Init toolchain source $(Build.SourcesDirectory)/uhddev/.ci/fpga/scripts/run_setup.sh $(Build.SourcesDirectory)/uhddev/fpga/usrp3/top/x300 pushd $(Build.SourcesDirectory)/uhddev/fpga/usrp3/tools/utils + python3 -m pip install --upgrade pip pip3 install -r requirements.txt popd # Now run the test. diff --git a/.ci/templates/job-uhd-devtest.yml b/.ci/templates/job-uhd-devtest.yml index eaed2709b..6646ee7a0 100644 --- a/.ci/templates/job-uhd-devtest.yml +++ b/.ci/templates/job-uhd-devtest.yml @@ -142,6 +142,7 @@ jobs: cd $(Agent.TempDirectory) python3 -m venv devtest_venv source devtest_venv/bin/activate + python3 -m pip install --upgrade pip pip3 install -r $(Build.SourcesDirectory)/uhddev/host/tests/devtest/requirements.txt pip3 install -r $(Build.SourcesDirectory)/uhddev/.ci/utils/requirements.txt mkdir -p $(Common.TestResultsDirectory)/devtest @@ -168,6 +169,7 @@ jobs: cd $(Agent.TempDirectory) python3 -m venv devtest_venv source devtest_venv/bin/activate + python3 -m pip install --upgrade pip pip3 install -r $(Build.SourcesDirectory)/uhddev/host/tests/devtest/requirements.txt pip3 install -r $(Build.SourcesDirectory)/uhddev/.ci/utils/requirements.txt mkdir -p $(Common.TestResultsDirectory)/devtest @@ -194,6 +196,7 @@ jobs: cd $(Agent.TempDirectory) python3 -m venv devtest_venv source devtest_venv/bin/activate + python3 -m pip install --upgrade pip pip3 install -r $(Build.SourcesDirectory)/uhddev/host/tests/devtest/requirements.txt pip3 install -r $(Build.SourcesDirectory)/uhddev/.ci/utils/requirements.txt mkdir -p $(Common.TestResultsDirectory)/devtest @@ -218,6 +221,7 @@ jobs: cd $(Agent.TempDirectory) python3 -m venv devtest_venv source devtest_venv/bin/activate + python3 -m pip install --upgrade pip pip3 install -r $(Build.SourcesDirectory)/uhddev/host/tests/devtest/requirements.txt pip3 install -r $(Build.SourcesDirectory)/uhddev/.ci/utils/requirements.txt mkdir -p $(Common.TestResultsDirectory)/devtest diff --git a/.ci/templates/job-uhd-rf-tests.yml b/.ci/templates/job-uhd-rf-tests.yml index 7ee6d9ca0..a57239d12 100644 --- a/.ci/templates/job-uhd-rf-tests.yml +++ b/.ci/templates/job-uhd-rf-tests.yml @@ -225,6 +225,7 @@ jobs: fi source $(Build.SourcesDirectory)/ettus-rts/config/remote/python_tests/setup_venv.sh + python3 -m pip install --upgrade pip pip3 install -r $(Build.SourcesDirectory)/uhddev/.ci/utils/requirements_312.txt cd "$(Build.SourcesDirectory)/ettus-rts/config/remote/python_tests" diff --git a/.ci/templates/job-uhd-usrp-tests.yml b/.ci/templates/job-uhd-usrp-tests.yml index a1930594a..3c7091b59 100644 --- a/.ci/templates/job-uhd-usrp-tests.yml +++ b/.ci/templates/job-uhd-usrp-tests.yml @@ -183,6 +183,7 @@ jobs: py -3.10 -m venv lvtest_venv call lvtest_venv\Scripts\activate.bat echo "Installing required Python packages into the virtual environment" + python -m pip install --upgrade pip pip install lvtest displayName: Prepare venv (Python 3.10) diff --git a/.ci/templates/steps-build-uhd-installer-msbuild-nsis.yml b/.ci/templates/steps-build-uhd-installer-msbuild-nsis.yml index ce524c81d..1887be487 100644 --- a/.ci/templates/steps-build-uhd-installer-msbuild-nsis.yml +++ b/.ci/templates/steps-build-uhd-installer-msbuild-nsis.yml @@ -43,6 +43,7 @@ steps: - script: | pip config list + python -m pip install --upgrade pip pip install -r ${{ parameters.uhdSrcDir }}\host\python\requirements.txt displayName: refresh python dependencies diff --git a/.ci/templates/steps-build-uhd-make-homebrew-macos.yml b/.ci/templates/steps-build-uhd-make-homebrew-macos.yml index 7a913d807..86e2f2ae9 100644 --- a/.ci/templates/steps-build-uhd-make-homebrew-macos.yml +++ b/.ci/templates/steps-build-uhd-make-homebrew-macos.yml @@ -51,6 +51,7 @@ steps: cd ${{ parameters.uhdBuildDir }} pyenv exec python3 -m venv ${{ parameters.uhdBuildDir }}/pyenv source ${{ parameters.uhdBuildDir }}/pyenv/bin/activate + python3 -m pip install --upgrade pip python3 -m pip install mako numpy requests ruamel.yaml displayName: Install python UHD deps diff --git a/.ci/templates/steps-rfnoc-block-test.yml b/.ci/templates/steps-rfnoc-block-test.yml index b081b1b0c..91cd4b0e5 100644 --- a/.ci/templates/steps-rfnoc-block-test.yml +++ b/.ci/templates/steps-rfnoc-block-test.yml @@ -60,6 +60,7 @@ steps: python3 -m venv rfnoc-block-test-venv source rfnoc-block-test-venv/bin/activate TEST_DIR=$(Build.SourcesDirectory)/uhddev/host/tests/rfnoc_block_tests_on_target + python3 -m pip install --upgrade pip pip install -r $TEST_DIR/requirements.txt pytest --args ${{ parameters.uhdArgs }} $TEST_DIR/${{ parameters.testSelector }} -vv --junitxml=$(Common.TestResultsDirectory)/${{ parameters.resultFileNameBase }}.xml displayName: "${{ parameters.resultFileNameBase }}: Run test" diff --git a/.ci/templates/tests/templates/job-uhd-x4xx-hardware-tests.yml b/.ci/templates/tests/templates/job-uhd-x4xx-hardware-tests.yml index a0726dc0b..9657aa11e 100644 --- a/.ci/templates/tests/templates/job-uhd-x4xx-hardware-tests.yml +++ b/.ci/templates/tests/templates/job-uhd-x4xx-hardware-tests.yml @@ -249,7 +249,7 @@ jobs: ssh-keygen -f ~/.ssh/known_hosts -R $USRP_EMB_TARGET_IP ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "rm -rf ~/usrp_sysimg_test && mkdir -p ~/usrp_sysimg_test" scp -o StrictHostKeyChecking=no -r $(Build.SourcesDirectory)/meta-ettus-dev/contrib/test/tests root@$USRP_EMB_TARGET_IP:~/usrp_sysimg_test - ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "pip3 install unittest-xml-reporting && cd ~/usrp_sysimg_test/tests && python3 -m xmlrunner discover . -v" + ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "python3 -m pip install -U pip && pip3 install unittest-xml-reporting && cd ~/usrp_sysimg_test/tests && python3 -m xmlrunner discover . -v" EXITCODE=$? scp -o StrictHostKeyChecking=no -r root@$USRP_EMB_TARGET_IP:~/usrp_sysimg_test . exit $EXITCODE @@ -296,6 +296,7 @@ jobs: cd $(Agent.TempDirectory) python3 -m venv devtest_venv source devtest_venv/bin/activate + python3 -m pip install --upgrade pip pip3 install -r $(Build.SourcesDirectory)/uhddev/host/tests/devtest/requirements.txt cd $(Common.TestResultsDirectory)/devtest python3 $(Build.SourcesDirectory)/uhddev/host/tests/devtest/run_testsuite.py \ @@ -342,6 +343,7 @@ jobs: # Activate virtual environment and install dependencies source $USRP_EMB_VENV/bin/activate + python3 -m pip install --upgrade pip pip3 install -r $(Build.SourcesDirectory)/ettus-rts/.ci/utils/x420_iq_dc_correction_requirements.txt # Run the X420 IQ correction script @@ -385,7 +387,7 @@ jobs: mkdir -p $(Common.TestResultsDirectory)/pytest/embedded cd $(Common.TestResultsDirectory)/pytest/embedded ssh-keygen -f ~/.ssh/known_hosts -R $USRP_EMB_TARGET_IP - ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "pip3 install --upgrade 'pytest<8.4.0' pytest-helpers-namespace pytest-tempdir pytest-salt" + ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "python3 -m pip install -U pip && pip3 install --upgrade 'pytest<8.4.0' pytest-helpers-namespace pytest-tempdir pytest-salt" ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "rm -rf ~/usrp_pytest && mkdir -p ~/usrp_pytest" scp -o StrictHostKeyChecking=no -r $(Build.SourcesDirectory)/ettus-rts/config/remote/ root@$USRP_EMB_TARGET_IP:~/usrp_pytest ssh -o StrictHostKeyChecking=no -tt root@$USRP_EMB_TARGET_IP "cd ~/usrp_pytest/remote/python_tests/pytests && \