Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
28 changes: 17 additions & 11 deletions .github/workflows/mcp_conformance.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
9 changes: 7 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,20 @@ 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 <<EOF
apt update
apt upgrade -y
apt install -y python3
EOF

WORKDIR /
COPY --from=builder /app/target/release/contextforge-data-plane /contextforge-data-plane
LABEL org.opencontainers.image.source=https://github.com/contextforge-org/contextforge-data-plane
LABEL org.opencontainers.image.description="contextforge-data-plane - open source experimental data plane for ContextForge."
ENTRYPOINT ["/contextforge-data-plane"]

FROM runtime AS conformance-prebuilt
COPY --from=prebuilt /contextforge-data-plane /contextforge-data-plane

FROM runtime
COPY --from=builder /app/target/release/contextforge-data-plane /contextforge-data-plane