mirror of
https://github.com/samvallad33/vestige.git
synced 2026-04-26 01:06:21 +02:00
ort-sys v2.0.0-rc.11 has no prebuilt ONNX Runtime binaries for x86_64-apple-darwin, and vestige-mcp requires embeddings to compile. - Remove x86_64-apple-darwin from CI release matrix (discontinued 2020) - Fix vestige-mcp Cargo.toml: add default-features=false to vestige-core dep - Extract sanitize_fts5_query to always-available fts.rs module - Gate embeddings-only imports in storage/sqlite.rs behind #[cfg] Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
99 lines
2.6 KiB
YAML
99 lines
2.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
RUST_BACKTRACE: 1
|
|
|
|
jobs:
|
|
test:
|
|
name: Test (${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [macos-latest, ubuntu-latest]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: ${{ runner.os }}-cargo-
|
|
|
|
- name: Check
|
|
run: cargo check --workspace
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --workspace -- -D warnings
|
|
|
|
- name: Test
|
|
run: cargo test --workspace
|
|
|
|
release-build:
|
|
name: Release Build (${{ matrix.target }})
|
|
runs-on: ${{ matrix.os }}
|
|
if: github.ref == 'refs/heads/main'
|
|
needs: [test]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: macos-latest
|
|
target: aarch64-apple-darwin
|
|
cargo_flags: ""
|
|
# x86_64-apple-darwin dropped: ort-sys has no prebuilt ONNX Runtime
|
|
# binaries for Intel Mac, and the codebase requires embeddings.
|
|
# Apple discontinued Intel Macs in 2020. Build from source if needed.
|
|
- os: ubuntu-latest
|
|
target: x86_64-unknown-linux-gnu
|
|
cargo_flags: ""
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target/
|
|
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- name: Build release
|
|
run: cargo build --release --target ${{ matrix.target }} -p vestige-mcp ${{ matrix.cargo_flags }}
|
|
|
|
- name: Package
|
|
run: |
|
|
cd target/${{ matrix.target }}/release
|
|
tar czf ../../../vestige-mcp-${{ matrix.target }}.tar.gz vestige-mcp vestige vestige-restore
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: vestige-mcp-${{ matrix.target }}
|
|
path: vestige-mcp-${{ matrix.target }}.tar.gz
|