Skip to content

Commit 84d3453

Browse files
Wassasinjerrysxie
andauthored
CI improvements and miscellaneous feedback (#24)
Processing feedback from PR #19: - [x] Fixed issue with `log` feature not compiling for /libs (added to CI as well) - [x] Renamed anonymous `N` const parameter to `BLOCK_SIZE` and explained what it is for. - [x] Reverted hard-copy `device-driver` generated manifest and fixed building in CI. - [x] Fix clippy warnings and formatting for `bootloader-tool`. - [x] Added `bootloader-tool` to CI, with exception of `cargo deny`. - [x] Moved away from `serde_yaml` and use `serde_json` instead for `bootloader-tool`. (we are only serializing, and yaml is a superset of json) --------- Co-authored-by: Jerry Xie <139205137+jerrysxie@users.noreply.github.com>
1 parent 3116446 commit 84d3453

File tree

29 files changed

+663
-2328
lines changed

29 files changed

+663
-2328
lines changed

.github/workflows/check.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ jobs:
4444
- name: cargo fmt --check (examples)
4545
run: cargo fmt --check
4646
working-directory: "./examples/rt685s"
47+
- name: cargo fmt --check (bootloader-tool)
48+
run: cargo fmt --check
49+
working-directory: "./bootloader-tool"
4750

4851
clippy:
4952
runs-on: ubuntu-latest
@@ -65,7 +68,7 @@ jobs:
6568
uses: dtolnay/rust-toolchain@master
6669
with:
6770
toolchain: ${{ matrix.toolchain }}
68-
components: clippy
71+
components: clippy,rustfmt
6972
- name: rustup target add ${{ matrix.target }}
7073
run: rustup target add ${{ matrix.target }}
7174
- name: cargo clippy (libs)
@@ -82,6 +85,13 @@ jobs:
8285
clippy_flags: -- -F clippy::suspicious -D clippy::correctness -F clippy::perf -F clippy::style
8386
github_token: ${{ secrets.GITHUB_TOKEN }}
8487
workdir: "./examples/rt685s"
88+
- name: cargo clippy (bootloader-tool)
89+
uses: giraffate/clippy-action@v1
90+
with:
91+
reporter: "github-pr-check"
92+
clippy_flags: -- -D clippy::suspicious -D clippy::correctness -D clippy::perf -D clippy::style
93+
github_token: ${{ secrets.GITHUB_TOKEN }}
94+
workdir: "./bootloader-tool"
8595

8696
# Enable once we have a released crate
8797
# semver:
@@ -116,6 +126,8 @@ jobs:
116126
submodules: true
117127
- name: Install nightly
118128
uses: dtolnay/rust-toolchain@nightly
129+
with:
130+
components: rustfmt # required for device-driver
119131
- name: rustup target add ${{ matrix.target }}
120132
run: rustup target add ${{ matrix.target }}
121133
- name: cargo doc (libs)
@@ -145,6 +157,8 @@ jobs:
145157

146158
- name: Install stable
147159
uses: dtolnay/rust-toolchain@stable
160+
with:
161+
components: rustfmt # required for device-driver
148162

149163
- name: rustup target add thumbv8m.main-none-eabihf
150164
run: rustup target add thumbv8m.main-none-eabihf
@@ -202,13 +216,18 @@ jobs:
202216
target: [thumbv8m.main-none-eabihf]
203217
name: ubuntu / MSRV ${{ matrix.msrv }}
204218
steps:
219+
- name: Install libudev (linux)
220+
run: |
221+
sudo apt update
222+
sudo apt install -y libudev-dev
205223
- uses: actions/checkout@v4
206224
with:
207225
submodules: true
208226
- name: Install ${{ matrix.msrv }}
209227
uses: dtolnay/rust-toolchain@master
210228
with:
211229
toolchain: ${{ matrix.msrv }}
230+
components: rustfmt # required for device-driver
212231
- name: rustup target add ${{ matrix.target }}
213232
run: rustup target add ${{ matrix.target }}
214233
- name: cargo +${{ matrix.msrv }} check (libs)
@@ -217,3 +236,6 @@ jobs:
217236
- name: cargo +${{ matrix.msrv }} check (examples)
218237
run: cargo check
219238
working-directory: "./examples/rt685s"
239+
- name: cargo +${{ matrix.msrv }} check (bootloader-tool)
240+
run: cargo check
241+
working-directory: "./bootloader-tool"

0 commit comments

Comments
 (0)