name: Lint on: workflow_call: outputs: matrix-result: description: 'Matrix job result' value: ${{ jobs.lint.result }} env: RUSTFLAGS: -Dwarnings jobs: lint: strategy: fail-fast: false matrix: target: - x86_64-unknown-linux-musl - x86_64-pc-windows-msvc - aarch64-apple-darwin - x86_64-apple-darwin include: - target: x86_64-unknown-linux-musl os: ubuntu-24.04 display-os: Linux - target: x86_64-pc-windows-msvc os: windows-2025 display-os: Windows - target: aarch64-apple-darwin os: macos-26 display-os: macOS – aarch64 - target: x86_64-apple-darwin os: macos-26 display-os: macOS – x86_64 name: ${{ matrix.display-os }} runs-on: ${{ matrix.os }} steps: - name: Checkout Repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # 7.0.1 - name: Setup Rust Toolchain run: | rustup set profile minimal rustup component add clippy rustfmt rustup target add ${{ matrix.target }} - name: Install musl-gcc (Linux only) if: matrix.os == 'ubuntu-24.04' run: | sudo apt-get update sudo apt-get install -y musl-tools - name: Cache Dependencies uses: swatinem/rust-cache@d1527c8f67ef9af357290475d4af4b0fab8f12e0 # 2.9.3 - name: Run Rustfmt run: cargo fmt --all -- --check - name: Run Clippy run: cargo clippy --workspace --tests --target ${{ matrix.target }}