psptool 3.4__tar.gz → 3.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {psptool-3.4 → psptool-3.5}/.github/workflows/publish.yml +9 -7
- psptool-3.5/.github/workflows/python-tests.yml +136 -0
- {psptool-3.4 → psptool-3.5}/PKG-INFO +1 -1
- {psptool-3.4 → psptool-3.5}/psptool/file.py +1 -1
- {psptool-3.4 → psptool-3.5}/tests/gha_metrics.py +3 -1
- psptool-3.4/.github/workflows/gha-metrics.yml +0 -34
- psptool-3.4/.github/workflows/python-tests.yml +0 -37
- {psptool-3.4 → psptool-3.5}/.gitignore +0 -0
- {psptool-3.4 → psptool-3.5}/.gitmodules +0 -0
- {psptool-3.4 → psptool-3.5}/LICENSE +0 -0
- {psptool-3.4 → psptool-3.5}/README.md +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/__init__.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/__main__.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/blob.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/cert_tree.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/crypto.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/directory.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/entry.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/errors.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/fet.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/firmware.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/header_file.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/key_store_file.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/microcode_file.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/psptool.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/pubkey_file.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/rom.py +0 -0
- {psptool-3.4 → psptool-3.5}/psptool/utils.py +0 -0
- {psptool-3.4 → psptool-3.5}/pyproject.toml +0 -0
- {psptool-3.4 → psptool-3.5}/tests/__init__.py +0 -0
- {psptool-3.4 → psptool-3.5}/tests/create_metrics.sh +0 -0
- {psptool-3.4 → psptool-3.5}/tests/integration/__init__.py +0 -0
- {psptool-3.4 → psptool-3.5}/tests/integration/test_psptrace.py +0 -0
- {psptool-3.4 → psptool-3.5}/tests/integration/test_rom_files.py +0 -0
- {psptool-3.4 → psptool-3.5}/tests/metrics.txt +0 -0
- {psptool-3.4 → psptool-3.5}/tests/unit/__init__.py +0 -0
- {psptool-3.4 → psptool-3.5}/tests/unit/test_cli.py +0 -0
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
name: Publish Python distribution to PyPI and TestPyPI
|
|
2
2
|
|
|
3
|
-
on:
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- '*'
|
|
4
7
|
|
|
5
8
|
jobs:
|
|
6
9
|
build:
|
|
7
10
|
name: Build distribution
|
|
8
11
|
runs-on: ubuntu-latest
|
|
9
|
-
|
|
10
12
|
steps:
|
|
11
|
-
- uses: actions/checkout@
|
|
13
|
+
- uses: actions/checkout@v6
|
|
12
14
|
with:
|
|
13
15
|
persist-credentials: false
|
|
14
16
|
- name: Set up Python
|
|
15
|
-
uses: actions/setup-python@
|
|
17
|
+
uses: actions/setup-python@v6
|
|
16
18
|
with:
|
|
17
|
-
python-version: "3.
|
|
19
|
+
python-version: "3.14"
|
|
18
20
|
- name: Install pypa/build
|
|
19
21
|
run: >-
|
|
20
22
|
python3 -m
|
|
@@ -24,7 +26,7 @@ jobs:
|
|
|
24
26
|
- name: Build a binary wheel and a source tarball
|
|
25
27
|
run: python3 -m build
|
|
26
28
|
- name: Store the distribution packages
|
|
27
|
-
uses: actions/upload-artifact@
|
|
29
|
+
uses: actions/upload-artifact@v7
|
|
28
30
|
with:
|
|
29
31
|
name: python-package-distributions
|
|
30
32
|
path: dist/
|
|
@@ -43,7 +45,7 @@ jobs:
|
|
|
43
45
|
id-token: write # important for trusted publishing
|
|
44
46
|
steps:
|
|
45
47
|
- name: Download all the dists
|
|
46
|
-
uses: actions/download-artifact@
|
|
48
|
+
uses: actions/download-artifact@v8
|
|
47
49
|
with:
|
|
48
50
|
name: python-package-distributions
|
|
49
51
|
path: dist/
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
name: Python tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request_target:
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
get-fixtures:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- name: Get fixtures
|
|
13
|
+
uses: actions/checkout@v6
|
|
14
|
+
with:
|
|
15
|
+
submodules: recursive
|
|
16
|
+
ssh-key: ${{ secrets.PSPTOOL_FIXTURES_NEW_PRIVATE_KEY }}
|
|
17
|
+
|
|
18
|
+
- name: Save fixtures
|
|
19
|
+
uses: actions/upload-artifact@v7
|
|
20
|
+
with:
|
|
21
|
+
name: saved-fixtures
|
|
22
|
+
path: tests/integration/fixtures
|
|
23
|
+
retention-days: 1
|
|
24
|
+
|
|
25
|
+
test:
|
|
26
|
+
needs: get-fixtures
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
permissions:
|
|
29
|
+
contents: read
|
|
30
|
+
strategy:
|
|
31
|
+
matrix:
|
|
32
|
+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
33
|
+
|
|
34
|
+
steps:
|
|
35
|
+
- name: Checkout PR
|
|
36
|
+
uses: actions/checkout@v6
|
|
37
|
+
with:
|
|
38
|
+
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
|
|
39
|
+
|
|
40
|
+
- name: Download fixtures
|
|
41
|
+
uses: actions/download-artifact@v8
|
|
42
|
+
with:
|
|
43
|
+
name: saved-fixtures
|
|
44
|
+
path: tests/integration/fixtures
|
|
45
|
+
|
|
46
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
47
|
+
uses: actions/setup-python@v6
|
|
48
|
+
with:
|
|
49
|
+
python-version: ${{ matrix.python-version }}
|
|
50
|
+
cache: 'pip'
|
|
51
|
+
|
|
52
|
+
- name: Install dependencies
|
|
53
|
+
run: |
|
|
54
|
+
python -m pip install --upgrade pip
|
|
55
|
+
pip install flake8
|
|
56
|
+
pip install psptrace # for integration tests
|
|
57
|
+
pip install .
|
|
58
|
+
|
|
59
|
+
- name: Lint with flake8
|
|
60
|
+
run: |
|
|
61
|
+
# stop the build if there are Python syntax errors or undefined names
|
|
62
|
+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
63
|
+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
64
|
+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
65
|
+
- name: Test with unittest
|
|
66
|
+
run: |
|
|
67
|
+
python -m unittest discover -s tests -v
|
|
68
|
+
|
|
69
|
+
create-metrics:
|
|
70
|
+
runs-on: ubuntu-latest
|
|
71
|
+
needs: get-fixtures
|
|
72
|
+
permissions:
|
|
73
|
+
contents: read
|
|
74
|
+
steps:
|
|
75
|
+
- name: Checkout PR
|
|
76
|
+
uses: actions/checkout@v6
|
|
77
|
+
with:
|
|
78
|
+
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
|
|
79
|
+
|
|
80
|
+
- name: Download fixtures
|
|
81
|
+
uses: actions/download-artifact@v8
|
|
82
|
+
with:
|
|
83
|
+
name: saved-fixtures
|
|
84
|
+
path: tests/integration/fixtures
|
|
85
|
+
|
|
86
|
+
- name: Set up Python
|
|
87
|
+
uses: actions/setup-python@v6
|
|
88
|
+
with:
|
|
89
|
+
python-version: "3.14"
|
|
90
|
+
cache: 'pip'
|
|
91
|
+
|
|
92
|
+
- name: Install dependencies
|
|
93
|
+
run: |
|
|
94
|
+
python -m pip install --upgrade pip
|
|
95
|
+
pip install .
|
|
96
|
+
|
|
97
|
+
- name: Create Metrics
|
|
98
|
+
run: |
|
|
99
|
+
python tests/gha_metrics.py > metrics.md
|
|
100
|
+
cat metrics.md >> $GITHUB_STEP_SUMMARY
|
|
101
|
+
|
|
102
|
+
- name: Upload metrics
|
|
103
|
+
if: github.event_name == 'pull_request_target'
|
|
104
|
+
uses: actions/upload-artifact@v7
|
|
105
|
+
with:
|
|
106
|
+
name: metrics-data
|
|
107
|
+
path: metrics.md
|
|
108
|
+
|
|
109
|
+
comment-metrics:
|
|
110
|
+
if: github.event_name == 'pull_request_target'
|
|
111
|
+
runs-on: ubuntu-latest
|
|
112
|
+
needs: create-metrics
|
|
113
|
+
permissions:
|
|
114
|
+
pull-requests: write
|
|
115
|
+
actions: read
|
|
116
|
+
steps:
|
|
117
|
+
- name: Download metrics
|
|
118
|
+
uses: actions/download-artifact@v8
|
|
119
|
+
with:
|
|
120
|
+
name: metrics-data
|
|
121
|
+
|
|
122
|
+
- name: find comment
|
|
123
|
+
uses: peter-evans/find-comment@v4
|
|
124
|
+
id: fc
|
|
125
|
+
with:
|
|
126
|
+
issue-number: ${{ github.event.pull_request.number }}
|
|
127
|
+
comment-author: 'github-actions[bot]'
|
|
128
|
+
body-includes: '<!-- PSPTOOL-METRICS-MARKER -->'
|
|
129
|
+
|
|
130
|
+
- name: create or update comment
|
|
131
|
+
uses: peter-evans/create-or-update-comment@v5
|
|
132
|
+
with:
|
|
133
|
+
comment-id: ${{ steps.fc.outputs.comment-id }}
|
|
134
|
+
issue-number: ${{ github.event.pull_request.number }}
|
|
135
|
+
body-path: metrics.md
|
|
136
|
+
edit-mode: replace
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
name: Post metrics comment
|
|
2
|
-
|
|
3
|
-
on: [pull_request_target]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
test:
|
|
7
|
-
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
strategy:
|
|
10
|
-
matrix:
|
|
11
|
-
python-version: ["3.9"]
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v3
|
|
15
|
-
with:
|
|
16
|
-
ref: ${{ github.event.pull_request.head.sha }}
|
|
17
|
-
submodules: recursive
|
|
18
|
-
ssh-key: ${{ secrets.PSPTOOL_FIXTURES_NEW_PRIVATE_KEY }}
|
|
19
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
-
uses: actions/setup-python@v3
|
|
21
|
-
with:
|
|
22
|
-
python-version: ${{ matrix.python-version }}
|
|
23
|
-
- name: Install dependencies
|
|
24
|
-
run: |
|
|
25
|
-
python -m pip install --upgrade pip
|
|
26
|
-
pip install .
|
|
27
|
-
- name: Run metrics and post comment
|
|
28
|
-
run: |
|
|
29
|
-
python tests/gha_metrics.py > metrics.md
|
|
30
|
-
gh pr comment $PRNUM --body-file metrics.md
|
|
31
|
-
env:
|
|
32
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
-
GH_REPO: ${{ github.repository }}
|
|
34
|
-
PRNUM: ${{ github.event.pull_request.number }}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
name: Python tests
|
|
2
|
-
|
|
3
|
-
on: [push, pull_request_target]
|
|
4
|
-
|
|
5
|
-
jobs:
|
|
6
|
-
test:
|
|
7
|
-
|
|
8
|
-
runs-on: ubuntu-latest
|
|
9
|
-
strategy:
|
|
10
|
-
matrix:
|
|
11
|
-
python-version: ["3.8", "3.9"]
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v3
|
|
15
|
-
with:
|
|
16
|
-
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.sha }}
|
|
17
|
-
submodules: recursive
|
|
18
|
-
ssh-key: ${{ secrets.PSPTOOL_FIXTURES_NEW_PRIVATE_KEY }}
|
|
19
|
-
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
-
uses: actions/setup-python@v3
|
|
21
|
-
with:
|
|
22
|
-
python-version: ${{ matrix.python-version }}
|
|
23
|
-
- name: Install dependencies
|
|
24
|
-
run: |
|
|
25
|
-
python -m pip install --upgrade pip
|
|
26
|
-
pip install flake8
|
|
27
|
-
pip install psptrace # for integration tests
|
|
28
|
-
pip install .
|
|
29
|
-
- name: Lint with flake8
|
|
30
|
-
run: |
|
|
31
|
-
# stop the build if there are Python syntax errors or undefined names
|
|
32
|
-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
|
33
|
-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
34
|
-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
35
|
-
- name: Test with unittest
|
|
36
|
-
run: |
|
|
37
|
-
python -m unittest discover -s tests -v
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|