Repository navigation
Build and Publish Wheels #47
Workflow file for this run
This file contains hidden or 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: Build and Publish Wheels | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_sdist: | |
| name: Build sdist | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: false | |
| fetch-depth: 0 | |
| - name: Custom checkout submodules | |
| run: bash ./checkout_submodules.sh | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Build sdist | |
| run: | | |
| python -m pip install --upgrade pip build | |
| python -m build --sdist | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: build-sdist | |
| path: ./dist/*.tar.gz | |
| build_wheels: | |
| name: Build ${{ matrix.arch }} wheels | |
| strategy: | |
| matrix: | |
| include: | |
| - arch: x86_64 | |
| runner: ubuntu-24.04 | |
| - arch: aarch64 | |
| runner: ubuntu-24.04-arm | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: false | |
| fetch-depth: 0 | |
| - name: Custom checkout submodules | |
| run: bash ./checkout_submodules.sh | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.4.0 | |
| env: | |
| CIBW_ARCHS_LINUX: ${{ matrix.arch }} | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: build-wheels-${{ matrix.arch }} | |
| path: ./wheelhouse/*.whl | |
| build_dist: | |
| name: Collect distributions | |
| needs: [build_sdist, build_wheels] | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| pattern: build-* | |
| path: ./dist | |
| merge-multiple: true | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: dist | |
| path: ./dist/* |