lazymatrix 0.6.0

Lazy normalized design matrices: apply column centering/scaling without materializing (X - 1cᵀ)S⁻¹, preserving sparsity.
Documentation
name: CI

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

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: -D warnings

jobs:
  fmt:
    name: rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: Install rustfmt
        run: rustup component add rustfmt
      - run: cargo fmt --all -- --check
      - run: cargo fmt --manifest-path tests/feature_unification/Cargo.toml --all -- --check
      - run: cargo fmt --manifest-path tests/core_consumer/Cargo.toml --all -- --check

  clippy:
    name: clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - name: Install clippy
        run: rustup component add clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo clippy --all-features --all-targets --locked -- -D warnings
      - run: cargo clippy --manifest-path tests/feature_unification/Cargo.toml --workspace --all-features --all-targets --locked -- -D warnings
      - run: cargo clippy --manifest-path tests/core_consumer/Cargo.toml --all-targets --locked -- -D warnings

  docs:
    name: rustdoc
    runs-on: ubuntu-latest
    env:
      RUSTDOCFLAGS: -D warnings
    steps:
      - uses: actions/checkout@v7
      - uses: Swatinem/rust-cache@v2
        with:
          key: docs
      - run: cargo doc --no-deps --all-features --locked

  test:
    name: test (${{ matrix.group }})
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        include:
          - group: core
            args: core
          - group: version-coexistence
            args: coexistence
          - group: faer-0.22
            args: version faer_v0_22
          - group: faer-0.23
            args: version faer_v0_23
          - group: faer-0.24
            args: version faer_v0_24
          - group: nalgebra-0.32
            args: version nalgebra_v0_32
          - group: nalgebra-0.33
            args: version nalgebra_v0_33
          - group: nalgebra-0.34
            args: version nalgebra_v0_34
          - group: nalgebra-0.35
            args: version nalgebra_v0_35
          - group: ndarray-0.15
            args: version ndarray_v0_15
          - group: ndarray-0.16
            args: version ndarray_v0_16
          - group: ndarray-0.17
            args: version ndarray_v0_17
          - group: sprs-0.11
            args: version sprs_v0_11
          - group: zarrs-0.22
            args: version zarrs_v0_22
    steps:
      - uses: actions/checkout@v7
      - uses: Swatinem/rust-cache@v2
        with:
          key: ${{ matrix.group }}
      - run: bash scripts/test-backends.sh ${{ matrix.args }}
      - name: Run out-of-core examples
        if: matrix.group == 'core'
        run: |
          cargo run --locked --example ndarray_mmap --features ndarray
          cargo run --locked --example zarrs_chunked --features zarrs

  core-msrv:
    name: Core and sprs MSRV (Rust 1.85)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - run: rustup toolchain install 1.85.0 --profile minimal --no-self-update
      - uses: Swatinem/rust-cache@v2
        with:
          key: core-msrv
      - run: cargo +1.85.0 build --locked --no-default-features
      - run: cargo +1.85.0 build --locked --no-default-features --features sprs_v0_11
      - run: cargo +1.85.0 test --manifest-path tests/core_consumer/Cargo.toml --locked

  core-wasm:
    name: Core consumer (WASM)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: Swatinem/rust-cache@v2
        with:
          workspaces: tests/core_consumer
      - run: cargo +stable install wasm-pack --version 0.15.0 --locked
      - run: cargo build --locked --no-default-features --target wasm32-unknown-unknown
      - run: wasm-pack test --node -- --locked
        working-directory: tests/core_consumer

  msrv:
    name: MSRV (Rust 1.87)
    runs-on: ubuntu-latest
    env:
      RUSTUP_TOOLCHAIN: 1.87.0
    steps:
      - uses: actions/checkout@v7
      - run: rustup toolchain install 1.87.0 --profile minimal --no-self-update
      - uses: Swatinem/rust-cache@v2
        with:
          key: msrv
      - run: bash scripts/test-backends.sh msrv

  versionary:
    if: github.event_name == 'push' && github.ref == 'refs/heads/main'
    needs: [test, core-msrv, core-wasm, msrv]
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
      issues: write
    steps:
      - uses: actions/checkout@v7
        with:
          fetch-depth: 0
          token: ${{ secrets.RELEASE_TOKEN || github.token }}
      - uses: jolars/versionary@v1
        with:
          token: ${{ secrets.RELEASE_TOKEN }}