|
15 | 15 | command: rustc --version; cargo --version; rustup --version |
16 | 16 | - run: |
17 | 17 | name: Add Rust components |
18 | | - command: rustup component add clippy rustfmt |
| 18 | + command: rustup component add rustfmt |
19 | 19 | - restore_cache: |
20 | 20 | keys: |
21 | 21 | - cargocache-v3-libwasmvm_sanity-rust:1.67.0-{{ checksum "libwasmvm/Cargo.lock" }} |
|
39 | 39 | name: Check Rust formatting |
40 | 40 | working_directory: libwasmvm |
41 | 41 | command: cargo fmt -- --check |
42 | | - - run: |
43 | | - name: Run linter |
44 | | - working_directory: libwasmvm |
45 | | - command: cargo clippy --all-targets -- -D warnings |
46 | 42 | - run: |
47 | 43 | name: Run unit tests |
48 | 44 | working_directory: libwasmvm |
|
68 | 64 | - libwasmvm/target/release/deps |
69 | 65 | key: cargocache-v3-libwasmvm_sanity-rust:1.67.0-{{ checksum "libwasmvm/Cargo.lock" }} |
70 | 66 |
|
| 67 | + libwasmvm_clippy: |
| 68 | + parameters: |
| 69 | + rust-version: |
| 70 | + type: string |
| 71 | + docker: |
| 72 | + - image: rust:<< parameters.rust-version >> |
| 73 | + steps: |
| 74 | + - checkout |
| 75 | + - run: |
| 76 | + name: Version information |
| 77 | + command: rustc --version && cargo --version |
| 78 | + - restore_cache: |
| 79 | + keys: |
| 80 | + - v3-libwasmvm_clippy-rust:<< parameters.rust-version >>-{{ checksum "libwasmvm/Cargo.lock" }} |
| 81 | + - v3-libwasmvm_clippy-rust:<< parameters.rust-version >>- |
| 82 | + - run: |
| 83 | + name: Add clippy component |
| 84 | + command: rustup component add clippy |
| 85 | + - run: |
| 86 | + name: Run clippy |
| 87 | + working_directory: libwasmvm |
| 88 | + command: cargo clippy --all-targets -- -D warnings |
| 89 | + - save_cache: |
| 90 | + paths: |
| 91 | + - ~/.cargo/registry |
| 92 | + - libwasmvm/target/debug/.fingerprint |
| 93 | + - libwasmvm/target/debug/build |
| 94 | + - libwasmvm/target/debug/deps |
| 95 | + - libwasmvm/target/release/.fingerprint |
| 96 | + - libwasmvm/target/release/build |
| 97 | + - libwasmvm/target/release/deps |
| 98 | + key: v3-libwasmvm_clippy-rust:<< parameters.rust-version >>-{{ checksum "libwasmvm/Cargo.lock" }} |
| 99 | + |
71 | 100 | # This performs all the Rust debug builds on Windows. Similar to libwasmvm_sanity |
72 | 101 | # but avoids duplicating things that are not platform dependent. |
73 | 102 | libwasmvm_sanity_windows: |
@@ -387,6 +416,11 @@ workflows: |
387 | 416 | - libwasmvm_sanity |
388 | 417 | # Temporarily disabled. This check is still running on main. |
389 | 418 | # - libwasmvm_sanity_windows |
| 419 | + - libwasmvm_clippy: |
| 420 | + matrix: |
| 421 | + parameters: |
| 422 | + # Run with MSRV and some modern stable Rust |
| 423 | + rust-version: ["1.67.0", "1.73.0"] |
390 | 424 | - libwasmvm_audit |
391 | 425 | - format-go |
392 | 426 | - wasmvm_no_cgo |
|
0 commit comments