Skip to content

Improved numpy ffi #1265

Improved numpy ffi

Improved numpy ffi #1265

Workflow file for this run

name: Rust
on:
push:
branches:
- main
pull_request:
jobs:
lint-test:
name: Lint and Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Install Pixi
run: |
curl -fsSL https://pixi.sh/install.sh | bash
echo "$HOME/.pixi/bin" >> $GITHUB_PATH
echo "GDAL_HOME=$(pwd)/build/.pixi/envs/default" >> "$GITHUB_ENV"
echo "LD_LIBRARY_PATH=$(pwd)/build/.pixi/envs/default/lib" >> "$GITHUB_ENV"
echo "GEOS_LIB_DIR=$(pwd)/build/.pixi/envs/default/lib" >> "$GITHUB_ENV"
# TODO: infer from toml file/lockfile
echo "GEOS_VERSION=3.12.1" >> "$GITHUB_ENV"
echo "PKG_CONFIG_PATH=$(pwd)/build/.pixi/envs/default/lib/pkgconfig" >> "$GITHUB_ENV"
- name: Install build requirements
run: |
cd build
pixi install
- name: Cargo fmt
run: cargo fmt --all -- --check
- name: "clippy --all"
run: cargo clippy --all --all-features --tests -- -D warnings
- name: "cargo check"
# No idea why the gdal/bindgen feature declared in dev dependencies
# isn't getting picked up.
run: cargo check --all --all-features --features gdal/bindgen
- name: "cargo test"
run: |
cargo test --all
cargo test --all --all-features