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
14 changes: 3 additions & 11 deletions .github/actions/rust-build-cache/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Rust build cache
description: Set up Rust and restore source-aware build artifacts
description: Set up Rust and restore cached dependency builds

inputs:
cache-key:
Expand All @@ -19,18 +19,10 @@ runs:
toolchain: "1.98"
components: clippy,rustfmt

# Cargo relies heavily on mtimes. Restoring source mtimes allows cached
# workspace artifacts to remain valid on a fresh checkout.
- name: Restore source mtimes
shell: bash
run: |
curl --fail --silent --show-error --location \
https://raw.githubusercontent.com/howardjohn/git-restore-mtime-action/b77092831982028ae46f86c64831e6e0dde7ee8f/git-restore-mtime |
python3 - --commit-time

- name: Restore Rust cache
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
with:
shared-key: ${{ inputs.cache-key }}
cache-workspace-crates: true
# Cargo judges workspace crates by mtime, so cached builds can mask source changes.
cache-workspace-crates: false
save-if: ${{ inputs.save }}
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ jobs:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false

- name: Install Node
Expand Down