ci: remove artificial build throttles and fix caching gaps (#4200)

Speeds up the CI pipeline without changing what is tested:

- Drop the global CARGO_BUILD_JOBS=2 and per-job --jobs 2 flags, which
  halved compiler parallelism on the 4-core runners.
- Stop embedding hashFiles(Cargo.lock) in rust-cache shared keys. The
  action already fingerprints lockfiles internally; putting the hash in
  the key prefix meant any PR that touched Cargo.lock started from a
  completely cold cache instead of reusing unchanged dependencies.
- Give the e2e-tests job the full setup action with dependency caching.
  Its migration-proof step compiles the e2e_test crate (which pulls in
  most of the workspace) and previously did so cold on every run with
  no cache, on a 2-core runner.
- Set profile.dev debug = "line-tables-only": keeps usable backtraces
  while cutting compile/link time, target-dir size (faster cache
  save/restore), and debug-binary artifact upload/download.
- Split fmt + repo-script checks into a compile-free quick-checks job
  on ubuntu-latest so contributors get feedback in ~1 minute instead
  of after the full test run.
- Collapse the five per-filter migration-proof cargo test reruns into
  one filtered nextest invocation; the same tests already run in the
  full nextest pass.
- Remove the touch rustfs/build.rs + forced rebuild from the debug
  binary jobs (version stamping is irrelevant for e2e binaries) and
  the unreachable Windows cross-compile branch in build.yml.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Zhengchao An
2026-07-02 23:27:28 +08:00
committed by GitHub
parent f9cf4ff2bf
commit a9894843d9
3 changed files with 67 additions and 41 deletions
+7
View File
@@ -341,6 +341,13 @@ insta = { version = "1.48", features = ["yaml", "json"] }
[workspace.metadata.cargo-shear]
ignored = ["rustfs"]
[profile.dev]
# Full debuginfo roughly doubles compile+link time and produces multi-GB
# target dirs (slow CI cache save/restore, slow artifact upload). Line tables
# keep meaningful backtraces. For local debugging with full debuginfo, run:
# CARGO_PROFILE_DEV_DEBUG=full cargo build
debug = "line-tables-only"
[profile.release]
opt-level = 3