Skip to content

ci: remove coverage instrumentation from test builds#10

Open
huth-stacks wants to merge 1 commit into
developfrom
ci/P9-coverage-fast-path
Open

ci: remove coverage instrumentation from test builds#10
huth-stacks wants to merge 1 commit into
developfrom
ci/P9-coverage-fast-path

Conversation

@huth-stacks

Copy link
Copy Markdown
Owner

What

Remove -Cinstrument-coverage from RUSTFLAGS in the test cache build.

Why

Coverage instrumentation is applied to ALL test binaries via create-cache.yml. This adds:

  • ~15% compilation overhead to the 15-19 minute nextest archive build
  • ~56% binary size increase (43MB → 67MB), slowing archive transfer to 100+ test runners
  • .profraw file I/O on every test execution
  • grcov processing time on every test job

Coverage data is only consumed by the trigger-code-coverage-report job. For PR feedback, tests passing/failing matters more than coverage diffs.

The Change

In .github/workflows/create-cache.yml:

-  RUSTFLAGS: "-Cinstrument-coverage -Awarnings"
+  RUSTFLAGS: "-Awarnings"

1 line changed in 1 file.

Metrics to Track

Metric Baseline Expected
nextest-archive build 15-19m ~13-16m (-15%)
Archive binary size ~67MB ~43MB (-36%)
Coverage report Runs Skips gracefully

Risk

Security Checklist

  • No new permissions
  • No secrets exposure
  • RUSTFLAGS change is purely subtractive

Part of CI Optimization Series

PR 9. Expected impact: ~2-3 minutes on archive build + reduced test runner overhead.

Remove -Cinstrument-coverage from RUSTFLAGS in create-cache.yml.
This eliminates ~15% compilation overhead, ~56% binary size bloat,
and per-test .profraw I/O from every PR run. Coverage data is no
longer collected per-PR. The coverage report job will skip gracefully.

Standard practice for large Rust projects — coverage on merge, not
per-PR. Can be restored by reverting this one-line change.
@huth-stacks huth-stacks added the no changelog Skip changelog fragment check label Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no changelog Skip changelog fragment check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant