Commit 7af138ab authored by Aarni Koskela's avatar Aarni Koskela Committed by Titus
Browse files

Add audit-wheel step



Closes #1114
Co-authored-by: default avatarTitus von Koeller <9048635+Titus-von-Koeller@users.noreply.github.com>
parent 62485a34
import argparse
import subprocess
def main():
ap = argparse.ArgumentParser()
ap.add_argument("wheels", nargs="*")
args = ap.parse_args()
if not args.wheels:
ap.error("At least one wheel must be provided.")
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("---")
if __name__ == "__main__":
main()
......@@ -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
......@@ -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
......@@ -147,3 +151,23 @@ jobs:
name: bdist_wheel_${{ matrix.os }}_${{ matrix.arch }}
path: dist/bitsandbytes-*.whl
retention-days: 7
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
- run: python ./.github/scripts/auditwheel_show.py wheels/* | tee $GITHUB_STEP_SUMMARY
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment