Skip to content

Commit

Permalink
Integrate cargo vet in the CI / CD pipeline
Browse files Browse the repository at this point in the history
Cargo vet is a Rust tool designed to help ensure that code adheres to best practices and follows correct patterns. It performs static analysis to identify potential issues, such as unsafe code usage or problematic dependencies.
  • Loading branch information
francois141 committed Sep 17, 2024
1 parent db8910d commit 5be3321
Show file tree
Hide file tree
Showing 24 changed files with 52 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
echo ""
echo "QEMU version:"
qemu-system-riscv64 --version
- name: Test
- name: Miralis - Unit & integration tests
# Specify shell to enforce fail fast behavior, see:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
shell: bash
Expand Down Expand Up @@ -63,3 +63,8 @@ jobs:
just test
done
- name: Miralis - Linter
run: |
# Check if we have suspicious crates
cargo deny check
2 changes: 2 additions & 0 deletions benchmark_analyzer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "benchmark_analyzer"
version = "0.1.0"
edition = "2021"

license = "MIT"

[lib]
name = "benchmark"

Expand Down
2 changes: 2 additions & 0 deletions crates/abi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "miralis_abi"
version = "0.1.0"
edition = "2021"

license = "MIT"

[dependencies]
miralis_core = { path = "../core" }
log = { workspace = true }
Expand Down
2 changes: 2 additions & 0 deletions crates/config_helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "config_helpers"
version = "0.1.0"
edition = "2021"

license = "MIT"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
2 changes: 2 additions & 0 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ name = "miralis_core"
version = "0.1.0"
edition = "2021"

license = "MIT"

[dependencies]
2 changes: 2 additions & 0 deletions firmware/benchmark/csr_write/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "csr_write"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "csr_write"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/benchmark/ecall_benchmark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "ecall_benchmark"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "ecall_benchmark"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/breakpoint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "breakpoint"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "breakpoint"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/csr_ops/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "csr_ops"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "csr_ops"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/default/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "default"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "default"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/device/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "device"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "device"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/ecall/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "ecall"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "ecall"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/interrupt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "interrupt"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "interrupt"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/mcause/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "mcause"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "mcause"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/mepc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "mepc"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "mepc"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/mret/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "mret"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "mret"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/os_ctx_switch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "os_ctx_switch"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "os_ctx_switch"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/os_ecall/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "os_ecall"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "os_ecall"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/pmp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "pmp"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "pmp"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/sandbox/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "sandbox"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "sandbox"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions firmware/vectored_mtvec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "vectored_mtvec"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "vectored_mtvec"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions payload/hello_world/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "hello_world"
version = "0.1.0"
edition = "2021"

license = "mit"

[[bin]]
name = "hello_world"
path = "main.rs"
Expand Down
2 changes: 2 additions & 0 deletions runner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "runner"
version = "0.1.0"
edition = "2021"

license = "MIT"

[dependencies]
clap = { version = "4.4.11", features = ["derive"] }
serde = { version = "1.0.196", features = ["derive"] }
Expand Down
2 changes: 2 additions & 0 deletions src/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name = "miralis"
version = "0.1.0"
edition = "2021"

license = "MIT"

[[bin]]
name = "miralis"
path = "main.rs"
Expand Down

0 comments on commit 5be3321

Please sign in to comment.