name: Github
on: [push, pull_request]
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install rustfmt
run: rustup component add rustfmt
- name: Check formatting
run: cargo fmt --all --check
default:
name: Default features
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
o3:
name: O3 (BLAS / LAPACK via OpenBLAS)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install OpenBLAS / LAPACK
run: sudo apt-get update && sudo apt-get install -y libopenblas-dev liblapack-dev gfortran
- name: Build
run: cargo build --verbose --features O3-openblas
- name: Run tests
run: cargo test --verbose --features O3-openblas
pure-rust:
name: Pure-Rust feature set
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose --features "arrow complex csv indexmap json num-complex parallel parquet rayon rkyv serde"
- name: Run tests
run: cargo test --verbose --features "arrow complex csv indexmap json num-complex parallel parquet rayon rkyv serde"
feature-combinations:
name: Feature combinations (cargo-hack)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install OpenBLAS / LAPACK
run: sudo apt-get update && sudo apt-get install -y libopenblas-dev liblapack-dev gfortran
- uses: taiki-e/install-action@v2
with:
tool: cargo-hack
- name: Each feature builds on its own
run: >
cargo hack build --each-feature --optional-deps --keep-going
--exclude-features O3-accelerate,O3-mkl,O3-netlib,nc,netcdf,plot,pyo3,blas-src,lapack-src
- name: Pairwise feature powerset (pure-Rust / numerical)
run: >
cargo hack build --feature-powerset --depth 2 --optional-deps --keep-going
--exclude-features O3,O3-openblas,O3-accelerate,O3-mkl,O3-netlib,nc,netcdf,plot,pyo3,blas-src,lapack-src,arrow,parquet
plot:
name: plot (pyo3 + matplotlib)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install matplotlib
run: pip install matplotlib
- name: Build
run: cargo build --verbose --features plot
- name: Run tests (compile-only doctests via no_run)
run: cargo test --verbose --features plot
clippy:
name: Clippy (all targets)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install OpenBLAS / LAPACK
run: sudo apt-get update && sudo apt-get install -y libopenblas-dev liblapack-dev gfortran
- name: Run clippy
run: cargo clippy --all-targets --no-deps --features O3-openblas