mirror of
https://github.com/wirenboard/agent-vm.git
synced 2026-07-09 16:00:54 +00:00
ci(release-npm): cache path-dep crates so warm runs actually skip work
rust-cache@v2 defaults to cache-workspace-crates=false. It strips
target/release/{deps,build}/* entries belonging to path = "..."
crates before saving, so a warm-cache run still recompiles the
9 vendor/microsandbox workspace crates (~28s) and re-links the
agent-vm binary under LTO (~70s).
Set cache-all-crates and cache-workspace-crates to true so the
full target/ is preserved. Trades ~600 MB of cache space per
job for actually-warm builds.
This commit is contained in:
parent
1d5a8c4b42
commit
ff9d3bee28
1 changed files with 13 additions and 0 deletions
13
.github/workflows/release-npm.yml
vendored
13
.github/workflows/release-npm.yml
vendored
|
|
@ -99,6 +99,15 @@ jobs:
|
|||
# so subsequent runs (re-dispatch, redo-after-publish-fail
|
||||
# etc.) restore from the previous build's target/.
|
||||
save-if: ${{ true }}
|
||||
# Cache the *full* target/ including path-dep crates.
|
||||
# Default cache-workspace-crates=false strips
|
||||
# vendor/microsandbox/crates/* artefacts before save, so
|
||||
# a warm-cache run still recompiled ~9 microsandbox-*
|
||||
# workspace crates (28s) + the agent-vm crate itself
|
||||
# (~70s of LTO link). Caching the full target/ trades
|
||||
# ~600 MB extra GH cache space for skipping that work.
|
||||
cache-all-crates: "true"
|
||||
cache-workspace-crates: "true"
|
||||
|
||||
- name: cargo build --release -p agent-vm
|
||||
run: cargo build --release --target ${{ matrix.cargo_target }} -p agent-vm
|
||||
|
|
@ -156,6 +165,10 @@ jobs:
|
|||
# See build-agent-vm; release runs are off main so default
|
||||
# save-if would skip every release. Force-save.
|
||||
save-if: ${{ true }}
|
||||
# Keep path-dep artefacts (microsandbox workspace internals)
|
||||
# cached too — default strips them and forces re-link.
|
||||
cache-all-crates: "true"
|
||||
cache-workspace-crates: "true"
|
||||
|
||||
- name: cargo build --release -p microsandbox-cli --bin msb
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue