Skip to content

Commit 220968a

Browse files
committed
ci: add a weekly clippy check using Rust stable
Rust stable releases often add new lint checks that make guest-components packages to fail CI (we run with -D warnings). To avoid failing CI blocking PRs because rust stable CI checks won't pass, we pin to a fixed toolcain version. However, at the same time we want to be sure the code passes stable lint checks. Add a weekly non-blocking check using Rust stable to give us an indication if the code needs to be improved to comply with the latest stable lint checks. Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
1 parent d098e27 commit 220968a

1 file changed

Lines changed: 59 additions & 0 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Run clippy checks for Rust stable
2+
3+
on:
4+
# run every Sunday
5+
schedule:
6+
- cron: '0 3 * * 6'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
clippy:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
package:
17+
- api-server-rest
18+
- coco_keyprovider
19+
- crypto
20+
- resource_uri
21+
- kbs_protocol
22+
- confidential-data-hub
23+
- kms
24+
- image-rs
25+
- ocicrypt-rs
26+
include:
27+
- package: attestation-agent
28+
feature-parameters: "--no-default-features --features rust-crypto,kbs,all-attesters,bin,ttrpc"
29+
- package: kbc
30+
feature-parameters: "--no-default-features --features openssl,cc_kbc,all-attesters"
31+
runs-on: ubuntu-24.04
32+
steps:
33+
- name: Code checkout
34+
uses: actions/checkout@v4
35+
with:
36+
fetch-depth: 1
37+
38+
- name: Install Rust toolchain
39+
uses: actions-rust-lang/setup-rust-toolchain@v1
40+
with:
41+
toolchain: stable
42+
override: true
43+
components: rustfmt, clippy
44+
45+
- name: Install protoc
46+
run:
47+
sudo apt update && sudo apt install -y protobuf-compiler
48+
49+
- name: Install TPM dependencies
50+
run: |
51+
sudo apt install -y libtss2-dev
52+
53+
- name: Install dm-verity dependencies
54+
run: |
55+
sudo apt install -y libdevmapper-dev
56+
57+
- name: Run rust lint checks (${{matrix.package}})
58+
run:
59+
cargo clippy -p ${{matrix.package}} ${{matrix.feature-parameters}} -- -D warnings

0 commit comments

Comments
 (0)