Skip to content

Commit f427c38

Browse files
committed
test cache
1 parent d691758 commit f427c38

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,18 @@ jobs:
226226
- name: Set Android Linker path
227227
if: endsWith(matrix.thing, '-android')
228228
run: echo "CARGO_TARGET_$(echo ${{ matrix.target }} | tr \\-a-z _A-Z)_LINKER=$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin/$(echo ${{ matrix.target }} | sed s/armv7/armv7a/)21-clang++" >> "$GITHUB_ENV"
229+
- name: Create lockfile
230+
run: cargo generate-lockfile
231+
- name: Cache cargo registry
232+
uses: actions/cache@v4
233+
with:
234+
path: ~/.cargo/registry/cache
235+
key: registry-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
236+
- name: Cache target directory
237+
uses: actions/cache@v4
238+
with:
239+
path: target
240+
key: tests-target-${{ runner.os }}-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }}
229241
- name: Build tests
230242
# We `build` because we want the linker to verify we are cross-compiling correctly for check-only targets.
231243
run: cargo build --target ${{ matrix.target }} --tests ${{ matrix.extra_test_args }}

0 commit comments

Comments
 (0)