relicense to MIT or Apache 2 #202
This file contains 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: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
lint-test: | |
name: Lint and Test | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: python/geoarrow-rust | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: Cargo fmt | |
run: cargo fmt --all -- --check | |
# Note not sure why this is needed | |
- name: Install protobuf | |
run: | | |
sudo apt-get install libprotobuf-dev protobuf-compiler | |
# Don't use --all-features as we don't have GDAL 3.6 available in CI | |
- name: "clippy --all" | |
run: cargo clippy --all --tests -- -D warnings | |
- name: "cargo check" | |
run: cargo check --all | |
- name: "cargo test" | |
run: | | |
cargo test --all | |
# lint-python: | |
# name: Lint Python code | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Set up Python 3.8 | |
# uses: actions/setup-python@v2 | |
# with: | |
# python-version: "3.8" | |
# - name: run pre-commit | |
# run: | | |
# python -m pip install pre-commit | |
# pre-commit run --all-files | |
test-python: | |
name: Build and test Python | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
python-version: ["3.8", "3.11"] | |
defaults: | |
run: | |
working-directory: python/geoarrow-rust | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
pip install maturin | |
- name: Build python package | |
run: | | |
maturin build | |
# - name: Run type checking | |
# run: | | |
# poetry run mypy --config-file pyproject.toml | |
# - name: Run tests | |
# env: | |
# RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down | |
# run: | | |
# poetry run maturin develop | |
# poetry run pytest tests/unit |