refactor: enforce layered crates and Rust audit gates

This commit is contained in:
Horldsence
2026-09-24 13:00:03 +08:00
parent af151525d1
commit 8a582fc102
67 changed files with 3918 additions and 581 deletions
+4 -5
View File
@@ -16,14 +16,13 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly -Zscript scripts/audit-rules.rs --self-test
- run: cargo +nightly -Zscript scripts/audit-rules.rs
- run: cargo fmt --all -- --check
- run: cargo clippy --workspace --all-targets -- -D warnings
- run: cargo test --workspace --all-targets
- name: enforce flat crate source
run: test -z "$(find crates/*/src -mindepth 2 -type d -print)"
- name: forbid unsafe and no_std markers
run: "! rg '\\bunsafe\\b|libc|no_std' crates Cargo.toml -g '*.rs' -g '*.toml'"
- name: optional plot feature
run: cargo check -p chassis-tune --features plot --all-targets
- name: deterministic tuning smoke
@@ -42,7 +41,7 @@ jobs:
sudo modprobe vcan
sudo ip link add dev vcan0 type vcan
sudo ip link set up vcan0
- run: cargo test -p socketcan@0.1.0 --test vcan -- --ignored --test-threads 1
- run: cargo test -p integration-tests --test socketcan_vcan -- --ignored --test-threads 1
cross-check:
runs-on: ubuntu-latest