Skip to content

Commit 34d007c

Browse files
committed
ci: pin dependencies
Signed-off-by: Anas Nashif <[email protected]>
1 parent c4d9289 commit 34d007c

24 files changed

+1543
-146
lines changed

.github/workflows/assigner.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,27 @@ jobs:
2828
issues: write # to add assignees to issues
2929

3030
steps:
31-
- name: Install Python dependencies
32-
run: |
33-
pip install -U PyGithub>=1.55 west
34-
3531
- name: Check out source code
3632
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3733

34+
- name: Set up Python
35+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
36+
with:
37+
python-version: 3.12
38+
cache: pip
39+
cache-dependency-path: scripts/requirements-actions.txt
40+
41+
- name: install-packages
42+
run: |
43+
pip install -r scripts/requirements-actions.txt --require-hashes
44+
45+
- name: install-packages
46+
run: |
47+
pip install -r scripts/requirements-actions.txt --require-hashes
48+
3849
- name: Run assignment script
3950
env:
40-
GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }}
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4152
run: |
4253
FLAGS="-v"
4354
FLAGS+=" -o ${{ github.event.repository.owner.login }}"

.github/workflows/backport_issue_check.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,27 @@ jobs:
2828
- name: Check out source code
2929
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3030

31-
- name: Install Python dependencies
31+
- name: Set up Python
32+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
33+
with:
34+
python-version: 3.12
35+
cache: pip
36+
cache-dependency-path: scripts/requirements-actions.txt
37+
38+
- name: install-packages
39+
run: |
40+
pip install -r scripts/requirements-actions.txt --require-hashes
41+
42+
- name: install-packages
3243
run: |
33-
pip install -U pygithub
44+
pip install -r scripts/requirements-actions.txt --require-hashes
3445
3546
- name: Run backport issue checker
3647
env:
3748
GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }}
3849
run: |
3950
./scripts/release/list_backports.py \
40-
-o ${{ github.event.repository.owner.login }} \
41-
-r ${{ github.event.repository.name }} \
42-
-b ${{ github.event.pull_request.base.ref }} \
43-
-p ${{ github.event.pull_request.number }}
51+
-o ${{ github.event.repository.owner.login }} \
52+
-r ${{ github.event.repository.name }} \
53+
-b ${{ github.event.pull_request.base.ref }} \
54+
-p ${{ github.event.pull_request.number }}

.github/workflows/bsim-tests.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ jobs:
178178
179179
- name: Merge Test Results
180180
run: |
181-
pip install junitparser junit2html
182181
junitparser merge --glob "./bsim_*/*bsim_results.*.xml" "./twister-out/twister.xml" junit.xml
183182
junit2html junit.xml junit.html
184183

.github/workflows/bug_snapshot.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,17 @@ jobs:
2626
- name: Checkout
2727
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2828

29-
- name: Install Python dependencies
29+
- name: Set up Python
30+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
31+
with:
32+
python-version: 3.12
33+
cache: pip
34+
cache-dependency-path: scripts/requirements-actions.txt
35+
36+
- name: install-packages
3037
run: |
31-
pip install -U pygithub
38+
pip install -r scripts/requirements-actions.txt --require-hashes
39+
3240
3341
- name: Snapshot bugs
3442
env:

