Updated CI #237
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: Wheels | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build_sdist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - run: pipx run build --sdist | |
| - run: pipx run twine check dist/* | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-sdist | |
| path: dist/*.tar.gz | |
| build_wheels: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-15, windows-latest] | |
| arch: [x86_64, arm64] | |
| exclude: | |
| - os: ubuntu-latest | |
| arch: arm64 | |
| - os: macos-15 | |
| pybuilds: cp38 | |
| pybuilds: [cp38, cp39, cp310, cp311, cp312] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - run: pip install cibuildwheel==2.22.0 | |
| - run: python -m cibuildwheel --output-dir wheelhouse | |
| env: | |
| CIBW_BUILD: "${{ matrix.pybuilds }}-*" | |
| CIBW_ARCHS_MACOS: ${{ matrix.arch }} | |
| CIBW_SKIP: "cp*-manylinux_i686 cp*-musllinux* cp*-win32" | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.os }}-${{ matrix.arch }} | |
| path: wheelhouse/* | |
| release_artifacts: | |
| if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
| needs: build_wheels | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| path: ./artifacts | |
| merge-multiple: true | |
| - run: ls -R ./artifacts | |
| - uses: ncipollo/release-action@v1 | |
| with: | |
| allowUpdates: true | |
| artifacts: "./artifacts/**/*" | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: pypa/gh-action-pypi-publish@v1.12.4 | |
| with: | |
| packages-dir: ./artifacts |