imodfile 0.2.1

A pure-Rust IMOD model file decoder/encoder — binary & ASCII, with Python bindings
Documentation
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  rust:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy

      - name: Build
        run: cargo build

      - name: Test
        run: cargo test

      - name: Clippy
        run: cargo clippy --all-targets -- -D warnings

      - name: Doc
        run: cargo doc --no-deps

  python:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.12"

      - name: Install maturin
        run: pip install maturin

      - name: Build wheel
        run: maturin build --features python

      - name: Install wheel
        run: pip install --force-reinstall --no-deps target/wheels/imodfile-*.whl

      - name: Install test dependencies
        run: pip install pytest numpy

      - name: Python tests
        run: python -m pytest tests/test_python.py -v