Skip to content

Commit

Permalink
ci: general pip cleanup
Browse files Browse the repository at this point in the history
Cleanup all pip commands in the various workflow
- drop the install/upgrade for setuptool pip and wheel, seems like this
  was introduced few years back to work around some old bug and it's not
  needed anymore
- use pip instead of pip3, that's probably been equivalent for quite a
  long time in the CI image

Signed-off-by: Fabio Baltieri <[email protected]>
  • Loading branch information
fabiobaltieri authored and kartben committed Dec 20, 2024
1 parent 6eff676 commit 93cb20b
Show file tree
Hide file tree
Showing 20 changed files with 32 additions and 42 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/assigner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ jobs:
steps:
- name: Install Python dependencies
run: |
sudo pip3 install -U setuptools wheel pip
pip3 install -U PyGithub>=1.55 west
pip install -U PyGithub>=1.55 west
- name: Check out source code
uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/backport_issue_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:

- name: Install Python dependencies
run: |
sudo pip3 install -U setuptools wheel pip
pip3 install -U pygithub
pip install -U pygithub
- name: Run backport issue checker
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bsim-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ jobs:
- name: Merge Test Results
run: |
pip3 install junitparser junit2html
pip install junitparser junit2html
junitparser merge --glob "./bsim_*/*bsim_results.*.xml" "./twister-out/twister.xml" junit.xml
junit2html junit.xml junit.html
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/bug_snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:

- name: Install Python dependencies
run: |
sudo pip3 install -U setuptools wheel pip
pip3 install -U pygithub
pip install -U pygithub
- name: Snapshot bugs
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
path: artifacts
- name: Merge Test Results
run: |
pip3 install junitparser junit2html
pip install junitparser junit2html
junitparser merge artifacts/*/twister.xml junit.xml
junit2html junit.xml junit-clang.html
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
export ZEPHYR_BASE=${PWD}
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
mkdir -p coverage/reports
pip3 install gcovr==6.0
pip install gcovr==6.0
./scripts/twister -E ${{matrix.normalized}}-testplan.json
ls -la
./scripts/twister \
Expand Down Expand Up @@ -182,7 +182,7 @@ jobs:
- name: Merge coverage files
run: |
pushd ./coverage/reports
pip3 install gcovr==6.0
pip install gcovr==6.0
gcovr ${{ steps.get-coverage-files.outputs.mergefiles }} --merge-mode-functions=separate --json merged.json
gcovr ${{ steps.get-coverage-files.outputs.mergefiles }} --merge-mode-functions=separate --cobertura merged.xml
popd
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/coding_guidelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ jobs:

- name: Install python dependencies
run: |
pip3 install unidiff
pip3 install wheel
pip3 install sh
pip install unidiff
pip install sh
- name: Install Packages
run: |
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ jobs:

- name: Install python dependencies
run: |
pip3 install setuptools
pip3 install wheel
pip3 install -r scripts/requirements-compliance.txt
pip3 install west
pip install -r scripts/requirements-compliance.txt
pip install west
- name: west setup
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/daily_test_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

- name: install-pip
run: |
pip3 install gitpython
pip install gitpython
- name: checkout
uses: actions/checkout@v4
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/devicetree_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ jobs:
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: install python dependencies
run: |
pip3 install wheel
pip3 install pytest pyyaml tox
pip install pytest pyyaml tox
- name: run tox
working-directory: scripts/dts/python-devicetree
run: |
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,10 @@ jobs:

- name: install-pip
run: |
sudo pip3 install -U setuptools wheel pip
pip3 install -r doc/requirements.txt
pip3 install west==${WEST_VERSION}
pip3 install cmake==${CMAKE_VERSION}
pip3 install coverxygen
pip install -r doc/requirements.txt
pip install west==${WEST_VERSION}
pip install cmake==${CMAKE_VERSION}
pip install coverxygen
- name: west setup
run: |
Expand Down Expand Up @@ -223,10 +222,9 @@ jobs:
- name: install-pip
run: |
pip3 install -U setuptools wheel pip
pip3 install -r doc/requirements.txt
pip3 install west==${WEST_VERSION}
pip3 install cmake==${CMAKE_VERSION}
pip install -r doc/requirements.txt
pip install west==${WEST_VERSION}
pip install cmake==${CMAKE_VERSION}
- name: west setup
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/footprint-tracking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y python3-venv
sudo pip3 install -U setuptools wheel pip gitpython
pip install -U gitpython
- name: checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
run: |
python3 -m venv .venv
. .venv/bin/activate
pip3 install awscli
pip install awscli
aws s3 sync --quiet footprint_data/ s3://testing.zephyrproject.org/footprint_data/
- name: Transform Footprint data to Twister JSON reports
Expand All @@ -113,7 +113,7 @@ jobs:
ELASTICSEARCH_INDEX: ${{ vars.FOOTPRINT_TRACKING_INDEX }}
run: |
shopt -s globstar
pip3 install -U elasticsearch
pip install -U elasticsearch
run_date=`date --iso-8601=minutes`
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
--flatten footprint \
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
BASE_REF: ${{ github.base_ref }}
working-directory: zephyrproject/zephyr
run: |
pip3 install west
pip install west
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
west init -l . || true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pylib_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: install-packages
run: |
pip3 install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt
pip install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt
- name: Run pytest for build_helpers
env:
ZEPHYR_BASE: ./
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: install-packages
run: |
pip3 install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt
pip install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt
- name: Run pytest
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stats_merged_prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
PR_STAT_ES_INDEX: ${{ vars.PR_STAT_ES_INDEX }}
run: |
pip3 install pygithub elasticsearch
pip install pygithub elasticsearch
python3 ./scripts/ci/stats/merged_prs.py --pull-request ${{ github.event.pull_request.number }} --repo ${{ github.repository }}
2 changes: 1 addition & 1 deletion .github/workflows/twister-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Upload to elasticsearch
if: steps.download-artifacts.outputs.found_artifact == 'true'
run: |
pip3 install elasticsearch
pip install elasticsearch
# set run date on upload to get consistent and unified data across the matrix.
run_date=`date --iso-8601=minutes`
if [ "${{github.event.workflow_run.event}}" = "push" ]; then
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/twister.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ jobs:
timestamp="$(date)"
version="$(git describe --abbrev=12 --always)"
echo -e "# Generated at $timestamp ($version)\n" > $FREEZE_FILE
pip3 freeze | tee -a $FREEZE_FILE
pip freeze | tee -a $FREEZE_FILE
- if: matrix.subset == 1 && github.event_name == 'push'
name: Upload the list of Python packages
Expand All @@ -223,7 +223,7 @@ jobs:

- name: Merge Test Results
run: |
pip3 install junitparser junit2html
pip install junitparser junit2html
junitparser merge artifacts/*/*/twister.xml junit.xml
junit2html junit.xml junit.html
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/twister_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: install-packages
run: |
pip3 install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt -r scripts/requirements-run-test.txt
pip install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt -r scripts/requirements-run-test.txt
- name: Run pytest for twisterlib
env:
ZEPHYR_BASE: ./
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/west_cmds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ jobs:
${{ runner.os }}-pip-${{ matrix.python-version }}
- name: install pytest
run: |
pip3 install wheel
pip3 install pytest west pyelftools canopen natsort progress mypy intelhex psutil ply pyserial anytree
pip install pytest west pyelftools canopen natsort progress mypy intelhex psutil ply pyserial anytree
- name: run pytest-win
if: runner.os == 'Windows'
run: |
Expand Down

0 comments on commit 93cb20b

Please sign in to comment.