solvr 0.2.0-beta.2

Advanced computing library for real-world problem solving - optimization, differential equations, interpolation, statistics, and more
Documentation
name: CI

on:
  pull_request:
    branches: [main]
  workflow_dispatch:

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

permissions:
  contents: read

env:
  CARGO_TERM_COLOR: always

jobs:
  lint:
    name: Lint, Format & Docs
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

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

      - uses: Swatinem/rust-cache@v2
        with:
          prefix-key: lint

      - name: Check formatting
        run: cargo fmt --all --check

      - name: Run clippy (default features)
        run: cargo clippy --all-targets -- -D warnings

      - name: Run clippy (all CI-safe features)
        run: cargo clippy --all-targets --features f16,sparse,graph,pde -- -D warnings

      - name: Build docs
        run: cargo doc --no-deps --features graph,pde

      - name: Run doctests
        run: cargo test --doc --features graph,pde

  test:
    name: Test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]

    steps:
      - uses: actions/checkout@v4

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

      - uses: Swatinem/rust-cache@v2
        with:
          prefix-key: test

      - name: Run tests (default)
        run: cargo test

      - name: Run tests (all CI-safe features)
        run: cargo test --features f16,sparse,graph,pde