Skip to content

Commit

Permalink
Merge branch 'main' into kyle/flatgeobuf-iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron committed Dec 19, 2024
2 parents 3af774d + d61e866 commit 9495893
Show file tree
Hide file tree
Showing 67 changed files with 6,109 additions and 1,297 deletions.
49 changes: 25 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,27 +96,28 @@ jobs:
- name: Test
run: cargo check ${{ matrix.args }}

build-benchmarks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"
# We use nightly for now so that we can pass RUSTFLAGS below to work around
# https://github.com/geoarrow/geoarrow-rs/issues/716
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- uses: prefix-dev/setup-pixi@v0.8.1
with:
activate-environment: true
cache: true
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
manifest-path: build/pixi.toml
- name: Tweak environment to find GDAL
run: |
echo "PKG_CONFIG_PATH=$(pwd)/build/.pixi/envs/default/lib/pkgconfig" >> "$GITHUB_ENV"
echo "LD_LIBRARY_PATH=$(pwd)/build/.pixi/envs/default/lib" >> "$GITHUB_ENV"
- name: Build benchmarks with no features
run: RUSTFLAGS="-Zinline-mir=no" cargo bench --no-run
- name: Build benchmarks with all features
run: RUSTFLAGS="-Zinline-mir=no" cargo bench --no-run --all-features
# We don't build benchmarks on CI because they're quite slow to compile
# build-benchmarks:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# with:
# submodules: "recursive"
# # We use nightly for now so that we can pass RUSTFLAGS below to work around
# # https://github.com/geoarrow/geoarrow-rs/issues/716
# - uses: dtolnay/rust-toolchain@nightly
# - uses: Swatinem/rust-cache@v2
# - uses: prefix-dev/setup-pixi@v0.8.1
# with:
# activate-environment: true
# cache: true
# cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
# manifest-path: build/pixi.toml
# - name: Tweak environment to find GDAL
# run: |
# echo "PKG_CONFIG_PATH=$(pwd)/build/.pixi/envs/default/lib/pkgconfig" >> "$GITHUB_ENV"
# echo "LD_LIBRARY_PATH=$(pwd)/build/.pixi/envs/default/lib" >> "$GITHUB_ENV"
# - name: Build benchmarks with no features
# run: RUSTFLAGS="-Zinline-mir=no" cargo bench --no-run
# - name: Build benchmarks with all features
# run: RUSTFLAGS="-Zinline-mir=no" cargo bench --no-run --all-features
102 changes: 37 additions & 65 deletions .github/workflows/python-io-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,89 +12,61 @@ concurrency:

jobs:
linux:
runs-on: ubuntu-latest
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
target: [x86_64]
platform:
- runner: ubuntu-latest
target: x86_64
manylinux: auto
- runner: ubuntu-latest
target: x86
manylinux: auto
- runner: ubuntu-latest
target: aarch64
manylinux: "2_28"
- runner: ubuntu-latest
target: armv7
manylinux: auto
- runner: ubuntu-latest
target: s390x
manylinux: auto
- runner: ubuntu-latest
target: ppc64le
manylinux: auto
module:
- geoarrow-io
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: 3.x
architecture: x64
enable-cache: true
version: "0.4.x"

- name: Install Python versions
run: uv python install 3.9 3.10 3.11 3.12 3.13 pypy3.10

- name: Build wheels
uses: PyO3/maturin-action@v1
env:
RUSTFLAGS: "-Zinline-mir=no"
with:
rust-toolchain: nightly
target: ${{ matrix.target }}
manylinux: manylinux_2_28
args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 -m python/geoarrow-io/Cargo.toml
before-script-linux: |
yum update -y
yum install openssl openssl-devel perl-IPC-Cmd -y
- name: Install built wheel
if: matrix.target == 'x86_64'
run: |
pip install geoarrow-rust-io --find-links dist --force-reinstall
python -c "import geoarrow.rust.io"
target: ${{ matrix.platform.target }}
# As of Nov 2024, it was necessary to manually specify -i 3.13 to get
# maturin to find the executable. --find-interpreter did not find it.
args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 -i pypy3.10 --manifest-path python/${{ matrix.module }}/Cargo.toml
sccache: "true"
manylinux: ${{ matrix.platform.manylinux }}

- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.target }}
name: wheels-linux-${{ matrix.platform.target }}-${{ matrix.module }}
path: dist

# linux-cross:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# target: [aarch64, armv7, s390x, ppc64le, ppc64]
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: 3.x

# - name: Build wheels
# uses: PyO3/maturin-action@v1
# env:
# RUSTFLAGS: "-Zinline-mir=no"
# with:
# rust-toolchain: nightly
# target: ${{ matrix.target }}
# manylinux: auto
# args: --release --out dist -i 3.9 -i 3.10 -i 3.11 -i 3.12 -i 3.13 -m python/geoarrow-io/Cargo.toml

# # This is currently failing with
# # python: command not found

# # - uses: uraimo/run-on-arch-action@v2.5.1
# # if: matrix.target == 'aarch64'
# # name: Install built wheel
# # with:
# # arch: ${{ matrix.target }}
# # distro: ubuntu20.04
# # githubToken: ${{ github.token }}
# # install: |
# # apt-get update
# # apt-get install -y --no-install-recommends python3 python3-pip
# # pip3 install -U pip
# # run: |
# # pip install geoarrow-rust-io --find-links dist --force-reinstall
# # python -c "import geoarrow.rust.io"

# # Have to set path from root
# # https://github.com/actions/upload-artifact/issues/232#issuecomment-964235360
# - name: Upload wheels
# uses: actions/upload-artifact@v3
# with:
# name: wheels
# path: dist/*.whl

macos:
name: Build ${{ matrix.platform.target }} wheels on ${{ matrix.platform.runner }}
runs-on: ${{ matrix.platform.runner }}
Expand Down
Loading

0 comments on commit 9495893

Please sign in to comment.