Skip to content

a nit

a nit #12

Workflow file for this run

name: Build wheels
on:
push:
branches: [ main, master ]
tags: [ "v*" ] # only build/publish on version tags
pull_request:
permissions:
contents: write
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
python -m pip install cibuildwheel
- name: Build wheels with cibuildwheel
env:
# Build CPython 3.10–3.13
CIBW_BUILD: "cp3{10,11,12,13}-*"
# Skip musllinux (Alpine) and PyPy for now
# muslinux uses libc and not glibc, which may cause compatibility issues
# specially skip in CUDA projects. Nvidia does not provide CUDA support for Alpine.
CIBW_SKIP: "pp* *-musllinux_*"
# macOS: build both x86_64 and arm64 wheels
CIBW_ARCHS_MACOS: "x86_64 arm64"
# Test deps inside cibuildwheel’s test environment
CIBW_TEST_REQUIRES: "pytest numpy"
# Run tests against the installed wheel
CIBW_TEST_COMMAND: "pytest -q {project}/tests"
run: |
cibuildwheel --output-dir wheelhouse
- name: List built wheels
run: ls wheelhouse
# Always upload as CI artifacts (handy for debugging / manual download).
# This is NOT PyPI, it's just stored on GitHub Actions.
- name: Upload wheels as artifact
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl
publish_release_assets:
name: Attach wheels to GitHub Release
needs: build_wheels
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download wheel artifacts
uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: ./artifacts
merge-multiple: true
- name: List downloaded wheels
run: |
echo "Contents of ./artifacts:"
ls -R ./artifacts || echo "No artifacts found"
- name: Create / update GitHub Release and upload wheels
uses: softprops/action-gh-release@v2
with:
files: artifacts/*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}