Skip to content

Commit 971b7e6

Browse files
authored
chore(ci): add cargo-deny, deny warnings, and dependency policy fixes (#59)
Align spur-cloud CI with spur: run cargo deny check, set RUSTFLAGS="-D warnings", and keep clippy --locked with -W clippy::all. Add deny.toml (licenses, sources allow-git for ROCm/spur, bans) and fix license metadata on workspace crates (license/publish inheritance). Clarify Apache-2.0 for git-sourced spur-proto. Update Cargo.lock for RUSTSEC advisories (rand 0.8.6+, rustls-webpki 0.103.13, rustls 0.23.40). Pin spur-proto to ROCm/spur v0.3.0 tag. Resolve Clippy warnings without allow(dead_code) or allow(too_many_arguments): parameter structs for session/Spur client calls, expose DB/API fields, OIDC issuer check, and small lint fixes. Align frontend Session/UserProfile types with the API.
1 parent 7c09444 commit 971b7e6

6 files changed

Lines changed: 91 additions & 26 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,23 @@ env:
1212
RUSTFLAGS: "-D warnings"
1313

1414
jobs:
15+
deny:
16+
runs-on: ubuntu-latest
17+
env:
18+
CARGO_DENY_VERSION: "0.19.6"
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
- name: Install Rust toolchain
23+
uses: dtolnay/rust-toolchain@stable
24+
25+
- name: Install cargo-deny
26+
run: |
27+
curl -sL "https://github.com/EmbarkStudios/cargo-deny/releases/download/${CARGO_DENY_VERSION}/cargo-deny-${CARGO_DENY_VERSION}-x86_64-unknown-linux-musl.tar.gz" | tar xz -C /usr/local/bin --strip-components=1
28+
29+
- name: Check dependencies
30+
run: cargo deny check
31+
1532
build-and-test:
1633
runs-on: ubuntu-latest
1734
steps:

Cargo.lock

Lines changed: 25 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ members = [
99
version = "0.3.0"
1010
edition = "2021"
1111
license = "Apache-2.0"
12+
publish = false
1213
repository = "https://github.com/ROCm/spur-cloud"
1314

1415
[workspace.dependencies]
@@ -67,7 +68,7 @@ futures-util = "0.3"
6768
bytes = "1"
6869
url = "2"
6970
base64 = "0.22"
70-
rand = "0.8"
71+
rand = "0.8.6"
7172
sha2 = "0.10"
7273
semver = "1"
7374

crates/spur-cloud-api/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
name = "spur-cloud-api"
33
version.workspace = true
44
edition.workspace = true
5+
license.workspace = true
6+
publish.workspace = true
57

68
[[bin]]
79
name = "spur-cloud-api"

crates/spur-cloud-common/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
name = "spur-cloud-common"
33
version.workspace = true
44
edition.workspace = true
5+
license.workspace = true
6+
publish.workspace = true
57

68
[dependencies]
79
serde.workspace = true

deny.toml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
[graph]
2+
all-features = true
3+
4+
[advisories]
5+
yanked = "warn"
6+
unmaintained = "workspace"
7+
8+
[licenses]
9+
confidence-threshold = 0.8
10+
11+
allow = [
12+
"MIT",
13+
"Apache-2.0",
14+
"Apache-2.0 WITH LLVM-exception",
15+
"BSD-2-Clause",
16+
"BSD-3-Clause",
17+
"ISC",
18+
"Unicode-3.0",
19+
"Zlib",
20+
"BSL-1.0",
21+
"Unlicense",
22+
"CDLA-Permissive-2.0",
23+
]
24+
25+
# Git-sourced spur-proto uses license.workspace = true; synthesized manifest has no license field.
26+
[[licenses.clarify]]
27+
name = "spur-proto"
28+
expression = "Apache-2.0"
29+
license-files = [
30+
{ path = "../../LICENSE", hash = 0x001c7e6c },
31+
]
32+
33+
[bans]
34+
multiple-versions = "warn"
35+
wildcards = "deny"
36+
allow-wildcard-paths = true
37+
38+
[sources]
39+
unknown-registry = "deny"
40+
unknown-git = "deny"
41+
allow-git = [
42+
"https://github.com/ROCm/spur",
43+
]

0 commit comments

Comments
 (0)