macaddr 1.0.0

MAC address types
Documentation
on: [push, pull_request]

name: Continuous integration

jobs:
  ci:
    name: CI
    runs-on: ubuntu-latest
    strategy:
      matrix:
        toolchain:
          - 1.31.0
          - 1.36.0
          - stable
    steps:
      - uses: actions/checkout@v1
      - name: Install Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.toolchain }}
          override: true
      - name: Run build
        uses: actions-rs/cargo@v1
        with:
          command: build
          args: --all-features
      - name: Run tests
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --all-features

  lints:
    name: Lints
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Install nightly toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true
          components: rustfmt, clippy
      - name: Run rustfmt
        uses: actions-rs/cargo@v1
        with:
          command: fmt
          args:  --all -- --check
      - name: Run clippy
        uses: actions-rs/cargo@v1
        with:
          command: clippy
          args: --all-targets --all-features -- -D warnings

  no_std:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Install stable toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - name: Install cargo-nono
        uses: actions-rs/cargo@v1
        with:
          command: install
          args: cargo-nono
      - name: Check no_std with default features
        uses: actions-rs/cargo@v1
        with:
          command: nono
          args: check
      - name: Check no_std with serde feature
        uses: actions-rs/cargo@v1
        with:
          command: nono
          args: check --features serde

  grcov:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Install nightly toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true

      - name: Execute tests
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --all --all-features
        env:
          CARGO_INCREMENTAL: 0
          RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Zno-landing-pads"

      - name: Gather coverage data
        id: coverage
        uses: actions-rs/grcov@v0.1

      - name: Coveralls upload
        uses: coverallsapp/github-action@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          path-to-lcov: ${{ steps.coverage.outputs.report }}