beve 8.0.0

Rust implementation of the BEVE (Binary Efficient Versatile Encoding) specification with serde support
Documentation
name: CI

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

env:
  CARGO_TERM_COLOR: always
  CXX: g++

jobs:
  lint-test:
    name: Rust ${{ matrix.toolchain }}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        toolchain: [stable, beta, nightly]
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4

      # Only a C++ compiler: `build.rs` shells out to `$CXX` for the Glaze
      # interop fixtures and links nothing native. The `mat` feature's HDF5
      # stack is `hdf5-pure`, which is pure Rust, so no libhdf5 is involved.
      - name: Install system dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y g++

      - name: Install toolchain
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.toolchain }}
          components: clippy, rustfmt

      - name: Cache cargo artifacts
        uses: Swatinem/rust-cache@v2

      - name: cargo fmt --check
        if: matrix.toolchain == 'stable'
        run: cargo fmt --all -- --check

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

      - name: cargo test (all features)
        run: cargo test --locked --all --all-features

      # Guard the default (mat-off) build: it is what most consumers get, and it
      # is the only configuration that compiles the `#[cfg(not(feature = "mat"))]`
      # paths, which `--all-features` never exercises.
      - name: cargo clippy (default features)
        if: matrix.toolchain == 'stable'
        run: cargo clippy --locked --all-targets -- -D warnings

      - name: cargo test (default features)
        if: matrix.toolchain == 'stable'
        run: cargo test --locked

  msrv:
    name: MSRV (Rust 1.96.1)
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4

      - name: Install system dependencies
        run: |
          sudo apt-get update
          sudo apt-get install -y g++

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

      - name: Cache cargo artifacts
        uses: Swatinem/rust-cache@v2

      - name: cargo check (all features)
        run: cargo check --locked --all-targets --all-features

      - name: cargo check (default features)
        run: cargo check --locked --all-targets

  # Runs the test suite on a big-endian target (s390x) under emulation, so the
  # little-endian/big-endian `#[cfg(target_endian)]` branches in the bulk
  # typed/complex codecs are actually exercised, not just compiled on LE. Uses
  # the default feature set (the `mat`/HDF5 stack is irrelevant to endianness and
  # not cross-built here).
  big-endian:
    name: Big-endian (s390x)
    runs-on: ubuntu-latest
    steps:
      - name: Checkout sources
        uses: actions/checkout@v4

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

      - name: Cache cargo artifacts
        uses: Swatinem/rust-cache@v2

      - name: Install cross
        run: cargo install cross --locked --version 0.2.5

      # `num-complex` explicitly: the bulk complex codec is the byte-order
      # sensitive path this job exists for, and its tests are behind that
      # feature. `mat` stays off; hdf5-pure has its own big-endian job.
      - name: cargo test on s390x (big-endian)
        run: cross test --locked --target s390x-unknown-linux-gnu --features num-complex