Bump pypa/cibuildwheel from 2.19 to 2.21 in the actions group #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Wheels | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
release: | |
types: | |
- published | |
jobs: | |
build_sdist: | |
name: Build SDist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install pipx | |
run: python -m pip install --user pipx | |
- name: Build SDist | |
run: pipx run build --sdist | |
- name: Check metadata | |
run: pipx run twine check dist/* | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist-sdist | |
path: dist/*.tar.gz | |
build_wheels: | |
name: Wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-12, macos-14, windows-latest] | |
python-version: ["3.8", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Build Wheels | |
uses: pypa/cibuildwheel@v2.21 | |
with: | |
output-dir: wheelhouse | |
- name: Verify clean directory | |
run: git diff --exit-code | |
shell: bash | |
# Install the wheel and test dependencie | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest numpy librosa | |
- name: Run tests | |
run: pytest # Run tests after building the wheels | |
- name: Upload wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
path: wheelhouse/*.whl | |
name: dist-${{ matrix.os }} | |
merge_wheels: | |
name: Merge wheels into a combined artifact | |
runs-on: ubuntu-latest | |
needs: [build_wheels, build_sdist] | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: dist-${{ matrix.os }} | |
path: wheelhouse | |
- name: Merge wheels | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: wheelhouse | |
upload_all: | |
name: Upload to PyPI if release | |
needs: merge_wheels | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && github.event.action == 'published' | |
steps: | |
- uses: actions/setup-python@v5 | |
- name: Download merged artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
- name: Upload to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} |