speed-cli 1.0.0

Comprehensive multi-protocol network performance testing CLI (TCP, UDP, QUIC, HTTP/1.1, HTTP/2, h2c, HTTP/3)
name: CI

on:
  push:
    branches: [master]
  pull_request:

concurrency:
  group: ci-${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

permissions:
  contents: read

jobs:
  check:
    name: Static checks
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      # Installs the tools pinned in mise.toml (nextest, machete, typos, ...).
      # Rust itself comes from rust-toolchain.toml via the runner's rustup.
      - uses: jdx/mise-action@v2
      # `mise run check` fans fmt-check/clippy/machete out in parallel. On a cold
      # runner each cargo proxy lazily reconciles the pinned toolchain *and the
      # components rust-toolchain.toml declares* (clippy, rustfmt) at the same
      # time, racing on rustup's shared download dir and corrupting each other's
      # downloads ("could not rename ... No such file or directory"). A bare
      # `cargo --version` only materializes the base toolchain, leaving the
      # clippy/rustfmt component downloads to still race — so install the
      # toolchain *with* those components once, up front and serially.
      - name: Install Rust toolchain + components (serial; avoids the rustup race)
        run: rustup toolchain install --profile minimal --component clippy,rustfmt --no-self-update
      - name: fmt + clippy + typos + machete
        run: mise run check

  test:
    name: Test (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
      - uses: actions/checkout@v4
      - uses: jdx/mise-action@v2
      # aws-lc-rs (the rustls/quinn crypto provider) builds aws-lc-sys via
      # CMake, which needs a discoverable MSVC toolchain to choose a generator
      # plus NASM to assemble. Neither is set up by default on the runner.
      - name: Set up MSVC environment (Windows)
        if: runner.os == 'Windows'
        uses: ilammy/msvc-dev-cmd@v1
      - name: Install NASM (Windows)
        if: runner.os == 'Windows'
        uses: ilammy/setup-nasm@v1
      - name: nextest + doctests
        run: mise run test
        env:
          RUST_BACKTRACE: "1"