Skip to content

Commit d48d25b

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

18 files changed

+1350
-43
lines changed

.github/workflows/assigner.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,29 @@ 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+
39+
- name: cache-pip
40+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
41+
with:
42+
path: ~/.cache/pip
43+
key: ${{ hashFiles('scripts/requirements-actions.txt') }}
44+
restore-keys: |
45+
${{ hashFiles('scripts/requirements-actions.txt') }}
46+
47+
- name: install-packages
48+
run: |
49+
pip install -r scripts/requirements-actions.txt --require-hashes
50+
3851
- name: Run assignment script
3952
env:
40-
GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }}
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4154
run: |
4255
FLAGS="-v"
4356
FLAGS+=" -o ${{ github.event.repository.owner.login }}"

.github/workflows/backport_issue_check.yml

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,29 @@ 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+
36+
- name: cache-pip
37+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
38+
with:
39+
path: ~/.cache/pip
40+
key: ${{ hashFiles('scripts/requirements-actions.txt') }}
41+
restore-keys: |
42+
${{ hashFiles('scripts/requirements-actions.txt') }}
43+
44+
- name: install-packages
3245
run: |
33-
pip install -U pygithub
46+
pip install -r scripts/requirements-actions.txt --require-hashes
3447
3548
- name: Run backport issue checker
3649
env:
3750
GITHUB_TOKEN: ${{ secrets.ZB_GITHUB_TOKEN }}
3851
run: |
3952
./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 }}
53+
-o ${{ github.event.repository.owner.login }} \
54+
-r ${{ github.event.repository.name }} \
55+
-b ${{ github.event.pull_request.base.ref }} \
56+
-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: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,23 @@ 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+
34+
- name: cache-pip
35+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
36+
with:
37+
path: ~/.cache/pip
38+
key: ${{ hashFiles('scripts/requirements-actions.txt') }}
39+
restore-keys: |
40+
${{ hashFiles('scripts/requirements-actions.txt') }}
41+
42+
- name: install-packages
3043
run: |
31-
pip install -U pygithub
44+
pip install -r scripts/requirements-actions.txt --require-hashes
45+
3246
3347
- name: Snapshot bugs
3448
env:

.github/workflows/clang.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,36 @@ 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+
154+
- name: cache-pip
155+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
156+
with:
157+
path: ~/.cache/pip
158+
key: ${{ hashFiles('scripts/requirements-actions.txt') }}
159+
restore-keys: |
160+
${{ hashFiles('scripts/requirements-actions.txt') }}
161+
162+
- name: install-packages
163+
run: |
164+
pip install -r scripts/requirements-actions.txt --require-hashes
165+
142166
- name: Merge Test Results
143167
run: |
144-
pip install junitparser junit2html
145168
junitparser merge artifacts/*/twister.xml junit.xml
146169
junit2html junit.xml junit-clang.html
147170

.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: 17 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,23 @@ 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+
151+
- name: cache-pip
152+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
153+
with:
154+
path: ~/.cache/pip
155+
key: ${{ hashFiles('scripts/requirements-actions.txt') }}
156+
restore-keys: |
157+
${{ hashFiles('scripts/requirements-actions.txt') }}
158+
159+
- name: install-packages
160+
run: |
161+
pip install -r scripts/requirements-actions.txt --require-hashes
162+
147163
- name: Download Artifacts
148164
uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
149165
with:
@@ -185,7 +201,6 @@ jobs:
185201
- name: Merge coverage files
186202
run: |
187203
pushd ./coverage/reports
188-
pip install gcovr==6.0
189204
gcovr ${{ steps.get-coverage-files.outputs.mergefiles }} --merge-mode-functions=separate --json merged.json
190205
gcovr ${{ steps.get-coverage-files.outputs.mergefiles }} --merge-mode-functions=separate --cobertura merged.xml
191206
popd
@@ -201,7 +216,6 @@ jobs:
201216
- name: Generate Coverage Report
202217
if: always()
203218
run: |
204-
pip install xlsxwriter ijson
205219
python3 ./scripts/ci/coverage/coverage_analysis.py \
206220
-t native_sim-testplan.json \
207221
-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: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,19 @@ 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
5555

5656
- name: cache-pip
5757
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
5858
with:
5959
path: ~/.cache/pip
60-
key: ${{ runner.os }}-pip-${{ hashFiles('.github/workflows/compliance.yml') }}
60+
key: ${{ hashFiles('scripts/requirements-actions.txt') }}
61+
restore-keys: |
62+
${{ hashFiles('scripts/requirements-actions.txt') }}
6163
62-
- name: Install python dependencies
64+
- name: install-packages
6365
run: |
64-
pip install -r scripts/requirements-compliance.txt
65-
pip install west
66+
pip install -r scripts/requirements-actions.txt --require-hashes
6667
6768
- name: west setup
6869
run: |

.github/workflows/daily_test_version.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,28 @@ 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+
39+
- name: cache-pip
40+
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
41+
with:
42+
path: ~/.cache/pip
43+
key: ${{ hashFiles('scripts/requirements-actions.txt') }}
44+
restore-keys: |
45+
${{ hashFiles('scripts/requirements-actions.txt') }}
46+
47+
- name: install-packages
48+
run: |
49+
pip install -r scripts/requirements-actions.txt --require-hashes
50+
3851
- name: Upload to AWS S3
3952
run: |
4053
python3 scripts/ci/version_mgr.py --update .

0 commit comments

Comments
 (0)