1
0
mirror of https://github.com/fluencelabs/rust-libp2p synced 2025-07-15 01:21:35 +00:00

ci(caching): split caches by matrix variables ()

Previously, some of the caches for these job runs were overlapping. By incorporating the relevant matrix variables into the cache key, every instance of this job gets its own cache.
This commit is contained in:
Thomas Eizinger
2022-12-20 21:24:39 +11:00
committed by GitHub
parent 929cbb4670
commit 13a59a38d3

@ -116,6 +116,7 @@ jobs:
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0 - uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
with: with:
key: ${{ matrix.target }}
save-if: ${{ github.ref == 'refs/heads/master' }} save-if: ${{ github.ref == 'refs/heads/master' }}
- run: cargo check --package libp2p --all-features --target=${{ matrix.target }} - run: cargo check --package libp2p --all-features --target=${{ matrix.target }}
@ -144,6 +145,7 @@ jobs:
- uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0 - uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # v2.2.0
with: with:
key: ${{ matrix.features }}
save-if: ${{ github.ref == 'refs/heads/master' }} save-if: ${{ github.ref == 'refs/heads/master' }}
- run: cargo check --package libp2p --features="${{ matrix.features }}" - run: cargo check --package libp2p --features="${{ matrix.features }}"