|
41 | 41 | # figure out native target triple while we're at it |
42 | 42 | - name: install rust-toolchain |
43 | 43 | run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV" |
| 44 | + - uses: Swatinem/rust-cache@v2 |
| 45 | + with: |
| 46 | + workspaces: | |
| 47 | + . |
| 48 | + tests/difftests/tests |
44 | 49 | # Fetch dependencies in a separate step to clearly show how long each part |
45 | 50 | # of the testing takes |
46 | 51 | - name: cargo fetch --locked |
|
94 | 99 | stripdown: true |
95 | 100 | - name: install rust-toolchain |
96 | 101 | run: cargo version |
| 102 | + - uses: Swatinem/rust-cache@v2 |
| 103 | + with: |
| 104 | + workspaces: | |
| 105 | + . |
| 106 | + tests/difftests/tests |
97 | 107 | - name: cargo fetch --locked |
98 | 108 | run: cargo fetch --locked --target ${{ matrix.target }} |
99 | 109 |
|
@@ -138,6 +148,11 @@ jobs: |
138 | 148 | stripdown: true |
139 | 149 | - name: install rust-toolchain |
140 | 150 | run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV" |
| 151 | + - uses: Swatinem/rust-cache@v2 |
| 152 | + with: |
| 153 | + workspaces: | |
| 154 | + . |
| 155 | + tests/difftests/tests |
141 | 156 | - name: cargo fetch --locked |
142 | 157 | run: cargo fetch --locked --target $TARGET |
143 | 158 | - name: compiletest |
@@ -173,6 +188,11 @@ jobs: |
173 | 188 | sudo apt install -y xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers |
174 | 189 | - name: install rust-toolchain |
175 | 190 | run: echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV" |
| 191 | + - uses: Swatinem/rust-cache@v2 |
| 192 | + with: |
| 193 | + workspaces: | |
| 194 | + . |
| 195 | + tests/difftests/tests |
176 | 196 | - name: cargo fetch --locked |
177 | 197 | run: cargo fetch --locked --target $TARGET |
178 | 198 | - name: cargo fetch --locked difftests |
@@ -220,6 +240,11 @@ jobs: |
220 | 240 | # cargo version is a random command that forces the installation of rust-toolchain |
221 | 241 | - name: install rust-toolchain |
222 | 242 | run: cargo version |
| 243 | + - uses: Swatinem/rust-cache@v2 |
| 244 | + with: |
| 245 | + workspaces: | |
| 246 | + . |
| 247 | + tests/difftests/tests |
223 | 248 | - name: Install rustup components |
224 | 249 | run: rustup component add rustfmt clippy |
225 | 250 | - name: cargo fetch --locked |
|
0 commit comments