diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a53e12ccb..89d036261 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,7 +116,14 @@ jobs: - run: df -h . # Load cache before doing any Rust builds - - uses: Swatinem/rust-cache@v2.0.2 + - uses: Swatinem/rust-cache@v2.7.0 + with: + # This is not necessary for keying, but makes the GHA cache viewing page more helpful. + prefix-key: "v1-rust-build-${{ matrix.os }}-${{ matrix.toolchain }}-${{ matrix.depversions }}" + # Override the default job-id-based key explicitly so that our dependent jobs can + # reuse this cache. + shared-key: "build" + - run: df -h . @@ -245,8 +252,13 @@ jobs: # libasound2-dev: needed for audio via `kira` # Load cache before doing any Rust builds - # TODO: Do we actually want to cache this, or let it be slow but low storage? - - uses: Swatinem/rust-cache@v2.0.2 + - uses: Swatinem/rust-cache@v2.7.0 + with: + # Reuse the cache from the normal `build` job instead of creating an independent one, + # to reduce redundant work and save disk space — but don't *write* to that cache. + prefix-key: "v1-rust-build-ubuntu-stable-locked" + shared-key: "build" + save-if: false # break this out as a separate non-silenced build step - name: Compile xtask @@ -288,8 +300,11 @@ jobs: steps: - uses: actions/checkout@v3.1.0 - - uses: Swatinem/rust-cache@v2.0.2 - + - uses: Swatinem/rust-cache@v2.7.0 + with: + # This is not necessary for keying, but makes the GHA cache viewing page more helpful. + prefix-key: "v1-rust-miri" + - name: Install Rust toolchain run: | rustup toolchain install nightly --component miri @@ -311,7 +326,7 @@ jobs: - uses: actions/checkout@v3.1.0 # The build is faster *without* this cache. - # - uses: Swatinem/rust-cache@v2.0.2 + # - uses: Swatinem/rust-cache@v2.7.0 - name: Install Rust toolchain run: | @@ -335,8 +350,10 @@ jobs: - uses: actions/checkout@v3.1.0 # Cache both the main workspace (for xtask builds) and the fuzzing workspace - - uses: Swatinem/rust-cache@v2.0.2 + - uses: Swatinem/rust-cache@v2.7.0 with: + # This is not necessary for keying, but makes the GHA cache viewing page more helpful. + prefix-key: "v1-rust-fuzz" workspaces: | . fuzz diff --git a/.github/workflows/unstable-ci.yml b/.github/workflows/unstable-ci.yml index 49cd1e0b4..ab1e79ed1 100644 --- a/.github/workflows/unstable-ci.yml +++ b/.github/workflows/unstable-ci.yml @@ -80,7 +80,10 @@ jobs: # libasound2-dev: needed for audio via `kira` # Load cache before doing any Rust builds - - uses: Swatinem/rust-cache@v2.0.2 + - uses: Swatinem/rust-cache@v2.7.0 + with: + # This is not necessary for keying, but makes the GHA cache viewing page more helpful. + prefix-key: "v1-rust-unstablefeatures-${{ matrix.os }}-${{ matrix.depversions }}" # break this out as a separate non-silenced build step - name: Compile xtask @@ -137,8 +140,11 @@ jobs: steps: - uses: actions/checkout@v3.1.0 - - uses: Swatinem/rust-cache@v2.0.2 - + - uses: Swatinem/rust-cache@v2.7.0 + with: + # This is not necessary for keying, but makes the GHA cache viewing page more helpful. + prefix-key: "v1-rust-unstablefeatures-miri" + - name: Install Rust toolchain run: | rustup toolchain install nightly --component miri