Run check-try-runtime after cargo-clippy (not in parallel) and
build-rustdoc after test-doc. Jobs on the same VPS share a single
disk, so parallel builds exhaust available space.
Both Checks jobs share one cache volume; both Docs jobs share another.
When using persistent cargo cache mounted from host directory, the container
user differs from the directory owner, causing git "dubious ownership" error.
This fix adds `git config --global --add safe.directory '*'` before cargo
commands in containerized jobs.
Mount /cache/cargo-target/pezkuwi-sdk on VPS runners to reuse
compiled artifacts between workflow runs. This significantly
speeds up subsequent builds by avoiding full recompilation.
Updated workflows:
- checks.yml (cargo-clippy, check-try-runtime)
- docs.yml (test-doc, build-rustdoc)
- tests-linux-stable.yml (all test jobs)
Also removed Swatinem/rust-cache where persistent cache is used
since it's now redundant.
The crate's build.rs runs nested cargo build which doesn't inherit
workspace [patch.crates-io] settings, causing serde_core duplicate
lang item error with wasm32 target.
This is a test-only crate and doesn't affect mainnet binaries.
Tracking issue: #357
Changes:
- Add Rust caching (Swatinem/rust-cache) to all heavy build jobs
- Reduce cargo-check-each-crate from 7 to 4 parallel jobs
- Reduce tests-linux-stable matrix from 6 to 3 jobs
- Set CARGO_INCREMENTAL=0 for consistent caching
- Reduce timeouts from 60 to 45 minutes (cache makes builds faster)
- Remove redundant disk cleanup steps (cache handles this)
Expected improvements:
- 50-80% faster builds after cache is populated
- Lower VPS load (fewer parallel jobs)
- More consistent build times
Affected workflows:
- checks.yml (cargo-clippy, check-try-runtime)
- tests.yml (quick-benchmarks, cargo-check-all-benches)
- tests-misc.yml (test-pezframe-ui, cargo-check-each-crate)
- tests-linux-stable.yml (test-linux-stable)
- docs.yml (test-doc, build-rustdoc)