azo 0.2.1

Library for interacting with ASIO drivers
name: CI

on:
  # `push` checks the branch itself, `pull_request` checks the merge result.
  push:
  pull_request:

# A second push to a branch cancels the run still going for the first one.
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always

jobs:
  clippy:
    # ASIO is Windows-only, and the build script runs `windows-bindgen`
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v5

      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy

      - name: Clippy (default features)
        run: cargo clippy --workspace --all-targets -- -D warnings

      - name: Clippy (all features)
        run: cargo clippy --workspace --all-targets --all-features -- -D warnings

      # Without `--workspace` the features of `azo-sys` are only whatever `azo`
      # forwards to it, which is what a dependent crate gets.
      - name: Clippy (`azo` on its own)
        run: cargo clippy --package azo --all-targets --all-features -- -D warnings

  publish-dry-run:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v5

      - uses: dtolnay/rust-toolchain@stable

      # `--workspace` verifies `azo` against the locally packaged `azo-sys`,
      # rather than the version already on crates.io.
      - name: Publish dry-run
        run: cargo publish --dry-run --workspace