Fix mac x86 build #94
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
| # Adapted from https://github.com/pola-rs/polars/blob/main/.github/workflows/release-python.yml | |
| # With license found in maplib/licensing/polars_LICENSE | |
| name: Release Python | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| permissions: | |
| contents: write | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_TOOLCHAIN: nightly-2025-10-24 | |
| MATURIN_VERSION: '1.9.4' | |
| MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
| jobs: | |
| security_audit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rs/audit-check@v1.2.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| manylinux-x64_64: | |
| needs: security_audit | |
| runs-on: ubuntu-latest | |
| environment: release | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Fix README symlink | |
| run: | | |
| rm py_maplib/README.md | |
| cp README.md py_maplib/README.md | |
| - name: Publish wheel | |
| uses: PyO3/maturin-action@v1 | |
| env: | |
| RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma | |
| with: | |
| command: publish | |
| args: -m py_maplib/Cargo.toml --skip-existing -o wheels -u magbak --features abi3 | |
| maturin-version: ${{ env.MATURIN_VERSION }} | |
| rust-toolchain: ${{ env.RUST_TOOLCHAIN }} | |
| manylinux: 2_28 | |
| win-macos: | |
| needs: security_audit | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ macos-latest, windows-latest ] | |
| environment: release | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Fix README symlink | |
| run: | | |
| rm py_maplib/README.md | |
| cp README.md py_maplib/README.md | |
| - name: Publish wheel | |
| uses: PyO3/maturin-action@v1 | |
| env: | |
| RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2 | |
| with: | |
| command: publish | |
| args: -m py_maplib/Cargo.toml --no-sdist --skip-existing -o wheels -u magbak --features abi3 | |
| maturin-version: ${{ env.MATURIN_VERSION }} | |
| rust-toolchain: ${{ env.RUST_TOOLCHAIN }} | |
| mac_x86_64: | |
| name: Build release mac x86-64 | |
| runs-on: macos-latest | |
| environment: release | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ env.PYTHON_VERSION }} | |
| - name: Fix README symlink | |
| run: | | |
| rm py_maplib/README.md | |
| cp README.md py_maplib/README.md | |
| - name: Publish wheel | |
| uses: PyO3/maturin-action@v1 | |
| env: | |
| RUSTFLAGS: -C target-feature=+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+cmpxchg16b,+avx,+avx2,+fma,+bmi1,+bmi2,+lzcnt,+pclmulqdq,+movbe | |
| with: | |
| command: publish | |
| args: -m py_maplib/Cargo.toml --no-sdist --target x86_64-apple-darwin -u magbak --features abi3 | |
| maturin-version: ${{ env.MATURIN_VERSION }} | |
| rust-toolchain: ${{ env.RUST_TOOLCHAIN }} | |
| # macos-aarch64: | |
| # needs: security_audit | |
| # runs-on: macos-latest | |
| # environment: release | |
| # strategy: | |
| # fail-fast: false | |
| # matrix: | |
| # python-version: [ '3.9', '3.10', '3.11' ] | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - uses: actions/setup-python@v4 | |
| # with: | |
| # python-version: ${{ matrix.python-version }} | |
| # | |
| # - name: Fix README symlink | |
| # run: | | |
| # rm py_maplib/README.md | |
| # cp README.md py_maplib/README.md | |
| # | |
| # - name: Set up Rust targets | |
| # run: rustup target add aarch64-apple-darwin | |
| # | |
| # - name: Publish wheel | |
| # uses: PyO3/maturin-action@v1 | |
| # with: | |
| # command: publish | |
| # args: -m py_maplib/Cargo.toml --target aarch64-apple-darwin --no-sdist -o wheels -i python${{ matrix.python-version }} -u magbak | |
| # maturin-version: ${{ env.MATURIN_VERSION }} | |
| # rust-toolchain: ${{ env.RUST_TOOLCHAIN }} |