Skip to content

Commit 6375db1

Browse files
d-e-s-oinsearchoflosttime
authored andcommitted
Make clippy separate job in CI
Similar to what we did earlier with cargo doc and cargo fmt, this change moves our clippy checks into a separate job into a separate CI job, which can run in parallel to everything else. The result is quicker error reporting but also a ~23s reduction of runtime of the "main" job. Signed-off-by: Daniel Müller <deso@posteo.net>
1 parent 141f091 commit 6375db1

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/rust.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
with:
4343
profile: minimal
4444
toolchain: ${{ matrix.rust }}
45-
components: rustfmt, clippy
45+
components: rustfmt
4646
override: true
4747
- name: Install deps
4848
run: sudo apt-get install -y clang-14 libelf-dev zlib1g-dev
@@ -57,9 +57,20 @@ jobs:
5757
run: cargo test --verbose --workspace --exclude runqslower -- --skip test_object --skip test_tc
5858
- name: Run BTF tests
5959
run: cd libbpf-rs && cargo test --verbose -- test_object test_tc
60-
- if: ${{ matrix.rust != 'nightly' }}
61-
name: Run clippy
62-
run: cargo clippy --tests -- -D warnings
60+
clippy:
61+
name: Lint with clippy
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v3
65+
- name: Install deps
66+
run: sudo apt-get install -y libelf-dev
67+
- uses: actions-rs/toolchain@v1
68+
with:
69+
profile: minimal
70+
toolchain: stable
71+
components: clippy
72+
override: true
73+
- run: cargo clippy --no-deps --all-targets --tests -- -D warnings
6374
rustfmt:
6475
name: Check code formatting
6576
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)