Squashed 'vendor/ruvector/' content from commit b64c2172
git-subtree-dir: vendor/ruvector git-subtree-split: b64c21726f2bb37286d9ee36a7869fef60cc6900
This commit is contained in:
283
examples/ruvLLM/esp32-flash/.github/workflows/release.yml
vendored
Normal file
283
examples/ruvLLM/esp32-flash/.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,283 @@
|
||||
name: Release Binaries
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'ruvllm-esp32-v*'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: 'Version tag (e.g., v0.2.0)'
|
||||
required: true
|
||||
default: 'v0.2.0'
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build-npm:
|
||||
name: Build npm package
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Package npm module
|
||||
working-directory: examples/ruvLLM/esp32-flash/npm
|
||||
run: |
|
||||
npm pack
|
||||
mv *.tgz ../ruvllm-esp32-npm.tgz
|
||||
|
||||
- name: Upload npm artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: npm-package
|
||||
path: examples/ruvLLM/esp32-flash/ruvllm-esp32-npm.tgz
|
||||
|
||||
build-rust:
|
||||
name: Build Rust (${{ matrix.target }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Linux x86_64
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
artifact: ruvllm-esp32-linux-x64
|
||||
features: host-test
|
||||
|
||||
# Linux ARM64
|
||||
- os: ubuntu-latest
|
||||
target: aarch64-unknown-linux-gnu
|
||||
artifact: ruvllm-esp32-linux-arm64
|
||||
features: host-test
|
||||
cross: true
|
||||
|
||||
# macOS x86_64
|
||||
- os: macos-latest
|
||||
target: x86_64-apple-darwin
|
||||
artifact: ruvllm-esp32-darwin-x64
|
||||
features: host-test
|
||||
|
||||
# macOS ARM64
|
||||
- os: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
artifact: ruvllm-esp32-darwin-arm64
|
||||
features: host-test
|
||||
|
||||
# Windows x86_64
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
artifact: ruvllm-esp32-win-x64
|
||||
features: host-test
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-action@stable
|
||||
with:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
- name: Install cross (Linux ARM64)
|
||||
if: matrix.cross
|
||||
run: cargo install cross --git https://github.com/cross-rs/cross
|
||||
|
||||
- name: Build binary
|
||||
working-directory: examples/ruvLLM/esp32-flash
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ matrix.cross }}" = "true" ]; then
|
||||
cross build --release --target ${{ matrix.target }} --features ${{ matrix.features }}
|
||||
else
|
||||
cargo build --release --target ${{ matrix.target }} --features ${{ matrix.features }}
|
||||
fi
|
||||
|
||||
- name: Prepare artifacts (Unix)
|
||||
if: runner.os != 'Windows'
|
||||
working-directory: examples/ruvLLM/esp32-flash
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp target/${{ matrix.target }}/release/ruvllm-esp32 dist/${{ matrix.artifact }} 2>/dev/null || echo "Binary not found"
|
||||
chmod +x dist/${{ matrix.artifact }} 2>/dev/null || true
|
||||
|
||||
- name: Prepare artifacts (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
working-directory: examples/ruvLLM/esp32-flash
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Force -Path dist
|
||||
Copy-Item target/${{ matrix.target }}/release/ruvllm-esp32.exe dist/${{ matrix.artifact }}.exe -ErrorAction SilentlyContinue
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.artifact }}
|
||||
path: |
|
||||
examples/ruvLLM/esp32-flash/dist/*
|
||||
if-no-files-found: warn
|
||||
|
||||
build-wasm:
|
||||
name: Build WebAssembly
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Rust toolchain
|
||||
uses: dtolnay/rust-action@stable
|
||||
with:
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
- name: Install wasm-pack
|
||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
|
||||
- name: Build WASM
|
||||
working-directory: examples/ruvLLM/esp32-flash
|
||||
run: |
|
||||
wasm-pack build --target web --features wasm --no-default-features || echo "WASM build skipped"
|
||||
|
||||
- name: Package WASM
|
||||
working-directory: examples/ruvLLM/esp32-flash
|
||||
run: |
|
||||
mkdir -p wasm-dist
|
||||
if [ -d "pkg" ]; then
|
||||
cp -r pkg/* wasm-dist/
|
||||
else
|
||||
echo "WASM build not available" > wasm-dist/README.txt
|
||||
fi
|
||||
|
||||
- name: Upload WASM artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ruvllm-esp32-wasm
|
||||
path: examples/ruvLLM/esp32-flash/wasm-dist/
|
||||
|
||||
release:
|
||||
name: Create Release
|
||||
needs: [build-npm, build-rust, build-wasm]
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Prepare release assets
|
||||
run: |
|
||||
mkdir -p release
|
||||
|
||||
# Copy npm package
|
||||
cp artifacts/npm-package/*.tgz release/ 2>/dev/null || true
|
||||
|
||||
# Copy binaries
|
||||
for dir in artifacts/ruvllm-esp32-*; do
|
||||
if [ -d "$dir" ]; then
|
||||
name=$(basename $dir)
|
||||
if [ "$name" != "ruvllm-esp32-wasm" ]; then
|
||||
for f in $dir/*; do
|
||||
cp "$f" release/ 2>/dev/null || true
|
||||
done
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy WASM
|
||||
if [ -d "artifacts/ruvllm-esp32-wasm" ]; then
|
||||
cd artifacts/ruvllm-esp32-wasm && zip -r ../../release/ruvllm-esp32-wasm.zip . && cd ../..
|
||||
fi
|
||||
|
||||
ls -la release/
|
||||
|
||||
- name: Create checksums
|
||||
run: |
|
||||
cd release
|
||||
sha256sum * > checksums.txt 2>/dev/null || true
|
||||
cat checksums.txt
|
||||
|
||||
- name: Get version
|
||||
id: version
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
|
||||
echo "version=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "version=${GITHUB_REF#refs/tags/ruvllm-esp32-}" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: ruvllm-esp32-${{ steps.version.outputs.version }}
|
||||
name: RuvLLM ESP32 ${{ steps.version.outputs.version }}
|
||||
body: |
|
||||
## RuvLLM ESP32 ${{ steps.version.outputs.version }}
|
||||
|
||||
Full-featured LLM inference engine for ESP32 microcontrollers.
|
||||
|
||||
### Features
|
||||
- INT8/Binary quantized inference (~20KB RAM)
|
||||
- Product quantization (8-32x compression)
|
||||
- MicroLoRA on-device adaptation
|
||||
- HNSW vector search (1000+ vectors)
|
||||
- Semantic memory with RAG
|
||||
- Multi-chip federation (pipeline/tensor parallel)
|
||||
- Speculative decoding (2-4x speedup)
|
||||
- Anomaly detection
|
||||
|
||||
### Installation
|
||||
|
||||
**Via npm (recommended):**
|
||||
```bash
|
||||
npx ruvllm-esp32 install
|
||||
npx ruvllm-esp32 build --target esp32s3
|
||||
npx ruvllm-esp32 flash
|
||||
```
|
||||
|
||||
**Direct binary:**
|
||||
Download the appropriate binary for your platform from the assets below.
|
||||
|
||||
### Supported Platforms
|
||||
- Linux x64/ARM64
|
||||
- macOS x64/ARM64 (Apple Silicon)
|
||||
- Windows x64
|
||||
- WebAssembly (browser/Node.js)
|
||||
|
||||
### Supported ESP32 Variants
|
||||
- ESP32 (520KB SRAM)
|
||||
- ESP32-S2 (320KB SRAM)
|
||||
- ESP32-S3 (512KB SRAM + SIMD)
|
||||
- ESP32-C3 (400KB SRAM, RISC-V)
|
||||
- ESP32-C6 (512KB SRAM, RISC-V + WiFi 6)
|
||||
files: |
|
||||
release/*
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
publish-npm:
|
||||
name: Publish to npm
|
||||
needs: [release]
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Publish to npm
|
||||
working-directory: examples/ruvLLM/esp32-flash/npm
|
||||
run: npm publish --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
Reference in New Issue
Block a user