|
| 1 | +name: CI |
| 2 | + |
| 3 | +# Dual-spec feature matrix for the 2026-07-28 cutover branch: |
| 4 | +# - default lane is MCP 2026-07-28 (stateless core) |
| 5 | +# - 2025-11-25 is the opt-in legacy lane |
| 6 | +# Gates derived from docs/plans/2026-07-28-final-readiness-audit.md §7. |
| 7 | + |
| 8 | +on: |
| 9 | + push: |
| 10 | + branches: ["**"] |
| 11 | + pull_request: |
| 12 | + |
| 13 | +env: |
| 14 | + CARGO_TERM_COLOR: always |
| 15 | +# Warnings are denied via the explicit `cargo clippy -- -D warnings` step and the |
| 16 | +# test-build warning sweep, not a global RUSTFLAGS (which would also fail on any |
| 17 | +# transient workspace-crate warning outside the audited gates). |
| 18 | + |
| 19 | +jobs: |
| 20 | + default-2026: |
| 21 | + name: Default lane (2026-07-28) |
| 22 | + runs-on: ubuntu-latest |
| 23 | + steps: |
| 24 | + - uses: actions/checkout@v4 |
| 25 | + - uses: dtolnay/rust-toolchain@stable |
| 26 | + with: |
| 27 | + components: clippy |
| 28 | + - uses: Swatinem/rust-cache@v2 |
| 29 | + - name: Build (default = protocol-2026-07-28) |
| 30 | + run: cargo build |
| 31 | + - name: Clippy (deny warnings) |
| 32 | + run: cargo clippy --all-targets -- -D warnings |
| 33 | + - name: Test |
| 34 | + run: cargo test |
| 35 | + - name: Warning sweep on the test build |
| 36 | + run: | |
| 37 | + n=$(cargo test --no-run 2>&1 | grep -c 'warning:' || true) |
| 38 | + echo "test-build warnings: $n" |
| 39 | + test "$n" = "0" |
| 40 | + - name: 2026 stateless acceptance (real HTTP) |
| 41 | + run: cargo test -p turul-mcp-server --no-default-features --features http,sse,protocol-2026-07-28 --test discover_stateless_2026 |
| 42 | + - name: protocol-2026 compliance + upstream wire fixtures |
| 43 | + run: cargo test -p turul-mcp-protocol-2026-07-28 --features compliance |
| 44 | + - name: Bilingual client (not in default-members) |
| 45 | + run: cargo test -p turul-mcp-client |
| 46 | + |
| 47 | + opt-in-2025: |
| 48 | + name: Opt-in lane (2025-11-25) |
| 49 | + runs-on: ubuntu-latest |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v4 |
| 52 | + - uses: dtolnay/rust-toolchain@stable |
| 53 | + with: |
| 54 | + components: clippy |
| 55 | + - uses: Swatinem/rust-cache@v2 |
| 56 | + - name: Per-crate 2025-11-25 build matrix |
| 57 | + run: | |
| 58 | + set -euxo pipefail |
| 59 | + cargo build -p turul-mcp-server --no-default-features --features http,sse,protocol-2025-11-25 |
| 60 | + cargo clippy -p turul-mcp-server --no-default-features --features http,sse,protocol-2025-11-25 -- -D warnings |
| 61 | + cargo build -p turul-mcp-builders --no-default-features --features protocol-2025-11-25 |
| 62 | + cargo build -p turul-http-mcp-server --no-default-features --features sse,protocol-2025-11-25 |
| 63 | + cargo build -p turul-mcp-derive --no-default-features --features protocol-2025-11-25 |
| 64 | + cargo build -p turul-mcp-aws-lambda --no-default-features --features cors,sse,protocol-2025-11-25 |
| 65 | + cargo build -p turul-mcp-client --no-default-features --features http,sse,client-2025-11-25-only |
| 66 | + cargo build -p turul-mcp-client --no-default-features --features http,sse,client-2026-07-28-only |
| 67 | + - name: 2025-11-25 regression E2E (real servers) |
| 68 | + run: | |
| 69 | + set -euxo pipefail |
| 70 | + cargo test -p mcp-tools-tests |
| 71 | + cargo test -p mcp-resources-tests |
| 72 | + cargo test -p mcp-prompts-tests |
| 73 | + cargo test -p turul-mcp-framework-integration-tests --test tasks_e2e_inmemory |
| 74 | +
|
| 75 | + spec-mutex: |
| 76 | + name: Spec mutex (both features must not compile) |
| 77 | + runs-on: ubuntu-latest |
| 78 | + steps: |
| 79 | + - uses: actions/checkout@v4 |
| 80 | + - uses: dtolnay/rust-toolchain@stable |
| 81 | + - uses: Swatinem/rust-cache@v2 |
| 82 | + - name: Enabling both protocol features must be a compile_error |
| 83 | + run: | |
| 84 | + if cargo build -p turul-mcp-protocol --features protocol-2025-11-25,protocol-2026-07-28 2>/dev/null; then |
| 85 | + echo "ERROR: the spec mutex did not fire — both protocol features compiled together" |
| 86 | + exit 1 |
| 87 | + fi |
| 88 | + echo "OK: spec mutex fired as expected" |
| 89 | +
|
| 90 | + docs: |
| 91 | + name: Rustdoc (deny warnings) |
| 92 | + runs-on: ubuntu-latest |
| 93 | + steps: |
| 94 | + - uses: actions/checkout@v4 |
| 95 | + - uses: dtolnay/rust-toolchain@stable |
| 96 | + - uses: Swatinem/rust-cache@v2 |
| 97 | + - name: cargo doc (deny rustdoc warnings) |
| 98 | + env: |
| 99 | + RUSTDOCFLAGS: "-D warnings" |
| 100 | + run: cargo doc --no-deps |
0 commit comments