Skip to content

Commit 2c16cb6

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

File tree

5 files changed

+39
-60
lines changed

5 files changed

+39
-60
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 & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -37,37 +37,16 @@ jobs:
3737
ref: ${{ github.event.pull_request.head.sha }}
3838
fetch-depth: 0
3939

40-
- name: Rebase
41-
continue-on-error: true
42-
env:
43-
BASE_REF: ${{ github.base_ref }}
44-
PR_HEAD: ${{ github.event.pull_request.head.sha }}
45-
run: |
46-
git config --global user.email "[email protected]"
47-
git config --global user.name "Github Actions"
48-
rm -fr ".git/rebase-apply"
49-
rm -fr ".git/rebase-merge"
50-
git rebase origin/${BASE_REF}
51-
git clean -f -d
52-
git log --graph --oneline HEAD...${PR_HEAD}
53-
5440
- name: Set up Python ${{ matrix.python-version }}
5541
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
5642
with:
5743
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 }}
44+
cache: pip
45+
cache-dependency-path: scripts/requirements-actions.txt
6746

6847
- name: install-packages
6948
run: |
70-
pip install -r scripts/requirements-base.txt -r scripts/requirements-build-test.txt
49+
pip install -r scripts/requirements-actions.txt --require-hashes
7150
7251
- name: Run pytest
7352
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ yamllint
2626
mock
2727
tomli>=1.1.0
2828
exceptiongroup>=1.0.0rc8
29+
pyelftools>=0.29
30+
psutil>=5.6.6
31+
ply>=3.10

scripts/requirements-actions.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,10 +673,26 @@ pluggy==1.5.0 \
673673
# via
674674
# pytest
675675
# tox
676+
ply==3.11 \
677+
--hash=sha256:00c7c1aaa88358b9c765b6d3000c6eec0ba42abca5351b095321aef446081da3 \
678+
--hash=sha256:096f9b8350b65ebd2fd1346b12452efe5b9607f7482813ffca50c22722a807ce
679+
# via -r requirements-actions.in
676680
polib==1.2.0 \
677681
--hash=sha256:1c77ee1b81feb31df9bca258cbc58db1bbb32d10214b173882452c73af06d62d \
678682
--hash=sha256:f3ef94aefed6e183e342a8a269ae1fc4742ba193186ad76f175938621dbfc26b
679683
# via sphinx-lint
684+
psutil==7.0.0 \
685+
--hash=sha256:101d71dc322e3cffd7cea0650b09b3d08b8e7c4109dd6809fe452dfd00e58b25 \
686+
--hash=sha256:1e744154a6580bc968a0195fd25e80432d3afec619daf145b9e5ba16cc1d688e \
687+
--hash=sha256:1fcee592b4c6f146991ca55919ea3d1f8926497a713ed7faaf8225e174581e91 \
688+
--hash=sha256:39db632f6bb862eeccf56660871433e111b6ea58f2caea825571951d4b6aa3da \
689+
--hash=sha256:4b1388a4f6875d7e2aff5c4ca1cc16c545ed41dd8bb596cefea80111db353a34 \
690+
--hash=sha256:4cf3d4eb1aa9b348dec30105c55cd9b7d4629285735a102beb4441e38db90553 \
691+
--hash=sha256:7be9c3eba38beccb6495ea33afd982a44074b78f28c434a1f51cc07fd315c456 \
692+
--hash=sha256:84df4eb63e16849689f76b1ffcb36db7b8de703d1bc1fe41773db487621b6c17 \
693+
--hash=sha256:a5f098451abc2828f7dc6b58d44b532b22f2088f4999a937557b603ce72b1993 \
694+
--hash=sha256:ba3fcef7523064a6c9da440fc4d6bd07da93ac726b5733c29027d7dc95b39d99
695+
# via -r requirements-actions.in
680696
pyasn1==0.6.1 \
681697
--hash=sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629 \
682698
--hash=sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034
@@ -685,6 +701,10 @@ pycparser==2.22 \
685701
--hash=sha256:491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6 \
686702
--hash=sha256:c3702b6d3dd8c7abc1afa565d7e63d53a1d0bd86cdc24edd75470f4de499cfcc
687703
# via cffi
704+
pyelftools==0.32 \
705+
--hash=sha256:013df952a006db5e138b1edf6d8a68ecc50630adbd0d83a2d41e7f846163d738 \
706+
--hash=sha256:6de90ee7b8263e740c8715a925382d4099b354f29ac48ea40d840cf7aa14ace5
707+
# via -r requirements-actions.in
688708
pygithub==2.6.1 \
689709
--hash=sha256:6f2fa6d076ccae475f9fc392cc6cdbd54db985d4f69b8833a28397de75ed6ca3 \
690710
--hash=sha256:b5c035392991cca63959e9453286b41b54d83bf2de2daa7d7ff7e4312cebf3bf

0 commit comments

Comments
 (0)