socketcan 3.6.1

Linux SocketCAN library. Send and receive CAN frames via CANbus on Linux.
# GitHub Actions CI check for the 'socketcan' Rust crate
#
# It does the following:
# - Format check of the sources using nightly
# - Build check using the current stable compiler and the MSRV version.
#   - Check library, utils, examples, and tests
# - Clippy check using the MSRV compiler
#
# Note that the current MSRV predates the new cargo resolver, v3, so we go
# out of our way to use it from stable to create a Cargo.lock file that
# properly resolves dependencies for the MSRV.
#

on: [push, pull_request]

name: Continuous integration

env:
  CARGO_TERM_COLOR: always

jobs:
  fmt:
    name: Rustfmt
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          override: true
          components: rustfmt
      - run: cargo fmt --all -- --check

  build:
    name: Build
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - stable
          - 1.75.0
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}

      - name: Resolve dependencies for MSRV
        run: |
          mkdir -p $HOME/.cargo
          echo 'resolver.incompatible-rust-versions = "fallback"' > $HOME/.cargo/config.toml
          cargo +stable update

      - name: Library default build check
        run: cargo +${{ matrix.rust }} check

      - name: Tokio build check
        run: cargo +${{ matrix.rust }} check --all-targets --features=tokio,utils

      - name: smol build check
        run: cargo +${{ matrix.rust }} check --all-targets --features=smol,utils

      - name: Doc generation
        run: cargo +${{ matrix.rust }} doc --no-deps

      - name: Run tests
        run: cargo +${{ matrix.rust }} test

  clippy:
    name: Clippy
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: 1.75.0
          components: clippy

      - name: Resolve dependencies for MSRV
        run: |
          mkdir -p $HOME/.cargo
          echo 'resolver.incompatible-rust-versions = "fallback"' > $HOME/.cargo/config.toml
          cargo +stable update

      - name: Run clippy
        run: cargo +1.75.0 clippy -- -D warnings