openmassspec-core 1.1.0

Shared types, traits, and mzML writer for open Rust mass-spec parsers.
Documentation
# CI for OpenMassSpecCore.
#
# Standalone crate, no path-dependent siblings. Runs fmt + clippy + test
# on Linux and macOS, a 1.85 MSRV check, and mzML schema validation of
# the canonical writer's output against the vendored PSI-MS XSD.

name: CI

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

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: -D warnings

jobs:
  rust:
    name: Rust (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt, clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo fmt --all -- --check
      - run: cargo clippy --workspace --all-features --all-targets -- -D warnings
      - run: cargo test --workspace --all-features

  msrv:
    name: MSRV check (1.85)
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: 1.85
      - uses: Swatinem/rust-cache@v2
      - run: cargo check --workspace --all-features

  validate-mzml:
    name: mzML XSD validation
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - name: Emit synthetic mzML from the canonical writer
        run: |
          cargo run --release --example emit_sample_mzml -- \
            sample_plain.mzML sample_indexed.mzML
      - name: Ensure xmllint is available
        run: command -v xmllint || (sudo apt-get update -qq && sudo apt-get install -y -qq libxml2-utils)
      - name: Validate against PSI-MS XSD
        run: |
          # Plain document (root <mzML>) validates against the base schema;
          # the indexed document (root <indexedmzML>) validates against the
          # index wrapper, which includes the base schema.
          xmllint --noout --schema schema/mzML1.1.0.xsd sample_plain.mzML
          xmllint --noout --schema schema/mzML1.1.2_idx.xsd sample_indexed.mzML