Skip to content

Commit 1f7f7ee

Browse files
committed
Enable cache for Cargo components of the build
1 parent 841bdaf commit 1f7f7ee

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/main.yml

+5
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ jobs:
105105
shell: bash
106106
- run: rustup target add ${{ matrix.target }}
107107
- run: rustup component add llvm-tools-preview
108+
- uses: Swatinem/rust-cache@v2
109+
with:
110+
key: ${{ matrix.target }}
108111
- name: Download compiler-rt reference sources
109112
run: |
110113
curl -L -o code.tar.gz https://github.com/rust-lang/llvm-project/archive/rustc/18.0-2024-02-13.tar.gz
@@ -133,6 +136,7 @@ jobs:
133136
submodules: true
134137
- name: Install stable `rustfmt`
135138
run: rustup set profile minimal && rustup default stable && rustup component add rustfmt
139+
- uses: Swatinem/rust-cache@v2
136140
- run: cargo fmt -- --check
137141

138142
clippy:
@@ -147,6 +151,7 @@ jobs:
147151
- name: Install nightly `clippy`
148152
run: |
149153
rustup set profile minimal && rustup default "nightly-$(curl -s https://rust-lang.github.io/rustup-components-history/x86_64-unknown-linux-gnu/clippy)" && rustup component add clippy
154+
- uses: Swatinem/rust-cache@v2
150155
- run: cargo clippy -- -D clippy::all
151156

152157
success:

0 commit comments

Comments
 (0)