Skip to content

Commit 771f01c

Browse files
committed
feat(release): warm cargo caches on the mac legs
actions/cache (first-party, sha-pinned) on registry+git+target for the two darwin legs, keyed by target, toolchain, and Cargo.lock. The windows legs stay uncached to keep the repo inside the 10GB Actions-cache LRU budget.
1 parent 9326f92 commit 771f01c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,18 @@ jobs:
137137
echo "CXXFLAGS=-ffile-prefix-map=$PWD=/build"
138138
} >> "$GITHUB_ENV"
139139
140+
# the two mac legs are the slowest; warm cargo caches roughly halve them.
141+
# windows legs stay uncached to keep the repo inside the 10GB cache LRU
142+
- if: contains(matrix.target, 'apple')
143+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
144+
with:
145+
path: |
146+
~/.cargo/registry
147+
~/.cargo/git
148+
target
149+
key: cargo-${{ matrix.target }}-1.97.0-${{ hashFiles('Cargo.lock') }}
150+
restore-keys: cargo-${{ matrix.target }}-1.97.0-
151+
140152
- name: build
141153
run: |
142154
if [ "${{ matrix.builder }}" = "nix" ]; then

0 commit comments

Comments
 (0)