Skip to content

Commit 33d2acd

Browse files
committed
various script workflows
Signed-off-by: Anas Nashif <[email protected]>
1 parent 9c4971f commit 33d2acd

File tree

5 files changed

+21
-46
lines changed

5 files changed

+21
-46
lines changed

.github/workflows/devicetree_checks.yml

Lines changed: 7 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,38 +34,18 @@ jobs:
3434
steps:
3535
- name: checkout
3636
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
3738
- name: Set up Python ${{ matrix.python-version }}
3839
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
3940
with:
4041
python-version: ${{ matrix.python-version }}
41-
- name: cache-pip-linux
42-
if: startsWith(runner.os, 'Linux')
43-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
44-
with:
45-
path: ~/.cache/pip
46-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
47-
restore-keys: |
48-
${{ runner.os }}-pip-${{ matrix.python-version }}
49-
- name: cache-pip-mac
50-
if: startsWith(runner.os, 'macOS')
51-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
52-
with:
53-
path: ~/Library/Caches/pip
54-
# Trailing '-' was just to get a different cache name
55-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-
56-
restore-keys: |
57-
${{ runner.os }}-pip-${{ matrix.python-version }}-
58-
- name: cache-pip-win
59-
if: startsWith(runner.os, 'Windows')
60-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
61-
with:
62-
path: ~\AppData\Local\pip\Cache
63-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
64-
restore-keys: |
65-
${{ runner.os }}-pip-${{ matrix.python-version }}
66-
- name: install python dependencies
42+
cache: pip
43+
cache-dependency-path: scripts/requirements-actions.txt
44+
45+
- name: install-packages
6746
run: |
68-
pip install pytest pyyaml tox
47+
pip install -r scripts/requirements-actions.txt --require-hashes
48+
6949
- name: run tox
7050
working-directory: scripts/dts/python-devicetree
7151
run: |

.github/workflows/scripts_tests.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,12 @@ jobs:
5555
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
5656
with:
5757
python-version: ${{ matrix.python-version }}
58-
59-
- name: cache-pip-linux
60-
if: startsWith(runner.os, 'Linux')
61-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
62-
with:
63-
path: ~/.cache/pip
64-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
65-
restore-keys: |
66-
${{ runner.os }}-pip-${{ matrix.python-version }}
58+
cache: pip
59+
cache-dependency-path: scripts/requirements-actions.txt
6760

6861
- name: install-packages
6962
run: |
70-
pip install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt
63+
pip install -r scripts/requirements-actions.txt --require-hashes
7164
7265
- name: Run pytest
7366
env:

.github/workflows/twister_tests.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,18 @@ jobs:
4040
steps:
4141
- name: checkout
4242
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
43+
4344
- name: Set up Python ${{ matrix.python-version }}
4445
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
4546
with:
4647
python-version: ${{ matrix.python-version }}
47-
- name: cache-pip-linux
48-
if: startsWith(runner.os, 'Linux')
49-
uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2
50-
with:
51-
path: ~/.cache/pip
52-
key: ${{ runner.os }}-pip-${{ matrix.python-version }}
53-
restore-keys: |
54-
${{ runner.os }}-pip-${{ matrix.python-version }}
48+
cache: pip
49+
cache-dependency-path: scripts/requirements-actions.txt
50+
5551
- name: install-packages
5652
run: |
57-
pip install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt -r scripts/requirements-run-test.txt
53+
pip install -r scripts/requirements-actions.txt --require-hashes
54+
5855
- name: Run pytest for twisterlib
5956
env:
6057
ZEPHYR_BASE: ./

scripts/requirements-actions.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ yamllint
2626
mock
2727
tomli>=1.1.0
2828
exceptiongroup>=1.0.0rc8
29+
pyelftools>=0.29

scripts/requirements-actions.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -685,6 +685,10 @@ pycparser==2.22 \
685685
--hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \
686686
--hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc
687687
# via cffi
688+
pyelftools==0.32 \
689+
--hash=sha256:013df952a006db5e138b1edf6d8a68ecc50630adbd0d83a2d41e7f846163d738 \
690+
--hash=sha256:6de90ee7b8263e740c8715a925382d4099b354f29ac48ea40d840cf7aa14ace5
691+
# via -r requirements-actions.in
688692
pygithub==2.6.1 \
689693
--hash=sha256:6f2fa6d076ccae475f9fc392cc6cdbd54db985d4f69b8833a28397de75ed6ca3 \
690694
--hash=sha256:b5c035392991cca63959e9453286b41b54d83bf2de2daa7d7ff7e4312cebf3bf

0 commit comments

Comments
 (0)