diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ee0d3425..506211d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,7 +78,22 @@ jobs: - uses: actions/checkout@v6.0.2 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2.9.1 - - run: cargo build --locked --workspace --all-features + - name: Build the workspace + run: cargo build --locked --workspace --all-features + + - name: Prepare the conformance binary artifact + run: | + mkdir -p target/conformance + cp target/debug/contextforge-data-plane target/conformance/contextforge-data-plane + strip target/conformance/contextforge-data-plane + + - name: Upload the conformance binary + uses: actions/upload-artifact@v7.0.1 + with: + name: contextforge-data-plane-conformance + path: target/conformance/contextforge-data-plane + if-no-files-found: error + retention-days: 1 bench: runs-on: ubuntu-latest @@ -87,3 +102,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2.9.1 - run: cargo bench --locked --workspace --no-run + + conformance: + needs: build + uses: ./.github/workflows/mcp_conformance.yml diff --git a/.github/workflows/mcp_conformance.yml b/.github/workflows/mcp_conformance.yml index 1a47c6bd..bf67523c 100644 --- a/.github/workflows/mcp_conformance.yml +++ b/.github/workflows/mcp_conformance.yml @@ -1,19 +1,11 @@ name: MCP Conformance on: - workflow_dispatch: - pull_request: - branches: [main] - push: - branches: [main] + workflow_call: permissions: contents: read -concurrency: - group: mcp-conformance-${{ github.ref }} - cancel-in-progress: true - env: MCP_CONFORMANCE_VERSION: 0.2.0-alpha.11 MCP_CONFORMANCE_SOURCE_SHA: c321dd32035556e6769d3724a8ee97d87c3faaac # pragma: allowlist secret @@ -32,8 +24,22 @@ jobs: - name: Check out data plane uses: actions/checkout@v6.0.2 - - name: Build data plane from the checked-out source - run: make conformance-image + - name: Download the conformance binary + uses: actions/download-artifact@v8.0.1 + with: + name: contextforge-data-plane-conformance + path: target/conformance + + - name: Make the conformance binary executable + run: chmod +x target/conformance/contextforge-data-plane + + - name: Package the data plane conformance image + run: >- + docker buildx build --load + --target conformance-prebuilt + --build-context prebuilt=target/conformance + --tag "${CF_DATAPLANE_IMAGE}" + --file docker/Dockerfile . - name: Check out the alpha.11 conformance fixture uses: actions/checkout@v6.0.2 diff --git a/docker/Dockerfile b/docker/Dockerfile index adc76db1..7f8a9b6f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -14,7 +14,7 @@ RUN --mount=type=cache,id=cargo,target=/usr/local/cargo/registry,sharing=locked --mount=type=cache,id=cargo-git,target=/usr/local/cargo/git,sharing=locked \ cargo build --release --features "contextforge-data-plane-lib/with_tools contextforge-data-plane/plugins" -FROM debian:trixie-slim +FROM debian:trixie-slim AS runtime RUN <