Skip to content

fix(ci): remove cross-compilation job #2

fix(ci): remove cross-compilation job

fix(ci): remove cross-compilation job #2

Workflow file for this run

name: Rust CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test Suite
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: [stable]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: macos-latest
target: x86_64-apple-darwin
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
components: rustfmt, clippy
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install Node.js (for MCP Inspector)
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Check Rust formatting
run: cargo fmt --all -- --check
- name: Lint with Clippy
run: cargo clippy --all-targets --all-features
- name: Run unit tests
run: cargo test --lib --all-features
- name: Build release binary
run: cargo build --release --all-features
- name: Run integration tests
run: cargo test --test integration_tests --all-features
timeout-minutes: 10
- name: Test MCP Inspector compatibility
run: |
# Create a temporary config for testing
./target/release/studio-mcp-server --init test-config.json
# Test MCP Inspector can connect (run for 5 seconds then exit)
timeout 5s npx --yes @modelcontextprotocol/inspector ./target/release/studio-mcp-server test-config.json --stdio || true
# Clean up
rm -f test-config.json
shell: bash
timeout-minutes: 2
- name: Upload binary artifacts (on failure for debugging)
if: failure()
uses: actions/upload-artifact@v4
with:
name: debug-binary-${{ matrix.os }}
path: |
target/release/studio-mcp-server*
Cargo.lock
retention-days: 7
# Cross-compilation temporarily disabled due to keyring dependency platform compatibility
# TODO: Re-enable once keyring supports cross-compilation targets or make it optional
# Summary job to provide clear pass/fail status
ci-success:
name: CI Success
runs-on: ubuntu-latest
needs: [test]
if: always()
steps:
- name: Check test results
run: |
if [[ "${{ needs.test.result }}" == "success" ]]; then
echo "✅ All tests passed across all platforms!"
exit 0
else
echo "❌ Tests failed on one or more platforms"
exit 1
fi