rdkafka 0.39.0

Rust wrapper for librdkafka
Documentation
name: ci

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

env:
  rust_version: 1.85

jobs:
  lint:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ env.rust_version }}
          components: rustfmt, clippy
      - run: cargo fmt -- --check
      - run: cargo clippy -- -Dwarnings
      - run: cargo clippy --tests -- -Dwarnings
      - run: cargo test --doc

  check:
    strategy:
      matrix:
        include:
          - os: macos-15
          - os: windows-2025
            features: cmake-build,libz-static,curl-static
            rdkafka-sys-features: cmake-build,libz-static,curl-static
          - os: ubuntu-24.04
            features: tracing
          - os: ubuntu-24.04
            features: cmake-build,ssl-vendored,gssapi-vendored,libz-static,curl-static,zstd
            rdkafka-sys-features: cmake-build,ssl-vendored,gssapi-vendored,libz-static,curl-static,zstd
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
      - uses: lukka/get-cmake@latest
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ env.rust_version }}
      - run: cargo build --all-targets --verbose --features "${{ matrix.features }}"
      - run: cd rdkafka-sys && cargo test --features "${{ matrix.rdkafka-sys-features }}"

  # Use the `minimal-versions` resolver to ensure we're not claiming to support
  # an older version of a dependency than we actually do.
  check-minimal-versions:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          # The version of this toolchain doesn't matter much. It's only used to
          # generate the minimal-versions lockfile, not to actually run `cargo
          # check`.
          toolchain: nightly
          components: rustfmt, clippy
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ env.rust_version }}
      - run: rustup default ${{ env.rust_version }}
      - run: cargo +nightly -Z minimal-versions generate-lockfile
      # Default features and features that require optional dependencies should be
      # explicitly checked.
      - run: cargo check --features libz,tokio,tracing

  test:
    strategy:
      fail-fast: false
      # The test suite doesn't support concurrent runs.
      max-parallel: 1
      matrix:
        include:
          - kafka-version: "4.0"
          - kafka-version: "3.9"
          - kafka-version: "3.8"
          - kafka-version: "3.7"
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4
      - uses: lukka/get-cmake@latest
      - uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: ${{ env.rust_version }}
      - run: sudo apt-get update
      - run: sudo apt-get install -y libcurl4-openssl-dev
      # - run: sudo apt-get install -qy valgrind  # Valgrind currently disabled in testing
      - run: ./test_suite.sh
        env:
          KAFKA_VERSION: ${{ matrix.kafka-version }}
          TERM: xterm-256color