Skip to content

Commit

Permalink
Add audit-wheel step
Browse files Browse the repository at this point in the history
Closes #1114

Co-authored-by: Titus von Koeller <[email protected]>
  • Loading branch information
akx and Titus-von-Koeller committed Mar 8, 2024
1 parent 92af6b1 commit aeac8e9
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/scripts/auditwheel_show.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import argparse
import subprocess


def main():
ap = argparse.ArgumentParser()
ap.add_argument("wheels", nargs="*")
args = ap.parse_args()
for whl in args.wheels:
print(f"### `{whl}`")

audit_wheel_output = subprocess.run(
["auditwheel", "show", whl],
capture_output=True,
text=True,
errors="backslashreplace",
)

if audit_wheel_output.stdout:
print(audit_wheel_output.stdout)

if audit_wheel_output.stderr:
print(f"**Error:**\n```{audit_wheel_output.stderr}```")

print("---")
25 changes: 25 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ jobs:
exclude:
- os: windows-latest # This probably requires arm64 Windows agents
arch: aarch64
- os: ubuntu-latest # Temporary. Takes too long, not ready yet.
arch: aarch64
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
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -114,6 +116,8 @@ jobs:
exclude:
- os: windows-latest # This probably requires arm64 Windows agents
arch: aarch64
- os: ubuntu-latest # Temporary. Takes too long, not ready yet.
arch: aarch64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -175,3 +179,24 @@ jobs:
cache: pip
- run: pip install wheel/*.whl -r requirements-ci.txt
- run: pytest --log-cli-level=DEBUG tests

audit-wheels:
needs: build-wheels
runs-on: ubuntu-latest
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
steps:
- uses: actions/checkout@v4
- name: Download all wheels
uses: actions/download-artifact@v4
with:
merge-multiple: true
pattern: "bdist_wheel_*"
path: wheels/
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: |
pip install auditwheel
python ./.github/auditwheel_show.py wheels/* | tee $GITHUB_STEP_SUMMARY

0 comments on commit aeac8e9

Please sign in to comment.