Skip to content

Reuse the CI build binary for MCP conformance - #91

Open
lucarlig wants to merge 1 commit into
mainfrom
user/luca/speed-up-conformance-build
Open

Reuse the CI build binary for MCP conformance#91
lucarlig wants to merge 1 commit into
mainfrom
user/luca/speed-up-conformance-build

Conversation

@lucarlig

@lucarlig lucarlig commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • publish the binary already produced by CI's existing build job as a one-day artifact
  • run MCP conformance after build and consume that artifact from a reusable workflow
  • package the prebuilt binary into the runtime image without executing the Dockerfile's Rust builder stage
  • keep all independent CI jobs parallel and use Cargo's native dev, test, and bench profiles
  • leave the normal production release image build unchanged

Why

In the motivating Actions run, the local image build took 6m16s of a 7m13s job. Its duplicate release Cargo build took 5m42s, while the actual conformance runner completed in about two seconds.

The regular CI build job already runs cargo build --locked --workspace --all-features. The resulting data-plane binary has everything conformance needs; optional test-plugin code remains inactive because the conformance stack does not enable runtime plugins. Reusing that exact output removes the second toolchain setup, dependency installation, Cargo build, and separate Rust cache.

Conformance remains a behavioral check using the checked-out PR source. Published production images continue to use the existing fully optimized release build.

Only conformance depends on build, because it consumes the uploaded binary. Formatting, secrets, Clippy, cargo-deny, cargo-shear, tests, and benchmark compilation remain parallel; their separate runners and job-specific Rust caches do not reuse the build job's target directory.

Measured in GitHub Actions

  • build, including artifact preparation and upload: 36s
  • downstream conformance job: 1m28s
  • complete CI critical path: 2m06s, down from the motivating 7m13s standalone conformance job

Passing final run: https://github.com/contextforge-org/contextforge-data-plane/actions/runs/31788072058

Validation

  • actionlint .github/workflows/ci.yml .github/workflows/mcp_conformance.yml
  • cargo build --locked --workspace --all-features
  • artifact preparation with cp and strip
  • docker buildx build --check --target conformance-prebuilt ...
  • prebuilt conformance image packaging
  • full repository pre-commit gate: Clippy, cargo-deny, nextest, and workspace build

Motivating run: https://github.com/contextforge-org/contextforge-data-plane/actions/runs/31783682605/job/94714717793?pr=82

@lucarlig
lucarlig force-pushed the user/luca/speed-up-conformance-build branch 6 times, most recently from cd72004 to 98a7793 Compare August 14, 2026 09:25
Signed-off-by: lucarlig <luca.carlig@ibm.com>
@lucarlig
lucarlig force-pushed the user/luca/speed-up-conformance-build branch from 98a7793 to e57ca0b Compare August 14, 2026 09:26
@lucarlig lucarlig changed the title Speed up MCP conformance image builds Reuse the CI build binary for MCP conformance Aug 14, 2026
@lucarlig
lucarlig marked this pull request as ready for review August 14, 2026 10:03
@lucarlig lucarlig self-assigned this Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant