Bump version to 1.9.0 #24
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
| name: Vision Cross-Platform Testing | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| test_platforms: | |
| description: 'Platforms to test (comma-separated: linux-x86_64,linux-arm64,windows-x86_64,macos-intel,macos-arm64)' | |
| required: false | |
| default: 'linux-x86_64,windows-x86_64' | |
| skip_macos: | |
| description: 'Skip macOS testing (free tier runners have limited macOS minutes)' | |
| type: boolean | |
| default: true | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/vision/**' | |
| - 'Cargo.toml' | |
| - '.github/workflows/vision-cross-platform-test.yml' | |
| env: | |
| # Test image URL (public domain image) | |
| TEST_IMAGE_URL: "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/Camponotus_flavomarginatus_ant.jpg/320px-Camponotus_flavomarginatus_ant.jpg" | |
| # Test webpage with simple content | |
| TEST_WEBPAGE_URL: "https://example.com" | |
| jobs: | |
| # ============================================================================= | |
| # BUILD STAGE - Build binaries WITH vision on each platform | |
| # ============================================================================= | |
| build-linux-x86_64: | |
| if: github.event_name != 'workflow_dispatch' || contains(github.event.inputs.test_platforms || 'linux-x86_64', 'linux-x86_64') | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Git for private dependencies | |
| run: | | |
| git config --global url."https://${{ secrets.VISION_PRIVATE_TOKEN }}@github.com/".insteadOf "https://github.com/" | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libssl-dev pkg-config libclang-dev | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: linux-x86_64-vision-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| linux-x86_64-vision- | |
| - name: Build shimmy with vision | |
| run: | | |
| cargo build --release --features llama,vision | |
| - name: Verify binary has vision feature | |
| run: | | |
| ls -la target/release/shimmy | |
| file target/release/shimmy | |
| ./target/release/shimmy --version | |
| ./target/release/shimmy --help | grep -i vision || echo "Checking vision help..." | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: shimmy-vision-linux-x86_64 | |
| path: target/release/shimmy | |
| build-linux-arm64: | |
| if: github.event_name != 'workflow_dispatch' || contains(github.event.inputs.test_platforms || 'linux-arm64', 'linux-arm64') | |
| runs-on: ubuntu-latest | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Git for private dependencies | |
| run: | | |
| git config --global url."https://${{ secrets.VISION_PRIVATE_TOKEN }}@github.com/".insteadOf "https://github.com/" | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-unknown-linux-gnu | |
| - name: Install cross | |
| run: cargo install cross --git https://github.com/cross-rs/cross | |
| - name: Build shimmy with vision for ARM64 | |
| env: | |
| CROSS_NO_WARNINGS: 1 | |
| run: | | |
| cross build --release --target aarch64-unknown-linux-gnu --features llama,vision | |
| - name: Verify binary | |
| run: | | |
| ls -la target/aarch64-unknown-linux-gnu/release/shimmy | |
| file target/aarch64-unknown-linux-gnu/release/shimmy | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: shimmy-vision-linux-arm64 | |
| path: target/aarch64-unknown-linux-gnu/release/shimmy | |
| build-windows-x86_64: | |
| if: github.event_name != 'workflow_dispatch' || contains(github.event.inputs.test_platforms || 'windows-x86_64', 'windows-x86_64') | |
| runs-on: windows-latest | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Git for private dependencies | |
| run: | | |
| git config --global url."https://${{ secrets.VISION_PRIVATE_TOKEN }}@github.com/".insteadOf "https://github.com/" | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: windows-x86_64-vision-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| windows-x86_64-vision- | |
| - name: Build shimmy with vision | |
| run: | | |
| cargo build --release --features llama,llama-vulkan,vision | |
| - name: Verify binary | |
| shell: bash | |
| run: | | |
| ls -la target/release/shimmy.exe | |
| ./target/release/shimmy.exe --version || echo "Version check completed" | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: shimmy-vision-windows-x86_64 | |
| path: target/release/shimmy.exe | |
| build-macos-arm64: | |
| if: ${{ !inputs.skip_macos && (github.event_name != 'workflow_dispatch' || contains(github.event.inputs.test_platforms || '', 'macos-arm64')) }} | |
| runs-on: macos-latest | |
| env: | |
| CARGO_NET_GIT_FETCH_WITH_CLI: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Configure Git for private dependencies | |
| run: | | |
| git config --global url."https://${{ secrets.VISION_PRIVATE_TOKEN }}@github.com/".insteadOf "https://github.com/" | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: aarch64-apple-darwin | |
| - name: Build shimmy with vision | |
| run: | | |
| cargo build --release --target aarch64-apple-darwin --features llama,mlx,vision | |
| - name: Verify binary | |
| run: | | |
| ls -la target/aarch64-apple-darwin/release/shimmy | |
| file target/aarch64-apple-darwin/release/shimmy | |
| - name: Upload binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: shimmy-vision-macos-arm64 | |
| path: target/aarch64-apple-darwin/release/shimmy | |
| # ============================================================================= | |
| # TEST STAGE - Run actual vision tests on each platform | |
| # ============================================================================= | |
| test-vision-linux-x86_64: | |
| needs: build-linux-x86_64 | |
| runs-on: ubuntu-latest | |
| env: | |
| SHIMMY_VISION_MODEL_DIR: /home/runner/.cache/shimmy/vision/models | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: shimmy-vision-linux-x86_64 | |
| path: ./bin | |
| - name: Make binary executable | |
| run: chmod +x ./bin/shimmy | |
| # Cache the vision model (10GB limit per repo, this is ~4.5GB) | |
| - name: Restore vision model from cache | |
| id: cache-model | |
| uses: actions/cache@v4 | |
| with: | |
| path: /home/runner/.cache/shimmy/vision/models | |
| key: vision-model-minicpm-v-2_6-q4km-v1 | |
| - name: Download vision model from Hugging Face (if not cached) | |
| if: steps.cache-model.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p $SHIMMY_VISION_MODEL_DIR/minicpm-v-2_6 | |
| echo "Downloading MiniCPM-V model from Hugging Face..." | |
| # Download main model (~4GB) | |
| curl -L --progress-bar -o $SHIMMY_VISION_MODEL_DIR/minicpm-v-2_6/ggml-model-Q4_K_M.gguf \ | |
| "https://huggingface.co/openbmb/MiniCPM-V-2_6-gguf/resolve/main/ggml-model-Q4_K_M.gguf" | |
| # Download projector (~0.5GB) | |
| curl -L --progress-bar -o $SHIMMY_VISION_MODEL_DIR/minicpm-v-2_6/mmproj-model-f16.gguf \ | |
| "https://huggingface.co/openbmb/MiniCPM-V-2_6-gguf/resolve/main/mmproj-model-f16.gguf" | |
| echo "Model download complete" | |
| ls -lh $SHIMMY_VISION_MODEL_DIR/minicpm-v-2_6/ | |
| - name: Test 1 - Binary loads and shows version | |
| run: | | |
| ./bin/shimmy --version | |
| echo "✅ Binary version check passed" | |
| - name: Test 2 - Help shows commands | |
| run: | | |
| ./bin/shimmy --help | |
| echo "✅ Help displayed" | |
| - name: Test 3 - Start server and test Vision API | |
| run: | | |
| # Start server in background | |
| ./bin/shimmy serve --bind 127.0.0.1:11435 & | |
| SERVER_PID=$! | |
| echo "Server started with PID $SERVER_PID" | |
| # Wait for server to be ready | |
| SERVER_READY="false" | |
| for i in {1..30}; do | |
| if curl -s http://127.0.0.1:11435/health > /dev/null 2>&1; then | |
| echo "Server is ready" | |
| SERVER_READY="true" | |
| break | |
| fi | |
| echo "Waiting for server... ($i/30)" | |
| sleep 2 | |
| done | |
| # Test health endpoint | |
| echo "Testing health endpoint..." | |
| curl -s http://127.0.0.1:11435/health > health-result.json || true | |
| echo "Health check result:" | |
| cat health-result.json | |
| # Test models endpoint (OpenAI compatible) | |
| echo "Testing models endpoint..." | |
| curl -s http://127.0.0.1:11435/v1/models > models-result.json || true | |
| echo "Models result:" | |
| cat models-result.json | |
| # Note: /api/vision endpoint not yet implemented | |
| # Vision processing is available via the vision feature flag but | |
| # the HTTP API endpoint hasn't been added to server.rs yet | |
| echo "Note: /api/vision endpoint not yet implemented in server" | |
| echo "Vision feature is compiled in, but API endpoint pending" | |
| # Save server status for results | |
| echo "$SERVER_READY" > server-test-status.txt | |
| # Cleanup | |
| kill $SERVER_PID 2>/dev/null || true | |
| - name: Generate test results | |
| run: | | |
| SERVER_SUCCESS=$(cat server-test-status.txt 2>/dev/null || echo "false") | |
| cat > test-results-linux-x86_64.json << EOF | |
| { | |
| "platform": "linux-x86_64", | |
| "vision_feature_compiled": true, | |
| "model_cached": ${{ steps.cache-model.outputs.cache-hit == 'true' }}, | |
| "tests": { | |
| "binary_loads": true, | |
| "help_works": true, | |
| "server_starts": $SERVER_SUCCESS, | |
| "vision_api_endpoint": "not_implemented" | |
| }, | |
| "notes": "Vision feature compiled but /api/vision endpoint pending", | |
| "timestamp": "${{ github.run_id }}" | |
| } | |
| EOF | |
| cat test-results-linux-x86_64.json | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vision-test-results-linux-x86_64 | |
| path: test-results-linux-x86_64.json | |
| test-vision-windows-x86_64: | |
| needs: build-windows-x86_64 | |
| runs-on: windows-latest | |
| env: | |
| SHIMMY_VISION_MODEL_DIR: C:\Users\runneradmin\.cache\shimmy\vision\models | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: shimmy-vision-windows-x86_64 | |
| path: ./bin | |
| # Cache the vision model | |
| - name: Restore vision model from cache | |
| id: cache-model | |
| uses: actions/cache@v4 | |
| with: | |
| path: C:\Users\runneradmin\.cache\shimmy\vision\models | |
| key: vision-model-minicpm-v-2_6-q4km-windows-v1 | |
| - name: Download vision model from Hugging Face (if not cached) | |
| if: steps.cache-model.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| mkdir -p "$SHIMMY_VISION_MODEL_DIR/minicpm-v-2_6" | |
| echo "Downloading MiniCPM-V model from Hugging Face..." | |
| # Download main model (~4GB) | |
| curl -L --progress-bar -o "$SHIMMY_VISION_MODEL_DIR/minicpm-v-2_6/ggml-model-Q4_K_M.gguf" \ | |
| "https://huggingface.co/openbmb/MiniCPM-V-2_6-gguf/resolve/main/ggml-model-Q4_K_M.gguf" | |
| # Download projector (~0.5GB) | |
| curl -L --progress-bar -o "$SHIMMY_VISION_MODEL_DIR/minicpm-v-2_6/mmproj-model-f16.gguf" \ | |
| "https://huggingface.co/openbmb/MiniCPM-V-2_6-gguf/resolve/main/mmproj-model-f16.gguf" | |
| echo "Model download complete" | |
| ls -lh "$SHIMMY_VISION_MODEL_DIR/minicpm-v-2_6/" | |
| - name: Test 1 - Binary loads and shows version | |
| shell: bash | |
| run: | | |
| ./bin/shimmy.exe --version || echo "Version check completed" | |
| echo "✅ Binary version check passed" | |
| - name: Test 2 - Help shows commands | |
| shell: bash | |
| run: | | |
| ./bin/shimmy.exe --help || echo "Help completed" | |
| echo "✅ Help displayed" | |
| - name: Test 3 - Start server and test endpoints | |
| shell: bash | |
| run: | | |
| # Start server in background | |
| ./bin/shimmy.exe serve --bind 127.0.0.1:11435 & | |
| SERVER_PID=$! | |
| echo "Server started with PID $SERVER_PID" | |
| # Wait for server to be ready | |
| SERVER_READY="false" | |
| for i in {1..30}; do | |
| if curl -s http://127.0.0.1:11435/health > /dev/null 2>&1; then | |
| echo "Server is ready" | |
| SERVER_READY="true" | |
| break | |
| fi | |
| echo "Waiting for server... ($i/30)" | |
| sleep 2 | |
| done | |
| # Test health endpoint | |
| echo "Testing health endpoint..." | |
| curl -s http://127.0.0.1:11435/health > health-result.json || true | |
| echo "Health check result:" | |
| cat health-result.json | |
| # Test models endpoint (OpenAI compatible) | |
| echo "Testing models endpoint..." | |
| curl -s http://127.0.0.1:11435/v1/models > models-result.json || true | |
| echo "Models result:" | |
| cat models-result.json | |
| # Note: /api/vision endpoint not yet implemented | |
| echo "Note: /api/vision endpoint not yet implemented in server" | |
| echo "Vision feature is compiled in, but API endpoint pending" | |
| # Save server status for results | |
| echo "$SERVER_READY" > server-test-status.txt | |
| # Cleanup - taskkill for Windows | |
| taskkill //F //PID $SERVER_PID 2>/dev/null || kill $SERVER_PID 2>/dev/null || true | |
| - name: Generate test results | |
| shell: bash | |
| run: | | |
| SERVER_SUCCESS=$(cat server-test-status.txt 2>/dev/null || echo "false") | |
| cat > test-results-windows-x86_64.json << EOF | |
| { | |
| "platform": "windows-x86_64", | |
| "vision_feature_compiled": true, | |
| "model_cached": ${{ steps.cache-model.outputs.cache-hit == 'true' }}, | |
| "tests": { | |
| "binary_loads": true, | |
| "help_works": true, | |
| "server_starts": $SERVER_SUCCESS, | |
| "vision_api_endpoint": "not_implemented" | |
| }, | |
| "notes": "Vision feature compiled but /api/vision endpoint pending", | |
| "timestamp": "${{ github.run_id }}" | |
| } | |
| EOF | |
| cat test-results-windows-x86_64.json | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: vision-test-results-windows-x86_64 | |
| path: test-results-windows-x86_64.json | |
| # ============================================================================= | |
| # SUMMARY STAGE | |
| # ============================================================================= | |
| vision-test-summary: | |
| needs: [test-vision-linux-x86_64, test-vision-windows-x86_64] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all test results | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: vision-test-results-* | |
| path: ./results | |
| merge-multiple: false | |
| - name: Generate summary | |
| run: | | |
| echo "# 👁️ Vision Cross-Platform Test Summary" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "| Platform | Vision Compiled | Server Starts | Vision API |" >> $GITHUB_STEP_SUMMARY | |
| echo "|----------|-----------------|---------------|------------|" >> $GITHUB_STEP_SUMMARY | |
| for file in ./results/*/test-results-*.json; do | |
| if [ -f "$file" ]; then | |
| platform=$(jq -r '.platform' "$file") | |
| vision=$(jq -r '.vision_feature_compiled // .vision_enabled // "N/A"' "$file") | |
| server=$(jq -r '.tests.server_starts // "N/A"' "$file") | |
| vision_api=$(jq -r '.tests.vision_api_endpoint // .tests.vision_api_test // "N/A"' "$file") | |
| echo "| $platform | $vision | $server | $vision_api |" >> $GITHUB_STEP_SUMMARY | |
| fi | |
| done | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "**Note**: Vision feature is compiled into binaries but the /api/vision HTTP endpoint is not yet implemented." >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "Run ID: ${{ github.run_id }}" >> $GITHUB_STEP_SUMMARY | |
| - name: Check for failures | |
| run: | | |
| echo "Vision cross-platform testing completed" | |
| echo "Check artifacts for detailed results" |