mctx-core 0.3.0

Runtime-agnostic and portable IPv4 and IPv6 multicast sender library.
Documentation
name: CI

on:
  push:
  pull_request:

permissions:
  contents: read

jobs:
  rust:
    name: Rust (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy, rustfmt
      - name: Check formatting
        if: runner.os == 'Linux'
        run: cargo fmt --all -- --check
      - name: Lint all targets and features
        run: cargo clippy --workspace --all-targets --all-features -- -D warnings
      - name: Check raw-IP feature independently
        run: cargo check --workspace --no-default-features --features raw-ip --tests
      - name: Run tests
        run: cargo test --workspace --all-features

  msrv:
    name: Rust 1.88 MSRV
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@1.88.0
      - name: Check all targets and features
        run: cargo check --workspace --all-targets --all-features

  python:
    name: Python (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - uses: dtolnay/rust-toolchain@stable
      - name: Install bindings
        run: python -m pip install ./mctx-core-py
      - name: Run binding smoke tests
        run: python -m unittest discover -s mctx-core-py/python/tests -v

  security:
    name: Dependency audit
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: dtolnay/rust-toolchain@stable
      - name: Install cargo-audit
        run: cargo install cargo-audit --locked
      - name: Generate dependency lockfile
        run: cargo generate-lockfile
      - name: Audit dependencies
        run: cargo audit