fit-sdk-rust 0.2.1

Pure-Rust implementation of the Garmin FIT (Flexible and Interoperable Data Transfer) protocol.
Documentation
name: CI

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

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: -D warnings

jobs:
  test:
    name: Test / ${{ matrix.rust }} / ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        # Cover the latest stable on Linux/macOS/Windows, and the declared
        # MSRV (rust-version in Cargo.toml) on Linux so regressions surface
        # immediately. The MSRV row gates the published `rust-version` field.
        include:
          - { os: ubuntu-latest,  rust: stable }
          - { os: macos-latest,   rust: stable }
          - { os: windows-latest, rust: stable }
          - { os: ubuntu-latest,  rust: "1.75" }
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.rust }}
      - uses: Swatinem/rust-cache@v2
      - name: Build (default features)
        run: cargo build --all-targets --verbose
      - name: Test (default features)
        run: cargo test --all-targets --verbose
      - name: Build (no default features)
        run: cargo build --no-default-features --verbose
      - name: Test (no default features)
        # `--lib` because some integration tests assume the chrono feature.
        run: cargo test --lib --no-default-features --verbose

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo clippy --all-targets --all-features -- -D warnings

  fmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt
      - run: cargo fmt --all -- --check

  doc:
    name: Docs (cargo doc)
    runs-on: ubuntu-latest
    env:
      # Warnings in docs (broken intra-doc links, etc.) become errors so the
      # docs.rs build can't silently regress.
      RUSTDOCFLAGS: -D warnings
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - run: cargo doc --no-deps --all-features