ci: aim to increase cache effectiveness in the check and build job by adding a key based on minimal or latest versions of dependencies (because I saw in the logs that one would have to undo the other's work)

This commit is contained in:
J / Jacob Babich
2024-10-06 15:18:52 -04:00
parent 76ba24a895
commit cf7d4aca1c

View File

@@ -36,10 +36,12 @@ jobs:
matrix:
minimal_or_latest:
- build_command: cargo minimal-versions build --direct --verbose
cache_key: minimal
check_command: cargo minimal-versions check --direct --verbose
job_name_suffix: with minimal versions of direct dependencies
- build_command: cargo build --verbose
cache_key: latest
check_command: cargo check --verbose
job_name_suffix: (with latest (typically) versions of dependencies)
@@ -103,7 +105,7 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
shared-key: ${{ matrix.supporteds.target }}
shared-key: ${{ matrix.supporteds.target }}-${{ matrix.minimal_or_latest.cache_key }}
cache-on-failure: "true"
- name: Check