From cf7d4aca1c0c57f5c2ba8b010eeb058c838cfb70 Mon Sep 17 00:00:00 2001 From: J / Jacob Babich Date: Sun, 6 Oct 2024 15:18:52 -0400 Subject: [PATCH] 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) --- .github/workflows/check-and-build-and-test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-and-build-and-test.yml b/.github/workflows/check-and-build-and-test.yml index ef38d46..0113b89 100644 --- a/.github/workflows/check-and-build-and-test.yml +++ b/.github/workflows/check-and-build-and-test.yml @@ -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