Skip to content

CI: drop redundant build in nightly test job (#1173) - #1396

Closed
Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
mainfrom
agent/fix-ci-test-redundant-build
Closed

Mikola Lysenko (mikolalysenko) wants to merge 1 commit into
mainfrom
agent/fix-ci-test-redundant-build

Conversation

@mikolalysenko

Copy link
Copy Markdown
Collaborator

LLM Description written by Claude Code:claude-opus-5-5

Fixes #1173

Root cause

#1173 reported two costs in the macOS/Windows test job:

  1. Full debuginfo when linking ~240 test binaries. This is already fixed on main: [profile.dev] sets debug = "line-tables-only" (Cargo.toml:130-132).
  2. A redundant cargo build --workspace step before cargo test (.github/workflows/ci.yml:375-376 on 41659c1). It is still there. cargo test already builds every target the tests need, the CLI binary included (integration tests get it through CARGO_BIN_EXE_socket-patch), and no test reads a prebuilt target/debug binary. The Linux coverage job runs the same cargo test --workspace selection without a pre-build, so the step only added build time: about 2 min per leg (2.1–2.4 min on Windows in the run profiled on CI perf: test (windows/macos) — redundant cargo build step + full debuginfo linking ~240 test binaries (~930 job-min/day, ~300 macOS) #1173).

Change

Delete the Build step from the test job and leave a comment saying why it isn't there. The Warm the test cache step, which runs only on reuse, still runs cargo test --no-run, so the main-branch cache still gets every test artifact. Nothing else changes.

CI cost

  • Lean PR / merge-queue run: unchanged, ~28 Linux jobs, ~8 min. The test job doesn't run there (ci.yml:325, full scope / schedule / dispatch only).
  • Full-scope / nightly run: same 4 test legs (macOS ×2, Windows ×2), about 2 min less each, so ~8 fewer job-minutes per run, most of it on macOS/Windows minutes.

Validation

  • actionlint: the same 165 findings as origin/main (pre-existing matrix-property warnings), none new.
  • zizmor --offline: 59 findings, identical to origin/main.
  • python3 -m pytest scripts/tests -q: 331 passed, 6 skipped.
  • The YAML parses. No matrix or fromJSON changes.
  • No Rust code changes, so cargo fmt/clippy/test don't apply.
  • I did not dispatch a full-scope run. The change only removes a pre-build that cargo test repeats anyway, and coverage already proves the no-pre-build path on every PR. To keep runner usage down, the next nightly run is the check. If a maintainer wants proof first, one gh workflow run ci.yml --ref agent/fix-ci-test-redundant-build covers it.

Per-issue checklist

🤖 Generated with Claude Code

https://claude.ai/code/session_01Bs71CkBzChrPAix1XMC7Ng


Generated by Claude Code

The macOS/Windows `test` legs ran `cargo build --workspace` before
`cargo test`, which builds every target the tests need anyway (the CLI
binary included). The extra step cost about 2 minutes per leg. The
Linux `coverage` job already runs the same test selection with no
pre-build, so the step bought nothing.

The `test` job only runs on full scope (nightly / dispatch), so PR
and merge-queue runner usage is unchanged.

Refs #1173

Assisted-by: Claude Code:claude-opus-5-5
@mikolalysenko

Copy link
Copy Markdown
Collaborator Author

[agent] Closing without merging. /code-review high and a local measurement show the Build step is not actually redundant:

  • It is the only step that compiles and links socket-patch-node (a cdylib with test = false, no test targets) and the real socket-patch-bench binary on macOS/Windows. node-addon is Linux-only, and clippy/windows-compile-check only type-check.
  • Locally, after cargo build --locked --workspace (209 crates), cargo test --locked --workspace --no-run recompiled only 55. Most of the step's ~2 min is work cargo test would otherwise do itself, so removing it saves well under that, and only on nightly/full-scope runs.

Losing the macOS/Windows addon link coverage costs more than those few nightly job-minutes save. Details on #1173.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-perf CI / merge-queue performance finding (profiler routine)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI perf: test (windows/macos) — redundant cargo build step + full debuginfo linking ~240 test binaries (~930 job-min/day, ~300 macOS)

2 participants