afe4404 0.2.4

AFE4404 driver for Rust embedded-hal.
Documentation
#file: noinspection SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection
name: build
on: [push, pull_request]

env:
  rust_toolchain: nightly

jobs:
  compile:
    name: Compile
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        target:
          - riscv32imc-esp-espidf
          - xtensa-esp32-espidf
          - xtensa-esp32s2-espidf
          - xtensa-esp32s3-espidf
        idf-version:
          - release/v4.4
          - release/v5.0
    steps:
      - name: Setup | Checkout
        uses: actions/checkout@v3

      - name: Setup | Rust
        if: matrix.target == 'riscv32imc-esp-espidf'
        uses: dtolnay/rust-toolchain@v1
        with:
          toolchain: ${{ env.rust_toolchain }}
          components: rustfmt, clippy, rust-src

      - name: Setup | Rust for Xtensa
        if: matrix.target != 'riscv32imc-esp-espidf'
        uses: esp-rs/xtensa-toolchain@v1.5
        with:
          default: true

      - name: Build | Format Check
        run: cargo fmt -- --check

      - name: Build | Clippy
        env:
          ESP_IDF_VERSION: ${{ matrix.idf-version }}
          # ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults
          RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}"
        run: cargo clippy --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings

      - name: Build | Compile
        env:
          ESP_IDF_VERSION: ${{ matrix.idf-version }}
          # ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults
          RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}"
        run: cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort