Repository navigation
Update CI and release workflows to use packaged artifacts and gated inference smoke tests #235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
8c66e67
4b31d35
fb53044
a4dd618
f1538ee
0205ff6
6c6fcb3
61cc727
281d41b
c6e4614
5d3b82d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -143,76 +143,28 @@ jobs: | |||||||||||||||
| cmake -B llama.cpp/build -S llama.cpp \ | ||||||||||||||||
| -DGGML_METAL=OFF \ | ||||||||||||||||
| -DGGML_CUDA=OFF \ | ||||||||||||||||
| -DGGML_NATIVE=OFF \ | ||||||||||||||||
| -DGGML_RPC=ON \ | ||||||||||||||||
| -DBUILD_SHARED_LIBS=OFF \ | ||||||||||||||||
| -DLLAMA_OPENSSL=OFF \ | ||||||||||||||||
| "${CACHE_FLAGS[@]}" | ||||||||||||||||
| cmake --build llama.cpp/build --config Release -j$(nproc) --target rpc-server llama-server llama-moe-split | ||||||||||||||||
|
|
||||||||||||||||
| # ── Download model ── | ||||||||||||||||
| - name: Cache model | ||||||||||||||||
| id: cache-model | ||||||||||||||||
| uses: actions/cache@v5 | ||||||||||||||||
| with: | ||||||||||||||||
| path: ~/.models/${{ env.MODEL_FILE }} | ||||||||||||||||
| key: ${{ env.CACHE_NAMESPACE }}-${{ runner.os }}-model-${{ env.MODEL_FILE }}-${{ hashFiles('.github/cache-version.txt', '.github/workflows/ci.yml') }} | ||||||||||||||||
|
|
||||||||||||||||
| - name: Download model | ||||||||||||||||
| if: steps.cache-model.outputs.cache-hit != 'true' | ||||||||||||||||
| run: | | ||||||||||||||||
| mkdir -p ~/.models | ||||||||||||||||
| curl -fSL "$MODEL_URL" -o ~/.models/$MODEL_FILE | ||||||||||||||||
| ls -lh ~/.models/$MODEL_FILE | ||||||||||||||||
|
|
||||||||||||||||
| # ── Integration smoke test ── | ||||||||||||||||
| - name: Smoke test (real inference) | ||||||||||||||||
| - name: Package Linux binaries | ||||||||||||||||
| run: | | ||||||||||||||||
| scripts/ci-smoke-test.sh \ | ||||||||||||||||
| target/debug/mesh-llm \ | ||||||||||||||||
| llama.cpp/build/bin \ | ||||||||||||||||
| ~/.models/$MODEL_FILE | ||||||||||||||||
| mkdir -p ci-artifacts/linux-binaries | ||||||||||||||||
| cp target/debug/mesh-llm ci-artifacts/linux-binaries/ | ||||||||||||||||
| cp llama.cpp/build/bin/rpc-server ci-artifacts/linux-binaries/ | ||||||||||||||||
| cp llama.cpp/build/bin/llama-server ci-artifacts/linux-binaries/ | ||||||||||||||||
| cp llama.cpp/build/bin/llama-moe-split ci-artifacts/linux-binaries/ | ||||||||||||||||
| tar -czf ci-artifacts/linux-binaries.tgz -C ci-artifacts linux-binaries | ||||||||||||||||
|
|
||||||||||||||||
| - name: OpenAI Python compat smoke | ||||||||||||||||
| run: | | ||||||||||||||||
| scripts/ci-compat-smoke.sh \ | ||||||||||||||||
| target/debug/mesh-llm \ | ||||||||||||||||
| llama.cpp/build/bin \ | ||||||||||||||||
| ~/.models/$MODEL_FILE | ||||||||||||||||
|
|
||||||||||||||||
| - name: Split-mode test (host/worker routing) | ||||||||||||||||
| run: | | ||||||||||||||||
| scripts/ci-split-test.sh \ | ||||||||||||||||
| target/debug/mesh-llm \ | ||||||||||||||||
| llama.cpp/build/bin \ | ||||||||||||||||
| ~/.models/$MODEL_FILE | ||||||||||||||||
|
|
||||||||||||||||
| # ── MoE split test ── | ||||||||||||||||
| - name: Cache MoE model | ||||||||||||||||
| id: cache-moe-model | ||||||||||||||||
| uses: actions/cache@v5 | ||||||||||||||||
| - name: Upload Linux binaries | ||||||||||||||||
| uses: actions/upload-artifact@v6 | ||||||||||||||||
| with: | ||||||||||||||||
| path: ~/.models/${{ env.MOE_MODEL_FILE }} | ||||||||||||||||
| key: ${{ env.CACHE_NAMESPACE }}-${{ runner.os }}-model-${{ env.MOE_MODEL_FILE }}-${{ hashFiles('.github/cache-version.txt', '.github/workflows/ci.yml') }} | ||||||||||||||||
|
|
||||||||||||||||
| - name: Download MoE model | ||||||||||||||||
| if: steps.cache-moe-model.outputs.cache-hit != 'true' | ||||||||||||||||
| run: | | ||||||||||||||||
| mkdir -p ~/.models | ||||||||||||||||
| curl -fSL "$MOE_MODEL_URL" -o ~/.models/$MOE_MODEL_FILE | ||||||||||||||||
| ls -lh ~/.models/$MOE_MODEL_FILE | ||||||||||||||||
|
|
||||||||||||||||
| - name: MoE split test (expert sharding) | ||||||||||||||||
| run: | | ||||||||||||||||
| scripts/ci-moe-split-test.sh \ | ||||||||||||||||
| llama.cpp/build/bin \ | ||||||||||||||||
| ~/.models/$MOE_MODEL_FILE | ||||||||||||||||
|
|
||||||||||||||||
| - name: MoE mesh test (expert sharding end-to-end) | ||||||||||||||||
| run: | | ||||||||||||||||
| scripts/ci-moe-mesh-test.sh \ | ||||||||||||||||
| target/debug/mesh-llm \ | ||||||||||||||||
| llama.cpp/build/bin \ | ||||||||||||||||
| ~/.models/$MOE_MODEL_FILE | ||||||||||||||||
| name: linux-binaries | ||||||||||||||||
| path: ci-artifacts/linux-binaries.tgz | ||||||||||||||||
| if-no-files-found: error | ||||||||||||||||
|
|
||||||||||||||||
| - name: CLI smoke test | ||||||||||||||||
| run: | | ||||||||||||||||
|
|
@@ -257,11 +209,6 @@ jobs: | |||||||||||||||
| workspaces: . -> target | ||||||||||||||||
| prefix-key: ${{ env.CACHE_NAMESPACE }}-rust-${{ hashFiles('.github/cache-version.txt') }} | ||||||||||||||||
|
|
||||||||||||||||
| # Early-fail gate: runs before expensive compile/test work. | ||||||||||||||||
| - name: Check formatting | ||||||||||||||||
| working-directory: mesh-llm | ||||||||||||||||
| run: cargo fmt -- --check | ||||||||||||||||
|
|
||||||||||||||||
| # See linux job for rationale on building in dev/debug, not release. | ||||||||||||||||
| - name: Build mesh-llm binary (debug) | ||||||||||||||||
| run: cargo build -p mesh-llm --bin mesh-llm | ||||||||||||||||
|
|
@@ -284,43 +231,130 @@ jobs: | |||||||||||||||
| fi | ||||||||||||||||
| cmake -B llama.cpp/build -S llama.cpp \ | ||||||||||||||||
| -DGGML_METAL=OFF \ | ||||||||||||||||
| -DGGML_NATIVE=OFF \ | ||||||||||||||||
| -DGGML_RPC=ON \ | ||||||||||||||||
| -DBUILD_SHARED_LIBS=OFF \ | ||||||||||||||||
| -DLLAMA_OPENSSL=OFF \ | ||||||||||||||||
| "${CACHE_FLAGS[@]}" | ||||||||||||||||
| cmake --build llama.cpp/build --config Release -j$(sysctl -n hw.ncpu) --target rpc-server llama-server llama-moe-split | ||||||||||||||||
|
|
||||||||||||||||
| # ── Download model ── | ||||||||||||||||
| - name: Cache model | ||||||||||||||||
| - name: Package macOS binaries | ||||||||||||||||
| run: | | ||||||||||||||||
| mkdir -p ci-artifacts/macos-binaries | ||||||||||||||||
| cp target/debug/mesh-llm ci-artifacts/macos-binaries/ | ||||||||||||||||
| cp llama.cpp/build/bin/rpc-server ci-artifacts/macos-binaries/ | ||||||||||||||||
| cp llama.cpp/build/bin/llama-server ci-artifacts/macos-binaries/ | ||||||||||||||||
| cp llama.cpp/build/bin/llama-moe-split ci-artifacts/macos-binaries/ 2>/dev/null || true | ||||||||||||||||
| cp llama.cpp/build/bin/*.dylib ci-artifacts/macos-binaries/ 2>/dev/null || true | ||||||||||||||||
| shopt -s nullglob | ||||||||||||||||
|
i386 marked this conversation as resolved.
Resolved
|
||||||||||||||||
| metallibs=(target/release/build/mlx-sys-*/out/build/lib/mlx.metallib) | ||||||||||||||||
|
i386 marked this conversation as resolved.
Resolved
|
||||||||||||||||
| if [ "${#metallibs[@]}" -gt 0 ]; then | ||||||||||||||||
| cp "${metallibs[0]}" ci-artifacts/macos-binaries/mlx.metallib | ||||||||||||||||
| fi | ||||||||||||||||
|
i386 marked this conversation as resolved.
Resolved
|
||||||||||||||||
| tar -czf ci-artifacts/macos-binaries.tgz -C ci-artifacts macos-binaries | ||||||||||||||||
|
|
||||||||||||||||
| - name: Upload macOS binaries | ||||||||||||||||
| uses: actions/upload-artifact@v6 | ||||||||||||||||
| with: | ||||||||||||||||
| name: macos-binaries | ||||||||||||||||
| path: ci-artifacts/macos-binaries.tgz | ||||||||||||||||
| if-no-files-found: error | ||||||||||||||||
|
|
||||||||||||||||
| - name: CLI smoke test | ||||||||||||||||
| run: | | ||||||||||||||||
| target/debug/mesh-llm --version | ||||||||||||||||
| target/debug/mesh-llm --help | head -5 | ||||||||||||||||
|
|
||||||||||||||||
| - name: Client-auto boot test | ||||||||||||||||
| run: scripts/ci-client-auto-test.sh target/debug/mesh-llm | ||||||||||||||||
|
|
||||||||||||||||
| - name: Show sccache stats | ||||||||||||||||
| if: always() | ||||||||||||||||
| run: sccache --show-stats || true | ||||||||||||||||
|
|
||||||||||||||||
| inference_smoke_tests: | ||||||||||||||||
| needs: [changes, linux] | ||||||||||||||||
| if: ${{ needs.linux.result == 'success' && (github.event_name == 'workflow_dispatch' || needs.changes.outputs.rust == 'true') }} | ||||||||||||||||
| name: Inference Smoke Tests | ||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||
| steps: | ||||||||||||||||
| - uses: actions/checkout@v5 | ||||||||||||||||
|
|
||||||||||||||||
| - uses: actions/setup-node@v5 | ||||||||||||||||
| with: | ||||||||||||||||
| node-version: 24 | ||||||||||||||||
| cache: npm | ||||||||||||||||
| cache-dependency-path: | | ||||||||||||||||
| .github/cache-version.txt | ||||||||||||||||
| mesh-llm/ui/package-lock.json | ||||||||||||||||
|
|
||||||||||||||||
| - uses: actions/setup-python@v6 | ||||||||||||||||
| with: | ||||||||||||||||
| python-version: "3.12" | ||||||||||||||||
| cache: pip | ||||||||||||||||
| cache-dependency-path: | | ||||||||||||||||
| .github/cache-version.txt | ||||||||||||||||
| ci/requirements-ci-python.txt | ||||||||||||||||
|
|
||||||||||||||||
| - name: Install Python SDKs | ||||||||||||||||
| run: python -m pip install --upgrade pip -r ci/requirements-ci-python.txt | ||||||||||||||||
|
|
||||||||||||||||
| - name: Download Linux binaries | ||||||||||||||||
| uses: actions/download-artifact@v7 | ||||||||||||||||
| with: | ||||||||||||||||
| name: linux-binaries | ||||||||||||||||
| path: ci-artifacts | ||||||||||||||||
|
|
||||||||||||||||
| - name: Extract Linux binaries | ||||||||||||||||
| run: tar -xzf ci-artifacts/linux-binaries.tgz | ||||||||||||||||
|
|
||||||||||||||||
| - name: Stage binaries for inference smokes | ||||||||||||||||
| run: | | ||||||||||||||||
| mkdir -p target/debug llama.cpp/build/bin | ||||||||||||||||
| cp linux-binaries/mesh-llm target/debug/mesh-llm | ||||||||||||||||
| cp linux-binaries/rpc-server llama.cpp/build/bin/rpc-server | ||||||||||||||||
| cp linux-binaries/llama-server llama.cpp/build/bin/llama-server | ||||||||||||||||
| cp linux-binaries/llama-moe-split llama.cpp/build/bin/llama-moe-split | ||||||||||||||||
| test -x target/debug/mesh-llm | ||||||||||||||||
| test -x llama.cpp/build/bin/rpc-server | ||||||||||||||||
| test -x llama.cpp/build/bin/llama-server | ||||||||||||||||
| test -x llama.cpp/build/bin/llama-moe-split | ||||||||||||||||
|
|
||||||||||||||||
| - name: Cache integration model | ||||||||||||||||
| id: cache-model | ||||||||||||||||
| uses: actions/cache@v5 | ||||||||||||||||
| with: | ||||||||||||||||
| path: ~/.models/${{ env.MODEL_FILE }} | ||||||||||||||||
| key: ${{ env.CACHE_NAMESPACE }}-${{ runner.os }}-model-${{ env.MODEL_FILE }}-${{ hashFiles('.github/cache-version.txt', '.github/workflows/ci.yml') }} | ||||||||||||||||
|
|
||||||||||||||||
| - name: Download model | ||||||||||||||||
| - name: Download integration model | ||||||||||||||||
| if: steps.cache-model.outputs.cache-hit != 'true' | ||||||||||||||||
| run: | | ||||||||||||||||
| mkdir -p ~/.models | ||||||||||||||||
| curl -fSL "$MODEL_URL" -o ~/.models/$MODEL_FILE | ||||||||||||||||
| ls -lh ~/.models/$MODEL_FILE | ||||||||||||||||
|
|
||||||||||||||||
| # ── Integration smoke test ── | ||||||||||||||||
| - name: Smoke test (real inference) | ||||||||||||||||
| run: | | ||||||||||||||||
| scripts/ci-smoke-test.sh \ | ||||||||||||||||
| target/debug/mesh-llm \ | ||||||||||||||||
| llama.cpp/build/bin \ | ||||||||||||||||
| ~/.models/$MODEL_FILE | ||||||||||||||||
|
|
||||||||||||||||
| - name: OpenAI Python compat smoke | ||||||||||||||||
| run: | | ||||||||||||||||
| scripts/ci-compat-smoke.sh \ | ||||||||||||||||
| target/debug/mesh-llm \ | ||||||||||||||||
| llama.cpp/build/bin \ | ||||||||||||||||
| ~/.models/$MODEL_FILE | ||||||||||||||||
|
|
||||||||||||||||
| - name: Split-mode test (host/worker routing) | ||||||||||||||||
| run: | | ||||||||||||||||
| scripts/ci-split-test.sh \ | ||||||||||||||||
| target/debug/mesh-llm \ | ||||||||||||||||
| llama.cpp/build/bin \ | ||||||||||||||||
| ~/.models/$MODEL_FILE | ||||||||||||||||
|
|
||||||||||||||||
| # ── MoE split test ── | ||||||||||||||||
| - name: Cache MoE model | ||||||||||||||||
| id: cache-moe-model | ||||||||||||||||
| uses: actions/cache@v5 | ||||||||||||||||
|
|
@@ -348,18 +382,6 @@ jobs: | |||||||||||||||
| llama.cpp/build/bin \ | ||||||||||||||||
| ~/.models/$MOE_MODEL_FILE | ||||||||||||||||
|
|
||||||||||||||||
| - name: CLI smoke test | ||||||||||||||||
| run: | | ||||||||||||||||
| target/debug/mesh-llm --version | ||||||||||||||||
| target/debug/mesh-llm --help | head -5 | ||||||||||||||||
|
|
||||||||||||||||
| - name: Client-auto boot test | ||||||||||||||||
| run: scripts/ci-client-auto-test.sh target/debug/mesh-llm | ||||||||||||||||
|
|
||||||||||||||||
| - name: Show sccache stats | ||||||||||||||||
| if: always() | ||||||||||||||||
| run: sccache --show-stats || true | ||||||||||||||||
|
|
||||||||||||||||
| linux_cuda: | ||||||||||||||||
| needs: changes | ||||||||||||||||
| if: ${{ github.event_name == 'workflow_dispatch' || needs.changes.outputs.rust == 'true' }} | ||||||||||||||||
|
|
@@ -536,6 +558,23 @@ jobs: | |||||||||||||||
| target/debug/mesh-llm --version | ||||||||||||||||
| target/debug/mesh-llm --help | head -5 | ||||||||||||||||
|
|
||||||||||||||||
| - name: Package Linux CUDA binaries | ||||||||||||||||
| shell: bash | ||||||||||||||||
| run: | | ||||||||||||||||
| mkdir -p ci-artifacts/linux-cuda-binaries | ||||||||||||||||
| cp target/debug/mesh-llm ci-artifacts/linux-cuda-binaries/ | ||||||||||||||||
| cp llama.cpp/build/bin/rpc-server ci-artifacts/linux-cuda-binaries/ | ||||||||||||||||
| cp llama.cpp/build/bin/llama-server ci-artifacts/linux-cuda-binaries/ | ||||||||||||||||
| cp llama.cpp/build/bin/llama-moe-split ci-artifacts/linux-cuda-binaries/ 2>/dev/null || true | ||||||||||||||||
|
||||||||||||||||
| cp llama.cpp/build/bin/llama-moe-split ci-artifacts/linux-cuda-binaries/ 2>/dev/null || true | |
| if [[ -f llama.cpp/build/bin/llama-moe-split ]]; then | |
| cp llama.cpp/build/bin/llama-moe-split ci-artifacts/linux-cuda-binaries/ | |
| else | |
| echo "INFO: llama-moe-split not present in this Linux CUDA build; omitting it from packaged artifacts." | |
| fi |
Copilot
AI
Apr 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lane also suppresses errors when copying llama-moe-split (2>/dev/null || true), which can hide unexpected build regressions and upload an incomplete tarball. Prefer either requiring the binary (fail if missing) or conditionally including it with an explicit log message when absent.
| cp llama.cpp/build/bin/llama-moe-split ci-artifacts/linux-rocm-binaries/ 2>/dev/null || true | |
| if [[ -f llama.cpp/build/bin/llama-moe-split ]]; then | |
| cp llama.cpp/build/bin/llama-moe-split ci-artifacts/linux-rocm-binaries/ | |
| else | |
| echo "INFO: llama-moe-split not present in llama.cpp/build/bin; skipping optional binary" | |
| fi |
Copilot
AI
Apr 10, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
llama-moe-split is copied with 2>/dev/null || true, which hides missing-binary errors and can result in a silently incomplete linux-vulkan-binaries.tgz. If the binary is optional here, make the omission explicit with a conditional + log; if it’s required, fail the step when it’s not present/executable.
| cp llama.cpp/build/bin/llama-moe-split ci-artifacts/linux-vulkan-binaries/ 2>/dev/null || true | |
| if [ -x llama.cpp/build/bin/llama-moe-split ]; then | |
| cp llama.cpp/build/bin/llama-moe-split ci-artifacts/linux-vulkan-binaries/ | |
| echo "Included optional binary: llama-moe-split" | |
| else | |
| echo "Optional binary not found or not executable, skipping: llama.cpp/build/bin/llama-moe-split" | |
| fi |
Uh oh!
There was an error while loading. Please reload this page.