flowscope 0.20.0

Passive flow & session tracking for packet capture (runtime-free, cross-platform)
Documentation
name: Fuzz smoke

# Short, time-boxed fuzz runs on every push / PR — designed to
# catch regressions cheap, not to find new bugs. A longer
# scheduled hunt belongs in a separate job. Issue #20.

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

env:
  CARGO_TERM_COLOR: always
  FUZZ_TIME_PER_TARGET: 20  # seconds

jobs:
  smoke:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        target:
          - arp
          - cdp
          - dhcp
          - dns_udp
          - dns_tcp
          - http
          - icmp
          - lldp
          - ndp
          - ntp
          - ssdp
          - ssh
          - tftp
          - tls
          - tls_handshake
          - layers
    steps:
      - uses: actions/checkout@v4
      - name: Install nightly toolchain
        run: rustup toolchain install nightly --profile minimal
      - name: Cache cargo registry + fuzz target + cargo-fuzz binary
        uses: actions/cache@v4
        with:
          path: |
            ~/.cargo/registry
            ~/.cargo/git
            ~/.cargo/bin/cargo-fuzz
            fuzz/target
          key: fuzz-${{ runner.os }}-${{ hashFiles('Cargo.lock', 'fuzz/Cargo.toml') }}
          restore-keys: |
            fuzz-${{ runner.os }}-
      - name: Install cargo-fuzz
        # Install only when the cache miss left us without the
        # binary — `cargo install` refuses to overwrite an existing
        # binary without `--force`, which would defeat the cache.
        # No `|| true` swallowing the exit code: a genuine install
        # failure here must fail the job (otherwise the run step
        # later misleads with `no such command: fuzz`).
        run: |
          if ! command -v cargo-fuzz >/dev/null 2>&1; then
            cargo install cargo-fuzz --locked --version 0.13.1
          else
            echo "cargo-fuzz already installed: $(cargo-fuzz --version)"
          fi
      - name: Verify cargo-fuzz is on PATH
        run: cargo +nightly fuzz --version
      - name: Smoke ${{ matrix.target }} (${{ env.FUZZ_TIME_PER_TARGET }}s)
        run: |
          cargo +nightly fuzz run ${{ matrix.target }} -- \
            -max_total_time=${FUZZ_TIME_PER_TARGET} \
            -timeout=10 \
            -rss_limit_mb=2048