From 25306099e7079a4ac1d0622cd648bbf3edc46fec Mon Sep 17 00:00:00 2001 From: lucarlig Date: Fri, 14 Aug 2026 11:13:52 +0100 Subject: [PATCH] Speed up local MCP conformance builds Signed-off-by: lucarlig --- .dockerignore | 1 + .github/workflows/mcp_conformance.yml | 4 +++- Makefile | 8 +++---- docker/conformance.Dockerfile | 32 +++++++++++++++++++++++++++ 4 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 docker/conformance.Dockerfile diff --git a/.dockerignore b/.dockerignore index 43f469d3..694eafc1 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ target/ +.cache/ assets/ resources/ releases/ diff --git a/.github/workflows/mcp_conformance.yml b/.github/workflows/mcp_conformance.yml index 1a47c6bd..3cb95a2f 100644 --- a/.github/workflows/mcp_conformance.yml +++ b/.github/workflows/mcp_conformance.yml @@ -33,7 +33,9 @@ jobs: uses: actions/checkout@v6.0.2 - name: Build data plane from the checked-out source - run: make conformance-image + run: >- + docker build --tag "${CF_DATAPLANE_IMAGE}" + --file docker/Dockerfile . - name: Check out the alpha.11 conformance fixture uses: actions/checkout@v6.0.2 diff --git a/Makefile b/Makefile index cf443962..43576442 100644 --- a/Makefile +++ b/Makefile @@ -7,7 +7,7 @@ ARGS ?= DETECT_SECRETS_SPEC ?= git+https://github.com/ibm/detect-secrets.git@076672a9a01abdfc7ecee2e7d14f08cdccb73976 DETECT_SECRETS_EXCLUDE := '(?x)(Cargo\.lock$$|\.lock$$)|^\.secrets\.baseline$$' -.PHONY: help docker-prod compose-up compose-down conformance-image conformance docs-serve pre-commit secrets-scan-all configure-git +.PHONY: help docker-prod compose-up compose-down conformance docs-serve pre-commit secrets-scan-all configure-git help: ## Show available commands @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-22s\033[0m %s\n", $$1, $$2}' @@ -25,10 +25,8 @@ compose-up: ## Launch stack: nginx, control plane, redis, postgres, pgbouncer, d compose-down: ## Tear down the stack docker compose -f docker/docker-compose.yml stop $(SERVICES) $(ARGS) -conformance-image: ## Build the current checkout for MCP conformance - docker build -t "$(CF_DATAPLANE_IMAGE)" -f docker/Dockerfile . - -conformance: conformance-image ## Build and run official MCP 2026-07-28 conformance locally +conformance: ## Build the data plane and run official MCP 2026-07-28 conformance locally + docker build -t "$(CF_DATAPLANE_IMAGE)" -f docker/conformance.Dockerfile . CF_DATAPLANE_IMAGE="$(CF_DATAPLANE_IMAGE)" tests/conformance/run-local.sh docs-serve: ## Serve the wiki book locally at http://127.0.0.1:3000 diff --git a/docker/conformance.Dockerfile b/docker/conformance.Dockerfile new file mode 100644 index 00000000..494cd43d --- /dev/null +++ b/docker/conformance.Dockerfile @@ -0,0 +1,32 @@ +# syntax=docker/dockerfile:1 + +FROM rust:1.96.1 AS builder +WORKDIR /app + +RUN <