Skip to content

Commit b9e3cb8

Browse files
committed
ci: clippy can have a single template
1 parent 8559a0c commit b9e3cb8

File tree

1 file changed

+21
-26
lines changed

1 file changed

+21
-26
lines changed

.github/workflows/build.yml

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -69,44 +69,40 @@ jobs:
6969
# Compilation check (hifive1) TODO
7070
# checkhifive1:
7171

72-
# Clippy (lm3s6965)
73-
clippylm3s6965:
74-
name: clippy (lm3s6965)
72+
# Clippy
73+
# TODO: clippy hifive1, esp32-c3
74+
clippy:
75+
name: clippy
7576
runs-on: ubuntu-22.04
7677
strategy:
7778
matrix:
78-
backend:
79-
- thumbv7
80-
- thumbv6
81-
- thumbv8-base
82-
- thumbv8-main
83-
toolchain:
84-
- stable
79+
input:
80+
- backend: thumbv7
81+
rustup-target: thumbv7m-none-eabi
82+
83+
- backend: thumbv6
84+
rustup-target: thumbv6m-none-eabi
85+
86+
- backend: thumbv8-base
87+
rustup-target: thumbv8m.base-none-eabi
88+
89+
- backend: thumbv8-main
90+
rustup-target: thumbv8m.main-none-eabi
91+
8592
steps:
8693
- name: Checkout
8794
uses: actions/checkout@v4
8895

89-
- name: Install Rust ${{ matrix.toolchain }}
90-
run: |
91-
rustup override set ${{ matrix.toolchain }}
92-
93-
- name: Configure Rust target (v6, v7, v8.b v8.m)
94-
run: |
95-
rustup target add thumbv7m-none-eabi
96-
rustup target add thumbv6m-none-eabi
97-
rustup target add thumbv8m.base-none-eabi
98-
rustup target add thumbv8m.main-none-eabi
96+
- name: Configure Rust target
97+
run: rustup target add ${{ matrix.input.rustup-target }}
9998

10099
- name: Add Rust component clippy
101100
run: rustup component add clippy
102101

103102
- name: Cache Dependencies
104103
uses: Swatinem/rust-cache@v2
105104

106-
- run: cargo xtask --deny-warnings --platform lm3s6965 --backend ${{ matrix.backend }} clippy
107-
108-
# Clippy (hifive1) TODO
109-
# clippyhifive1:
105+
- run: cargo xtask --deny-warnings --platform lm3s6965 --backend ${{ matrix.input.backend }} clippy
110106

111107
# Verify all examples, checks
112108
checkexamples:
@@ -749,8 +745,7 @@ jobs:
749745
- formatcheck
750746
- checklm3s6965
751747
# - checkhifive1 # TODO
752-
- clippylm3s6965
753-
# - clippyhifive1 # TODO
748+
- clippy
754749
- checkexamples
755750
- testexamples
756751
- tests

0 commit comments

Comments
 (0)