Skip to main content
Glama
8b-is
by 8b-is
rust.ymlβ€’5.85 kB
name: Rust CI πŸ¦€ on: push: branches: [ "main" ] pull_request: branches: [ "main" ] workflow_dispatch: env: CARGO_TERM_COLOR: always RUST_BACKTRACE: 1 SMART_TREE_NO_UPDATE_CHECK: 1 permissions: contents: read jobs: check: name: Format & Lint Check ✨ runs-on: self-hosted, macos-latest steps: - name: Install Git LFS (macOS) if: matrix.os == 'macos-latest' run: brew install git-lfs z- name: Checkout code πŸ“¦ uses: actions/checkout@v4 with: x submodules: 'recursive' - name: Fetch LFS objects run: git lfs pull - name: Install Rust πŸ¦€ uses: dtolnay/rust-toolchain@stable with: components: rustfmt, clippy - name: Cache cargo registry πŸ“š uses: actions/cache@v4 with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo-registry- build: name: Build & Test - ${{ matrix.name }} πŸ”¨ strategy: matrix: include: - os: [ubuntu-latest] name: Ubuntu rust: stable allow_failure: false - os: [self-hosted, macos-latest] name: Self-Hosted macos rust: stable allow_failure: false - os: [windows-latest] name: Windows rust: stable allow_failure: false runs-on: ${{ matrix.os }} continue-on-error: ${{ matrix.allow_failure == true }} steps: # Install Git LFS for each OS - name: Install Git LFS (Linux) if: matrix.os == 'ubuntu-latest' run: sudo apt-get update && sudo apt-get install -y git-lfs - name: Install Git LFS (macOS) if: matrix.os == 'macos-latest' run: brew install git-lfs - name: Install Git LFS (Windows) if: matrix.os == 'windows-latest' shell: pwsh run: choco install git-lfs -y - name: Checkout code πŸ“¦ uses: actions/checkout@v4 with: submodules: 'recursive' - name: Fetch LFS objects run: git lfs pull - name: Install Rust πŸ¦€ uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.rust }} - name: Update submodules run: git submodule update --init --recursive - name: Cache cargo registry πŸ“š uses: actions/cache@v4 with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo-registry- - name: Cache cargo index πŸ“‘ uses: actions/cache@v4 with: path: ~/.cargo/git key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo-index- - name: Fetch LFS objects run: git lfs pull - name: Cache cargo build πŸ—οΈ uses: actions/cache@v4 with: path: target key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}-${{ matrix.rust }} restore-keys: | ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}- ${{ runner.os }}-cargo-build-target- - name: Build release πŸš€ run: cargo build --release --verbose - name: Run tests πŸ§ͺ shell: bash run: | echo "=== Performance Monitor Start ===" echo "Time: $(date)" echo "Memory: $(free -h 2>/dev/null || echo 'N/A')" echo "CPU: $(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 'N/A')" echo "Disk: $(df -h . | tail -1)" echo "================================" # Run tests with timeout and performance tracking if command -v timeout >/dev/null 2>&1; then TIMEOUT_CMD="timeout 300" elif command -v gtimeout >/dev/null 2>&1; then TIMEOUT_CMD="gtimeout 300" else TIMEOUT_CMD="" fi RUST_TEST_THREADS=1 $TIMEOUT_CMD cargo test --lib --verbose -- --nocapture --test-threads=1 || exit_code=$? echo "=== Performance Monitor End ===" echo "Time: $(date)" echo "Exit code: ${exit_code:-0}" echo "==============================" exit ${exit_code:-0} - name: Run doc tests πŸ“š run: cargo test --doc --verbose - name: Test examples πŸ“ if: matrix.os != 'windows-latest' shell: bash run: | # Test that examples compile for example in examples/*.rs; do if [[ -f "$example" ]]; then example_name=$(basename "$example" .rs) echo "Testing example: $example_name" cargo build --example "$example_name" || true fi done # TEMPORARILY DISABLED: Binary execution hangs in CI - name: Test binary execution 🎯 shell: bash run: | cargo run -- --version cargo run -- --help cargo run -- --mode classic --depth 1 . cargo run -- --mode hex --depth 1 . cargo run -- --mode ai --depth 1 . - name: Test MCP tools listing πŸ› οΈ if: matrix.os != 'windows-latest' run: | cargo run -- --mcp-tools | head -20 security: name: Security Audit πŸ”’ runs-on: ubuntu-latest steps: - name: Install Git LFS (Linux) run: sudo apt-get update && sudo apt-get install -y git-lfs - name: Checkout code πŸ“¦ uses: actions/checkout@v4 with: submodules: 'recursive' - name: Fetch LFS objects run: git lfs pull - name: Install Rust πŸ¦€ uses: dtolnay/rust-toolchain@stable - name: Install cargo-audit πŸ” run: cargo install cargo-audit - name: Run security audit πŸ›‘οΈ run: cargo audit continue-on-error: true

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/8b-is/smart-tree'

If you have feedback or need assistance with the MCP directory API, please join our Discord server