Run plano natively by default (#744)

This commit is contained in:
Adil Hafeez 2026-03-05 07:35:25 -08:00 committed by GitHub
parent 198c912202
commit f63d5de02c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
56 changed files with 1557 additions and 256 deletions

View file

@ -53,6 +53,60 @@ jobs:
- name: Run tests
run: uv run pytest
# ──────────────────────────────────────────────
# Native mode smoke test — build from source & start natively
# ──────────────────────────────────────────────
native-smoke-test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip1
- name: Install planoai CLI
working-directory: ./cli
run: |
uv sync
uv tool install .
- name: Build native binaries
run: planoai build
- name: Start plano natively
env:
OPENAI_API_KEY: test-key-not-used
run: planoai up tests/e2e/config_native_smoke.yaml
- name: Health check
run: |
for i in $(seq 1 30); do
if curl -sf http://localhost:12000/healthz > /dev/null 2>&1; then
echo "Health check passed"
exit 0
fi
sleep 1
done
echo "Health check failed after 30s"
cat ~/.plano/run/logs/envoy.log || true
cat ~/.plano/run/logs/brightstaff.log || true
exit 1
- name: Stop plano
if: always()
run: planoai down || true
# ──────────────────────────────────────────────
# Single Docker build — shared by all downstream jobs
# ──────────────────────────────────────────────
@ -98,7 +152,6 @@ jobs:
# Validate plano config
# ──────────────────────────────────────────────
validate-config:
needs: docker-build
runs-on: ubuntu-latest
steps:
- name: Checkout code
@ -109,14 +162,8 @@ jobs:
with:
python-version: "3.14"
- name: Download plano image
uses: actions/download-artifact@v7
with:
name: plano-image
path: /tmp
- name: Load plano image
run: docker load -i /tmp/plano-image.tar
- name: Install planoai
run: pip install ./cli
- name: Validate plano config
run: bash config/validate_plano_config.sh

109
.github/workflows/publish-binaries.yml vendored Normal file
View file

@ -0,0 +1,109 @@
name: Publish pre-compiled binaries (release)
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Release tag to upload binaries to (e.g. 0.4.9)"
required: true
permissions:
contents: write
jobs:
build-wasm-plugins:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasip1
- name: Build WASM plugins
working-directory: crates
run: cargo build --release --target wasm32-wasip1 -p llm_gateway -p prompt_gateway
- name: Compress and upload WASM plugins to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gzip -k crates/target/wasm32-wasip1/release/prompt_gateway.wasm
gzip -k crates/target/wasm32-wasip1/release/llm_gateway.wasm
gh release upload "${{ github.event.release.tag_name || inputs.tag }}" \
crates/target/wasm32-wasip1/release/prompt_gateway.wasm.gz \
crates/target/wasm32-wasip1/release/llm_gateway.wasm.gz \
--clobber
build-brightstaff-linux-amd64:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build brightstaff
working-directory: crates
run: cargo build --release -p brightstaff
- name: Compress and upload brightstaff to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp crates/target/release/brightstaff brightstaff-linux-amd64
gzip brightstaff-linux-amd64
gh release upload "${{ github.event.release.tag_name || inputs.tag }}" \
brightstaff-linux-amd64.gz \
--clobber
build-brightstaff-linux-arm64:
runs-on: [linux-arm64]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build brightstaff
working-directory: crates
run: cargo build --release -p brightstaff
- name: Compress and upload brightstaff to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp crates/target/release/brightstaff brightstaff-linux-arm64
gzip brightstaff-linux-arm64
gh release upload "${{ github.event.release.tag_name || inputs.tag }}" \
brightstaff-linux-arm64.gz \
--clobber
build-brightstaff-darwin-arm64:
runs-on: macos-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
- name: Build brightstaff
working-directory: crates
run: cargo build --release -p brightstaff
- name: Compress and upload brightstaff to release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cp crates/target/release/brightstaff brightstaff-darwin-arm64
gzip brightstaff-darwin-arm64
gh release upload "${{ github.event.release.tag_name || inputs.tag }}" \
brightstaff-darwin-arm64.gz \
--clobber