Skip to content

Commit 522ab52

Browse files
committed
ci: faster clippy + older caching fallback
1 parent 599655e commit 522ab52

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

.githooks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
git diff --quiet
33
dirty_workspace=$?
44
fmt_args="--check"
5-
clippy_args=""
5+
clippy_args="--no-deps"
66
if [ $dirty_workspace -eq 0 ]; then
77
fmt_args=""
88
clippy_args="--fix --allow-dirty"

.github/workflows/build.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,16 @@ jobs:
5656
~/.cargo/
5757
target/
5858
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
59+
restore-keys: |
60+
${{ runner.os }}-cargo-
5961
6062
- name: Install dependencies
6163
if: steps.deps-cache.outputs.cache-hit != 'true'
6264
run: |
6365
# TODO: rustup target add aarch64-unknown-linux-gnu
6466
# Linting tools
6567
cargo install cargo-shear
68+
cargo fetch --locked
6669
6770
- name: Build
6871
id: build
@@ -77,7 +80,7 @@ jobs:
7780
- name: Clippy
7881
id: clippy
7982
if: always()
80-
run: cargo clippy --profile ${{ env.build-type }} --locked -- --deny warnings
83+
run: cargo clippy --profile ${{ env.build-type }} --no-deps --locked -- --deny warnings
8184

8285
- name: Format
8386
id: format
@@ -129,4 +132,4 @@ jobs:
129132
path: |
130133
~/.cargo/
131134
target/
132-
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
135+
key: ${{ steps.deps-cache.outputs.cache-primary-key }}

0 commit comments

Comments
 (0)