Cache test deps on Windows
This commit is contained in:
parent
c13c69be3d
commit
3c33edfd43
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -223,6 +223,7 @@ jobs:
|
||||
extra_test_args: --workspace --exclude tokio-boring --exclude hyper-boring
|
||||
env:
|
||||
CARGO_HOME: ${{ github.workspace }}/.cache/cargo
|
||||
CARGO_BUILD_BUILD_DIR: ${{ github.workspace }}/.cache/build-dir
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@ -293,6 +294,17 @@ jobs:
|
||||
- name: Set Android Linker path
|
||||
if: endsWith(matrix.thing, '-android')
|
||||
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"
|
||||
- name: Fetch deps
|
||||
run: cargo fetch --target ${{ matrix.target }}
|
||||
shell: bash
|
||||
env: ${{ matrix.custom_env }}
|
||||
# Windows builds are the slowest
|
||||
- name: Cache deps in Windows tests
|
||||
if: startsWith(matrix.os, 'windows')
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .cache/build-dir # CARGO_BUILD_BUILD_DIR
|
||||
key: test-${{ matrix.target }}-${{ hashFiles('Cargo.lock') }}
|
||||
- name: Build tests
|
||||
# We `build` because we want the linker to verify we are cross-compiling correctly for check-only targets.
|
||||
run: cargo build -v --target ${{ matrix.target }} --tests ${{ matrix.extra_test_args }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user