diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8b49dc9afe..651df2f75bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,7 @@ jobs: { chip: esp32s3, features: "direct-boot,eh1,smartled,ufmt" }, ] env: - RUSTFLAGS: "--cfg target_has_atomic=\"8\" --cfg target_has_atomic=\"16\" --cfg target_has_atomic=\"32\" --cfg target_has_atomic=\"ptr\"" + RUSTFLAGS: '--cfg target_has_atomic="8" --cfg target_has_atomic="16" --cfg target_has_atomic="32" --cfg target_has_atomic="ptr"' steps: - uses: actions/checkout@v2 - uses: esp-rs/xtensa-toolchain@v1.4 @@ -71,7 +71,36 @@ jobs: args: -Zbuild-std=core --examples --manifest-path=${{ matrix.chip_features.chip }}-hal/Cargo.toml --target=xtensa-${{ matrix.chip_features.chip }}-none-elf --features=${{ matrix.chip_features.features }} # -------------------------------------------------------------------------- - # Clippy + # Formatting & Clippy + + rustfmt: + name: Check formatting + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + package: + [ + esp-hal-common, + esp32-hal, + esp32c2-hal, + esp32c3-hal, + esp32s2-hal, + esp32s3-hal, + ] + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + components: rustfmt + - uses: Swatinem/rust-cache@v1 + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all --manifest-path=${{ matrix.package }}/Cargo.toml -- --check clippy-riscv: name: Run clippy on RISC-V builds