From 6c52e078d2921ba4a19f7fa5bb442a78dd6db11b Mon Sep 17 00:00:00 2001 From: max-ishere <47008271+max-ishere@users.noreply.github.com> Date: Tue, 13 Feb 2024 23:15:50 +0200 Subject: [PATCH] ci: Added more directories to cache The previous cache pattern was not capturing $CARGO_HOME dirs --- .github/workflows/cargo-build.yml | 10 +++++++++- .github/workflows/cargo-doc-pages.yml | 7 ++++++- .github/workflows/cargo-lint.yml | 7 ++++++- .github/workflows/cargo-test.yml | 7 ++++++- 4 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cargo-build.yml b/.github/workflows/cargo-build.yml index d3ca866..2169d4b 100644 --- a/.github/workflows/cargo-build.yml +++ b/.github/workflows/cargo-build.yml @@ -29,7 +29,12 @@ jobs: - uses: actions/cache@v4 with: - path: target/ + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ key: cargo-build-${{ hashFiles('Cargo.lock') }} restore-keys: | cargo-build-${{ hashFiles('Cargo.lock') }} @@ -38,3 +43,6 @@ jobs: - name: build run: cargo build --release ${{ matrix.target }} --keep-going --verbose + + - name: Debug $CARGO_HOME + run: echo $CARGO_HOME diff --git a/.github/workflows/cargo-doc-pages.yml b/.github/workflows/cargo-doc-pages.yml index 16863b1..1abef13 100644 --- a/.github/workflows/cargo-doc-pages.yml +++ b/.github/workflows/cargo-doc-pages.yml @@ -33,7 +33,12 @@ jobs: - uses: actions/cache@v4 with: - path: target/ + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ key: cargo-doc-${{ hashFiles('Cargo.lock') }} restore-keys: | cargo-doc-${{ hashFiles('Cargo.lock') }} diff --git a/.github/workflows/cargo-lint.yml b/.github/workflows/cargo-lint.yml index 5c7f1b7..99d4ad1 100644 --- a/.github/workflows/cargo-lint.yml +++ b/.github/workflows/cargo-lint.yml @@ -30,7 +30,12 @@ jobs: - uses: actions/cache@v4 with: - path: target/ + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ key: cargo-lint-${{ hashFiles('Cargo.lock') }} restore-keys: | cargo-lint-${{ hashFiles('Cargo.lock') }} diff --git a/.github/workflows/cargo-test.yml b/.github/workflows/cargo-test.yml index ed00165..6402c17 100644 --- a/.github/workflows/cargo-test.yml +++ b/.github/workflows/cargo-test.yml @@ -31,7 +31,12 @@ jobs: - uses: actions/cache@v4 with: - path: target/ + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ key: cargo-test-${{ hashFiles('Cargo.lock') }} restore-keys: | cargo-test-${{ hashFiles('Cargo.lock') }}