Skip to content

Commit

Permalink
Fix python wheel build (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron authored Nov 13, 2024
1 parent 43ee3c5 commit 8ebd803
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 47 deletions.
82 changes: 42 additions & 40 deletions .github/workflows/python-core-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --manifest-path python/${{ matrix.module }}/Cargo.toml
args: --release --out dist --find-interpreter --manifest-path python/${{ matrix.module }}/Cargo.toml
sccache: "true"
manylinux: auto
- name: Upload wheels
Expand All @@ -56,39 +56,40 @@ jobs:
name: wheels-linux-${{ matrix.platform.target }}-${{ matrix.module }}
path: dist

musllinux:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
target: x86_64
- runner: ubuntu-latest
target: x86
- runner: ubuntu-latest
target: aarch64
- runner: ubuntu-latest
target: armv7
module:
- geoarrow-core
- geoarrow-compute
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.x
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --manifest-path python/${{ matrix.module }}/Cargo.toml
sccache: "true"
manylinux: musllinux_1_2
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-musllinux-${{ matrix.platform.target }}-${{ matrix.module }}
path: dist
# Commented out because rust 1.82 apparently isn't distributed yet (as of Nov 13, 2024) for musllinux? See https://github.com/geoarrow/geoarrow-rs/pull/860
# musllinux:
# runs-on: ${{ matrix.platform.runner }}
# strategy:
# matrix:
# platform:
# - runner: ubuntu-latest
# target: x86_64
# - runner: ubuntu-latest
# target: x86
# - runner: ubuntu-latest
# target: aarch64
# - runner: ubuntu-latest
# target: armv7
# module:
# - geoarrow-core
# - geoarrow-compute
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v5
# with:
# python-version: 3.x
# - name: Build wheels
# uses: PyO3/maturin-action@v1
# with:
# target: ${{ matrix.platform.target }}
# args: --release --out dist --find-interpreter --manifest-path python/${{ matrix.module }}/Cargo.toml
# sccache: "true"
# manylinux: musllinux_1_2
# - name: Upload wheels
# uses: actions/upload-artifact@v4
# with:
# name: wheels-musllinux-${{ matrix.platform.target }}-${{ matrix.module }}
# path: dist

windows:
runs-on: ${{ matrix.platform.runner }}
Expand All @@ -112,7 +113,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --manifest-path python/${{ matrix.module }}/Cargo.toml
args: --release --out dist --find-interpreter --manifest-path python/${{ matrix.module }}/Cargo.toml
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand All @@ -125,8 +126,9 @@ jobs:
strategy:
matrix:
platform:
- runner: macos-12
target: x86_64
# Commented out because rust 1.82 apparently isn't distributed yet (as of Nov 13, 2024) for x86_64-apple-darwin? See https://github.com/geoarrow/geoarrow-rs/pull/860
# - runner: macos-13
# target: x86_64
- runner: macos-14
target: aarch64
module:
Expand All @@ -141,7 +143,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --manifest-path python/${{ matrix.module }}/Cargo.toml
args: --release --out dist --find-interpreter --manifest-path python/${{ matrix.module }}/Cargo.toml
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -182,7 +184,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist --no-default-features --manifest-path python/${{ matrix.module }}/Cargo.toml
args: --release --out dist --find-interpreter --no-default-features --manifest-path python/${{ matrix.module }}/Cargo.toml
sccache: "true"
rust-toolchain: nightly
- name: Upload wheels
Expand Down Expand Up @@ -210,7 +212,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux, musllinux, windows, macos]
needs: [linux, windows, macos]
permissions:
# Used to upload release artifacts
contents: write
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/python-io-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
with:
target: ${{ matrix.target }}
manylinux: manylinux_2_28
args: --release --out dist -m python/geoarrow-io/Cargo.toml
args: --release --out dist --find-interpreter -m python/geoarrow-io/Cargo.toml
before-script-linux: |
yum update -y
yum install openssl openssl-devel perl-IPC-Cmd -y
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
# with:
# target: ${{ matrix.target }}
# manylinux: auto
# args: --release --out dist -m python/geoarrow-io/Cargo.toml
# args: --release --out dist --find-interpreter -m python/geoarrow-io/Cargo.toml

# # This is currently failing with
# # python: command not found
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
fail-fast: false
matrix:
platform:
- runner: macos-12
- runner: macos-13
target: x86_64
- runner: macos-14
target: aarch64
Expand All @@ -112,7 +112,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -m python/geoarrow-io/Cargo.toml
args: --release --out dist --find-interpreter -m python/geoarrow-io/Cargo.toml
sccache: "true"

- name: Install built wheel - ${{ matrix.platform.target }}
Expand Down Expand Up @@ -145,7 +145,7 @@ jobs:
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist -m python/geoarrow-io/Cargo.toml
args: --release --out dist --find-interpreter -m python/geoarrow-io/Cargo.toml

- name: Install built wheel
run: |
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
# with:
# target: ${{ matrix.target }}
# manylinux: musllinux_1_2
# args: --release --out dist -m python/geoarrow-io/Cargo.toml
# args: --release --out dist --find-interpreter -m python/geoarrow-io/Cargo.toml

# - name: Install built wheel
# if: matrix.target == 'x86_64-unknown-linux-musl'
Expand Down Expand Up @@ -222,7 +222,7 @@ jobs:
# with:
# target: ${{ matrix.platform.target }}
# manylinux: musllinux_1_2
# args: --release --out dist -m python/geoarrow-io/Cargo.toml
# args: --release --out dist --find-interpreter -m python/geoarrow-io/Cargo.toml

# - uses: uraimo/[email protected]
# name: Install built wheel
Expand Down

0 comments on commit 8ebd803

Please sign in to comment.