Expand installer plan with technical details #534
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright(C) 2025-2026 Advanced Micro Devices, Inc. All rights reserved. | |
| # SPDX-License-Identifier: MIT | |
| # This workflow tests the GAIA CLI on Linux (Ubuntu) with Lemonade server support | |
| # Tests include: CLI installation, Lemonade server setup, core commands, and evaluation tools | |
| # Platform: Linux/Ubuntu (Full CLI functionality with Lemonade server) | |
| name: GAIA CLI Tests (Linux) | |
| on: | |
| workflow_call: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| merge_group: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-gaia-cli-linux: | |
| name: Test GAIA CLI on Linux (Full Integration) | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request' || github.event.pull_request.draft == false || contains(github.event.pull_request.labels.*.name, 'ready_for_ci') | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Free disk space | |
| uses: ./.github/actions/free-disk-space | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential curl jq portaudio19-dev | |
| - name: Setup Python environment | |
| uses: ./.github/actions/setup-venv | |
| with: | |
| python-version: '3.12' | |
| # Note: 'blender' excluded as bpy requires Blender runtime | |
| install-package: '.[dev,talk,rag,mcp,api]' | |
| extra-index-url: 'https://download.pytorch.org/whl/cpu' | |
| - name: Install Lemonade SDK | |
| run: | | |
| echo "=== Installing Lemonade SDK ===" | |
| uv pip install lemonade-sdk --python .venv/bin/python | |
| echo "=== Verifying Lemonade Installation ===" | |
| lemonade-server-dev -h | |
| - name: Verify GAIA CLI installation | |
| run: | | |
| echo "=== Testing GAIA CLI Installation ===" | |
| # Test version command | |
| echo "Testing version command:" | |
| gaia --version | |
| # Test help command | |
| echo "Testing help command:" | |
| gaia --help | |
| # Verify gaia command is available | |
| which gaia | |
| echo "GAIA CLI installed successfully!" | |
| - name: Start Lemonade Server and Test Core Commands | |
| run: | | |
| echo "=== Starting Lemonade Server ===" | |
| # Start Lemonade server in background with a lightweight model | |
| echo "Starting Lemonade server with Qwen model..." | |
| echo "Note: First run may take 5-10 minutes to download the model (~3GB)" | |
| # Start server and capture both stdout and stderr | |
| lemonade-server-dev run Qwen3-0.6B-GGUF > lemonade.log 2>&1 & | |
| LEMONADE_PID=$! | |
| echo "Lemonade server started with PID: $LEMONADE_PID" | |
| # Function to check if process is still running | |
| check_process_alive() { | |
| if ! kill -0 $LEMONADE_PID 2>/dev/null; then | |
| echo "❌ Lemonade server process has died. Log output:" | |
| cat lemonade.log | |
| return 1 | |
| fi | |
| return 0 | |
| } | |
| # Wait for server to start up with longer timeout for model download | |
| echo "Waiting for Lemonade server to start (this may take up to 10 minutes for model download)..." | |
| # Check if server is responding with extended timeout and exponential backoff | |
| max_attempts=60 # Increased from 10 to 60 | |
| attempt=0 | |
| wait_time=5 | |
| max_wait_time=30 | |
| while [ $attempt -lt $max_attempts ]; do | |
| # Check if process is still alive | |
| if ! check_process_alive; then | |
| exit 1 | |
| fi | |
| # Try to connect to health endpoint | |
| if curl -f -m 10 http://localhost:8000/api/v1/health 2>/dev/null; then | |
| echo "✅ Lemonade server is responding!" | |
| break | |
| fi | |
| attempt=$((attempt + 1)) | |
| echo "Waiting for server... (attempt $attempt/$max_attempts, waiting ${wait_time}s)" | |
| # Show recent log output every 10 attempts to indicate progress | |
| if [ $((attempt % 10)) -eq 0 ]; then | |
| echo "Recent server output:" | |
| tail -n 5 lemonade.log 2>/dev/null || echo "No log output yet" | |
| fi | |
| sleep $wait_time | |
| # Exponential backoff with max limit | |
| if [ $wait_time -lt $max_wait_time ]; then | |
| wait_time=$((wait_time + 5)) | |
| fi | |
| done | |
| if [ $attempt -eq $max_attempts ]; then | |
| echo "❌ Lemonade server failed to start within timeout" | |
| echo "Final server log output:" | |
| cat lemonade.log | |
| kill $LEMONADE_PID 2>/dev/null || true | |
| exit 1 | |
| fi | |
| # Pull the model now that server is running | |
| echo "=== Pulling Qwen3-0.6B-GGUF model ===" | |
| lemonade-server-dev pull Qwen3-0.6B-GGUF | |
| # List available models for debugging | |
| echo "=== Listing Available Models ===" | |
| curl -s http://localhost:8000/api/v1/models | jq '.' || echo "Could not list models" | |
| echo "=== Testing Core GAIA CLI Commands with Lemonade ===" | |
| # Test chat command with Qwen model (should now work with Lemonade) | |
| echo "Testing chat command with Qwen3-0.6B-GGUF model:" | |
| timeout 30s gaia chat --model "Qwen3-0.6B-GGUF" -q "Hello, this is a test message. Please respond briefly." || echo "Chat command completed" | |
| # Test prompt command with Qwen model | |
| echo "Testing prompt command with Qwen3-0.6B-GGUF model:" | |
| timeout 30s gaia prompt --model "Qwen3-0.6B-GGUF" "What is 2+2?" || echo "Prompt command completed" | |
| # Test llm command with Qwen model | |
| echo "Testing llm command with Qwen3-0.6B-GGUF model:" | |
| timeout 30s gaia llm --model "Qwen3-0.6B-GGUF" "Say hello" || echo "LLM command completed" | |
| echo "✅ Core commands tested successfully!" | |
| # Now test summarizer while server is still running | |
| echo "" | |
| echo "=== Testing Summarizer Integration ===" | |
| echo "Testing complete CLI workflow: gaia summarize command" | |
| # Set the test model for summarizer tests | |
| export GAIA_TEST_MODEL="Qwen3-0.6B-GGUF" | |
| # Run the summarizer integration tests | |
| python -m pytest tests/test_summarizer.py -vs --tb=short || TEST_EXIT=$? | |
| if [ "${TEST_EXIT:-0}" -eq 0 ]; then | |
| echo "✅ Summarizer CLI integration tests passed successfully!" | |
| else | |
| echo "❌ Summarizer CLI integration tests failed with exit code: ${TEST_EXIT}" | |
| echo "Note: Error details displayed above" | |
| fi | |
| echo "" | |
| echo "=== Testing RAG Functionality ===" | |
| echo "Testing RAG (Retrieval-Augmented Generation) system" | |
| # Run the RAG tests | |
| python -m pytest tests/test_rag.py -vs --tb=short || RAG_TEST_EXIT=$? | |
| if [ "${RAG_TEST_EXIT:-0}" -eq 0 ]; then | |
| echo "✅ RAG tests passed successfully!" | |
| else | |
| echo "❌ RAG tests failed with exit code: ${RAG_TEST_EXIT}" | |
| echo "Note: Error details displayed above" | |
| fi | |
| echo "" | |
| echo "=== Testing Lemonade Client Integration ===" | |
| echo "Testing LemonadeClient API with running server" | |
| # Run the lemonade client integration tests (skip hybrid NPU test - no NPU on Linux) | |
| GAIA_TEST_MODEL="Qwen3-0.6B-GGUF" python -m pytest tests/test_lemonade_client.py -vs --tb=short -k "Integration and not hybrid" || LEMONADE_TEST_EXIT=$? | |
| if [ "${LEMONADE_TEST_EXIT:-0}" -eq 0 ]; then | |
| echo "✅ Lemonade client integration tests passed successfully!" | |
| else | |
| echo "❌ Lemonade client integration tests failed with exit code: ${LEMONADE_TEST_EXIT}" | |
| echo "Note: Error details displayed above" | |
| fi | |
| # Clean up: Stop the Lemonade server | |
| echo "Stopping Lemonade server..." | |
| kill $LEMONADE_PID 2>/dev/null || true | |
| sleep 5 | |
| # Clean up log file | |
| rm -f lemonade.log | |
| - name: Test evaluation and utility commands | |
| run: | | |
| echo "=== Testing Evaluation and Utility Commands ===" | |
| # Test groundtruth command help | |
| echo "Testing groundtruth command help:" | |
| gaia groundtruth --help | |
| # Test eval command help | |
| echo "Testing eval command help:" | |
| gaia eval --help | |
| # Test report command help | |
| echo "Testing report command help:" | |
| gaia report --help | |
| # Test generate command help | |
| echo "Testing generate command help:" | |
| gaia generate --help | |
| # Test batch-experiment command help | |
| echo "Testing batch-experiment command help:" | |
| gaia batch-experiment --help | |
| # Test create-template command help | |
| echo "Testing create-template command help:" | |
| gaia create-template --help | |
| # Test visualize command help | |
| echo "Testing visualize command help:" | |
| gaia visualize --help | |
| # Test test command help | |
| echo "Testing test command help:" | |
| gaia test --help | |
| # Test youtube command help | |
| echo "Testing youtube command help:" | |
| gaia youtube --help | |
| # Test kill command help | |
| echo "Testing kill command help:" | |
| gaia kill --help | |
| - name: Test platform compatibility | |
| run: | | |
| echo "=== Testing Platform Compatibility ===" | |
| # Test that Linux-specific process commands work | |
| echo "Testing kill command with invalid port (should handle gracefully):" | |
| if gaia kill --port 99999 2>&1 | grep -q "No process found"; then | |
| echo "✅ Kill command handled Linux environment gracefully" | |
| else | |
| echo "⚠️ Kill command may not be fully Linux-compatible" | |
| fi | |
| - name: Test import statements | |
| run: | | |
| echo "=== Testing Python Import Compatibility ===" | |
| # Test that all modules can be imported on Linux | |
| python -c " | |
| try: | |
| from gaia.cli import main | |
| from gaia.version import version | |
| from gaia.logger import get_logger | |
| from gaia.llm import LLMClient | |
| print('✅ All core imports successful on Linux') | |
| except ImportError as e: | |
| print(f'❌ Import error: {e}') | |
| exit(1) | |
| " | |
| - name: Summary | |
| run: | | |
| echo "=== Linux Full Integration Test Summary ===" | |
| echo "✅ GAIA CLI installation works on Linux" | |
| echo "✅ Python venv environment setup successful" | |
| echo "✅ Lemonade server installation and startup successful" | |
| echo "✅ Core CLI commands (chat, prompt, llm) working with Lemonade" | |
| echo "✅ Evaluation and utility commands working" | |
| echo "✅ Cross-platform process management working" | |
| echo "✅ Core Python modules import successfully" | |
| echo "" | |
| echo "🎉 Linux now has full GAIA CLI functionality!" | |
| echo "📋 Tested components:" | |
| echo " ✅ Lemonade server with Qwen3-0.6B-GGUF model" | |
| echo " ✅ Core CLI commands using Qwen model (chat, prompt, llm)" | |
| echo " ✅ Evaluation commands (eval, groundtruth, report, etc.)" | |
| echo " ✅ Summarizer CLI integration (gaia summarize command)" | |
| echo " ✅ RAG (Retrieval-Augmented Generation) functionality" | |
| echo " ✅ Lemonade client integration (API tests)" | |
| echo " ✅ Cross-platform compatibility" | |
| echo " ✅ Process management and cleanup" | |
| echo "" | |
| echo "🚀 Next enhancements:" | |
| echo " 🔧 Test audio/TTS functionality on Linux" | |
| echo " 🔧 Add Linux NPU driver support (if available)" | |
| echo " 🔧 Optimize model loading and performance" |