.github/workflows/clang.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,30 @@ jobs:
135135
checks: write # to create GitHub annotations
136136
if: (success() || failure())
137137
steps:
138+
- name: Checkout
139+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
140+
with:
141+
fetch-depth: 0
142+
persist-credentials: false
143+
138144
- name: Download Artifacts
139145
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
140146
with:
141147
path: artifacts
148+
149+
- name: Set up Python
150+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
151+
with:
152+
python-version: 3.12
153+
cache: pip
154+
cache-dependency-path: scripts/requirements-actions.txt
155+
156+
- name: install-packages
157+
run: |
158+
pip install -r scripts/requirements-actions.txt --require-hashes
159+
142160
- name: Merge Test Results
143161
run: |
144-
pip install junitparser junit2html
145162
junitparser merge artifacts/*/twister.xml junit.xml
146163
junit2html junit.xml junit-clang.html
147164

.github/workflows/codechecker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ jobs:
9595
export CODECHECKER_EXPORT=sarif
9696
export CODECHECKER_SKIP_FILE=$ZEPHYR_BASE/.github/codechecker/skipfile
9797
98-
pip install codechecker==v6.25.1 cppcheck sarif-tools jq
98+
pip install codechecker==v6.25.1 cppcheck sarif-tools
9999
sudo apt-get update
100100
sudo apt-get install -y jq
101101
export PATH=/usr/lib/llvm-16/bin/:$PATH
@@ -117,6 +117,6 @@ jobs:
117117
118118
- name: Upload Analysis Results
119119
if: always()
120-
uses: github/codeql-action/upload-sarif@v3
120+
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 #v3
121121
with:
122122
sarif_file: results.sarif

.github/workflows/codecov.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ jobs:
104104
export ZEPHYR_BASE=${PWD}
105105
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
106106
mkdir -p coverage/reports
107-
pip install gcovr==6.0
108107
./scripts/twister -E ${{matrix.normalized}}-testplan.json
109108
ls -la
110109
./scripts/twister \
@@ -144,6 +143,17 @@ jobs:
144143
with:
145144
fetch-depth: 0
146145

146+
- name: Set up Python
147+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
148+
with:
149+
python-version: 3.12
150+
cache: pip
151+
cache-dependency-path: scripts/requirements-actions.txt
152+
153+
- name: install-packages
154+
run: |
155+
pip install -r scripts/requirements-actions.txt --require-hashes
156+
147157
- name: Download Artifacts
148158
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
149159
with:
@@ -185,7 +195,6 @@ jobs:
185195
- name: Merge coverage files
186196
run: |
187197
pushd ./coverage/reports
188-
pip install gcovr==6.0
189198
gcovr ${{ steps.get-coverage-files.outputs.mergefiles }} --merge-mode-functions=separate --json merged.json
190199
gcovr ${{ steps.get-coverage-files.outputs.mergefiles }} --merge-mode-functions=separate --cobertura merged.xml
191200
popd
@@ -201,7 +210,6 @@ jobs:
201210
- name: Generate Coverage Report
202211
if: always()
203212
run: |
204-
pip install xlsxwriter ijson
205213
python3 ./scripts/ci/coverage/coverage_analysis.py \
206214
-t native_sim-testplan.json \
207215
-m MAINTAINERS.yml \

.github/workflows/coding_guidelines.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ jobs:
1616
ref: ${{ github.event.pull_request.head.sha }}
1717
fetch-depth: 0
1818

19-
- name: cache-pip
20-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
19+
- name: Set up Python
20+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
2121
with:
22-
path: ~/.cache/pip
23-
key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/coding_guidelines.yml') }}
22+
python-version: 3.12
23+
cache: pip
24+
cache-dependency-path: scripts/requirements-actions.txt
2425

25-
- name: Install python dependencies
26+
- name: install-packages
2627
run: |
27-
pip install unidiff
28-
pip install sh
28+
pip install -r scripts/requirements-actions.txt --require-hashes
2929
3030
- name: Install Packages
3131
run: |

.github/workflows/compliance.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,13 @@ jobs:
5151
- name: Set up Python
5252
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
5353
with:
54-
python-version: 3.11
54+
python-version: 3.12
55+
cache: pip
56+
cache-dependency-path: scripts/requirements-actions.txt
5557

56-
- name: cache-pip
57-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
58-
with:
59-
path: ~/.cache/pip
60-
key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/compliance.yml') }}
61-
62-
- name: Install python dependencies
58+
- name: install-packages
6359
run: |
64-
pip install -r scripts/requirements-compliance.txt
65-
pip install west
60+
pip install -r scripts/requirements-actions.txt --require-hashes
6661
6762
- name: west setup
6863
run: |

.github/workflows/daily_test_version.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,22 @@ jobs:
2626
aws-secret-access-key: ${{ secrets.AWS_TESTING_SECRET_ACCESS_KEY }}
2727
aws-region: us-east-1
2828

29-
- name: install-pip
30-
run: |
31-
pip install gitpython
32-
3329
- name: checkout
3430
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3531
with:
3632
fetch-depth: 0
3733

34+
- name: Set up Python
35+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
36+
with:
37+
python-version: 3.12
38+
cache: pip
39+
cache-dependency-path: scripts/requirements-actions.txt
40+
41+
- name: install-packages
42+
run: |
43+
pip install -r scripts/requirements-actions.txt --require-hashes
44+
3845
- name: Upload to AWS S3
3946
run: |
4047
python3 scripts/ci/version_mgr.py --update .

0 commit comments

Comments
 (0)