Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions .github/actions/rust-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,24 @@ inputs:
profile:
description: Cargo output profile directory (debug or release)
default: debug
key:
description: Separates the caches of jobs that share a runner OS and architecture, such as a build matrix
default: ""
runs:
using: composite
steps:
- uses: Swatinem/rust-cache@v2
with:
key: ${{ inputs.key }}
# rust-cache removes gn_out during cleanup; this later action saves it first.
- uses: actions/cache@v5
id: v8
with:
path: target/${{ inputs.profile }}/gn_out
key: v8-${{ runner.os }}-${{ runner.arch }}-${{ inputs.profile }}-${{ hashFiles('Cargo.lock') }}
key: >-
v8-${{ inputs.key || format('{0}-{1}', runner.os, runner.arch) }}-${{ inputs.profile }}-${{
hashFiles('Cargo.lock') }}
- name: Rebuild V8 if its native archive was evicted
if: steps.v8.outputs.cache-hit != 'true'
shell: bash
run: cargo clean -p v8
run: cargo clean -p v8 --profile ${{ inputs.profile == 'debug' && 'dev' || inputs.profile }}
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ jobs:
- uses: gradle/actions/setup-gradle@v5
if: matrix.maven
- run: rustup toolchain install --no-self-update
- uses: ./.github/actions/rust-cache
with:
profile: release
key: ${{ matrix.platform }}
- name: Configure the vendored OpenSSL with Strawberry Perl
if: runner.os == 'Windows'
# Git's MSYS Perl, first on the bash PATH, cannot configure OpenSSL for MSVC.
Expand Down
Loading