|
22 | 22 | toolchain: stable
|
23 | 23 | override: true
|
24 | 24 |
|
25 |
| - - name: Cache cargo registry |
26 |
| - uses: actions/cache@v3 |
27 |
| - with: |
28 |
| - path: ~/.cargo/registry |
29 |
| - key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }} |
30 |
| - restore-keys: ${{ runner.os }}-v2-cargo-registry- |
31 |
| - |
32 |
| - - name: Cache cargo index |
33 |
| - uses: actions/cache@v3 |
34 |
| - with: |
35 |
| - path: ~/.cargo/git |
36 |
| - key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }} |
37 |
| - restore-keys: ${{ runner.os }}-v2-cargo-index- |
38 |
| - |
39 |
| - - name: Cache cargo target dir |
40 |
| - uses: actions/cache@v3 |
41 |
| - with: |
42 |
| - path: target |
43 |
| - key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} |
44 |
| - restore-keys: ${{ runner.os }}-v2-cargo-build-target- |
| 25 | + - uses: Swatinem/rust-cache@v1 |
45 | 26 |
|
46 | 27 | - name: Run cargo check
|
47 | 28 | uses: actions-rs/cargo@v1
|
|
62 | 43 | toolchain: ${{ matrix.rust }}
|
63 | 44 | override: true
|
64 | 45 |
|
65 |
| - - name: Cache cargo registry |
66 |
| - uses: actions/cache@v3 |
67 |
| - with: |
68 |
| - path: ~/.cargo/registry |
69 |
| - key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }} |
70 |
| - restore-keys: ${{ runner.os }}-v2-cargo-registry- |
71 |
| - |
72 |
| - - name: Cache cargo index |
73 |
| - uses: actions/cache@v3 |
74 |
| - with: |
75 |
| - path: ~/.cargo/git |
76 |
| - key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }} |
77 |
| - restore-keys: ${{ runner.os }}-v2-cargo-index- |
78 |
| - |
79 |
| - - name: Cache cargo target dir |
80 |
| - uses: actions/cache@v3 |
81 |
| - with: |
82 |
| - path: target |
83 |
| - key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} |
84 |
| - restore-keys: ${{ runner.os }}-v2-cargo-build-target- |
| 46 | + - uses: Swatinem/rust-cache@v1 |
85 | 47 |
|
86 | 48 | - name: Copy minimal languages config
|
87 | 49 | run: cp .github/workflows/languages.toml ./languages.toml
|
@@ -119,26 +81,7 @@ jobs:
|
119 | 81 | override: true
|
120 | 82 | components: rustfmt, clippy
|
121 | 83 |
|
122 |
| - - name: Cache cargo registry |
123 |
| - uses: actions/cache@v3 |
124 |
| - with: |
125 |
| - path: ~/.cargo/registry |
126 |
| - key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }} |
127 |
| - restore-keys: ${{ runner.os }}-v2-cargo-registry- |
128 |
| - |
129 |
| - - name: Cache cargo index |
130 |
| - uses: actions/cache@v3 |
131 |
| - with: |
132 |
| - path: ~/.cargo/git |
133 |
| - key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }} |
134 |
| - restore-keys: ${{ runner.os }}-v2-cargo-index- |
135 |
| - |
136 |
| - - name: Cache cargo target dir |
137 |
| - uses: actions/cache@v3 |
138 |
| - with: |
139 |
| - path: target |
140 |
| - key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} |
141 |
| - restore-keys: ${{ runner.os }}-v2-cargo-build-target- |
| 84 | + - uses: Swatinem/rust-cache@v1 |
142 | 85 |
|
143 | 86 | - name: Run cargo fmt
|
144 | 87 | uses: actions-rs/cargo@v1
|
@@ -166,26 +109,7 @@ jobs:
|
166 | 109 | toolchain: stable
|
167 | 110 | override: true
|
168 | 111 |
|
169 |
| - - name: Cache cargo registry |
170 |
| - uses: actions/cache@v3 |
171 |
| - with: |
172 |
| - path: ~/.cargo/registry |
173 |
| - key: ${{ runner.os }}-v2-cargo-registry-${{ hashFiles('**/Cargo.lock') }} |
174 |
| - restore-keys: ${{ runner.os }}-v2-cargo-registry- |
175 |
| - |
176 |
| - - name: Cache cargo index |
177 |
| - uses: actions/cache@v3 |
178 |
| - with: |
179 |
| - path: ~/.cargo/git |
180 |
| - key: ${{ runner.os }}-v2-cargo-index-${{ hashFiles('**/Cargo.lock') }} |
181 |
| - restore-keys: ${{ runner.os }}-v2-cargo-index- |
182 |
| - |
183 |
| - - name: Cache cargo target dir |
184 |
| - uses: actions/cache@v3 |
185 |
| - with: |
186 |
| - path: target |
187 |
| - key: ${{ runner.os }}-v2-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} |
188 |
| - restore-keys: ${{ runner.os }}-v2-cargo-build-target- |
| 112 | + - uses: Swatinem/rust-cache@v1 |
189 | 113 |
|
190 | 114 | - name: Generate docs
|
191 | 115 | uses: actions-rs/cargo@v1
|
|
0 commit comments