Skip to content

Commit 84565bf

Browse files
Add audit-wheel step
Closes #1114 Co-authored-by: Titus von Koeller <9048635+Titus-von-Koeller@users.noreply.github.com>
1 parent 2175281 commit 84565bf

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.github/scripts/auditwheel_show.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import argparse
2+
import subprocess
3+
4+
5+
def main():
6+
ap = argparse.ArgumentParser()
7+
ap.add_argument("wheels", nargs="*")
8+
args = ap.parse_args()
9+
for whl in args.wheels:
10+
print(f"### `{whl}`")
11+
12+
audit_wheel_output = subprocess.run(
13+
["auditwheel", "show", whl],
14+
capture_output=True,
15+
text=True,
16+
errors="backslashreplace",
17+
)
18+
19+
if audit_wheel_output.stdout:
20+
print(audit_wheel_output.stdout)
21+
22+
if audit_wheel_output.stderr:
23+
print(f"**Error:**\n```{audit_wheel_output.stderr}```")
24+
25+
print("---")

.github/workflows/python-package.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ jobs:
3535
exclude:
3636
- os: windows-latest # This probably requires arm64 Windows agents
3737
arch: aarch64
38+
- os: ubuntu-latest # Temporary. Takes too long, not ready yet.
39+
arch: aarch64
3840
runs-on: ${{ matrix.os }} # One day, we could run them on native agents. Azure supports this now but it's planned only for Q3 2023 for hosted agents
3941
steps:
4042
- uses: actions/checkout@v4
@@ -114,6 +116,8 @@ jobs:
114116
exclude:
115117
- os: windows-latest # This probably requires arm64 Windows agents
116118
arch: aarch64
119+
- os: ubuntu-latest # Temporary. Takes too long, not ready yet.
120+
arch: aarch64
117121
runs-on: ${{ matrix.os }}
118122
steps:
119123
- uses: actions/checkout@v4
@@ -175,3 +179,24 @@ jobs:
175179
cache: pip
176180
- run: pip install wheel/*.whl -r requirements-ci.txt
177181
- run: pytest --log-cli-level=DEBUG tests
182+
183+
audit-wheels:
184+
needs: build-wheels
185+
runs-on: ubuntu-latest
186+
env:
187+
PIP_DISABLE_PIP_VERSION_CHECK: 1
188+
steps:
189+
- uses: actions/checkout@v4
190+
- name: Download all wheels
191+
uses: actions/download-artifact@v4
192+
with:
193+
merge-multiple: true
194+
pattern: "bdist_wheel_*"
195+
path: wheels/
196+
- name: Set up Python
197+
uses: actions/setup-python@v5
198+
with:
199+
python-version: "3.12"
200+
- run: |
201+
pip install auditwheel
202+
python ./.github/auditwheel_show.py wheels/* | tee $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)