rustic_cdc 0.3.1

A library for performing Content-Defined Chunking (CDC) on data streams.
Documentation
name: Continuous Integration

on:
  pull_request:
    paths-ignore:
      - "**/*.md"
  push:
    branches:
      - main
      - "renovate/**"
    paths-ignore:
      - "**/*.md"
  schedule:
    - cron: "0 0 * * 0"
  merge_group:
    types: [checks_requested]

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
  cancel-in-progress: true

jobs:
  check:
    name: Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
        with:
          toolchain: stable
      - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2
      - name: Run Cargo Check
        run: cargo check --all-features --workspace

  fmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
        with:
          toolchain: stable
          components: rustfmt
      - name: Run Cargo Fmt
        run: cargo fmt --all -- --check

  clippy:
    name: Clippy
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
        with:
          toolchain: stable
          components: clippy
      - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2
      - name: Run clippy
        run: cargo clippy --all-targets --all-features -- -D warnings

  test:
    name: Test
    runs-on: ${{ matrix.job.os }}
    strategy:
      matrix:
        rust: [stable]
        job:
          - os: macos-latest
          - os: ubuntu-latest
          - os: windows-latest
    steps:
      - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
        if: github.event_name != 'pull_request'
        with:
          fetch-depth: 0

      - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
        if: github.event_name == 'pull_request'
        with:
          ref: ${{ github.event.pull_request.head.sha }}
          fetch-depth: 0

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
        with:
          toolchain: stable
      - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2
      - name: Run Cargo Test
        run: cargo test -r --all-targets --all-features --workspace

  docs:
    name: Build docs
    runs-on: ${{ matrix.job.os }}
    strategy:
      matrix:
        rust: [stable]
        job:
          - os: macos-latest
          - os: ubuntu-latest
          - os: windows-latest
    steps:
      - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
        if: github.event_name != 'pull_request'
        with:
          fetch-depth: 0

      - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
        if: github.event_name == 'pull_request'
        with:
          ref: ${{ github.event.pull_request.head.sha }}
          fetch-depth: 0

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
        with:
          toolchain: stable
      - uses: Swatinem/rust-cache@a95ba195448af2da9b00fb742d14ffaaf3c21f43 # v2
      - name: Run Cargo Doc
        run: cargo doc --no-deps --all-features --workspace --examples