Update README to include uv instructions. #5
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: python | |
| on: [push, pull_request, workflow_dispatch] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build_wheels: | |
| name: build_wheels (os=${{ matrix.os }} target=${{ matrix.target }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-24.04 | |
| target: x86_64 | |
| cross: false | |
| - os: macos-15 | |
| target: universal2 | |
| cross: false | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.14' | |
| - uses: dtolnay/rust-toolchain@stable | |
| - uses: Swatinem/rust-cache@v2 | |
| - name: build wheel | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| args: --profile release-lto --out dist | |
| manylinux: auto | |
| sccache: true | |
| - name: delocate wheel (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| pip3 install delocate | |
| delocate-wheel -v dist/*.whl | |
| - name: install built wheel | |
| if: ${{ ! matrix.cross }} | |
| run: | | |
| pip3 install miniacd --find-links dist | |
| python3 -c "import miniacd" | |
| - name: upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-binary-${{ matrix.os }}-${{ matrix.target }} | |
| path: dist | |
| - if: github.ref == 'refs/heads/main' | |
| name: update prerelease tag | |
| uses: EndBug/[email protected] | |
| with: | |
| ref: "prerelease" | |
| sdist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: build sdist | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| command: sdist | |
| args: --out dist | |
| - name: upload sdist | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-sdist | |
| path: dist | |
| prerelease: | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: push-${{ github.ref_name }}-prerelease | |
| cancel-in-progress: true | |
| needs: [build_wheels, sdist] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: wheels-* | |
| merge-multiple: true | |
| path: wheels | |
| - name: GitHub release | |
| uses: ncipollo/[email protected] | |
| with: | |
| prerelease: true | |
| tag: "prerelease" | |
| name: "Development Build" | |
| allowUpdates: true | |
| removeArtifacts: true | |
| replacesArtifacts: true | |
| makeLatest: true | |
| artifacts: "wheels/*" | |
| publish: | |
| name: publish to PyPI | |
| runs-on: ubuntu-latest | |
| if: "startsWith(github.ref, 'refs/tags/')" | |
| needs: [build_wheels, sdist] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: wheels-* | |
| merge-multiple: true | |
| - uses: PyO3/maturin-action@v1 | |
| env: | |
| MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
| with: | |
| command: upload | |
| args: --non-interactive --skip-existing * |