ruvector/.github/workflows/graph-release.yml
Claude f3f7a95752 feat: Add Neo4j-compatible hypergraph database package (ruvector-graph)
Major new package implementing a distributed hypergraph database with:

## Core Components (crates/ruvector-graph/)
- Cypher-compatible query parser with lexer, AST, optimizer
- Query execution engine with SIMD optimization and parallel execution
- ACID transaction support with MVCC isolation levels
- Distributed consensus and federation layer
- Vector-graph hybrid queries for AI/RAG workloads
- Performance optimizations (100x faster than Neo4j target)

## Bindings
- WASM bindings (crates/ruvector-graph-wasm/)
- NAPI-RS Node.js bindings (crates/ruvector-graph-node/)
- NPM packages for both targets

## CLI Integration
- 8 new graph commands: create, query, shell, import, export, info, benchmark, serve

## CI/CD
- Updated build-native.yml for graph packages
- New graph-ci.yml for testing and benchmarks
- New graph-release.yml for automated publishing

## Data Generation
- OpenRouter/Kimi K2 integration (packages/graph-data-generator/)
- Agentic-synth benchmark suite integration

## Tests & Benchmarks
- 11 test files covering all components
- Criterion benchmarks for performance validation
- Neo4j compatibility test suite

## Architecture Highlights
- CSR graph layout for cache-friendly access
- SIMD-vectorized query operators
- Roaring bitmaps for label indexes
- Bloom filters for fast negative lookups
- Adaptive radix tree for property indexes

Note: This is a comprehensive implementation created by 15 parallel agents.
Some integration fixes may be needed to resolve cross-module dependencies.

Co-authored-by: Claude AI Swarm <swarm@claude.ai>
2025-11-25 23:11:54 +00:00

291 lines
8.3 KiB
YAML

name: Graph Release
on:
push:
tags:
- 'graph-v*'
workflow_dispatch:
inputs:
version:
description: 'Version to release (e.g., 0.1.0)'
required: true
type: string
env:
CARGO_TERM_COLOR: always
jobs:
build-release:
name: Build Release ${{ matrix.settings.platform }}
runs-on: ${{ matrix.settings.host }}
strategy:
fail-fast: false
matrix:
settings:
- host: ubuntu-22.04
target: x86_64-unknown-linux-gnu
platform: linux-x64-gnu
- host: ubuntu-22.04
target: aarch64-unknown-linux-gnu
platform: linux-arm64-gnu
- host: macos-15-intel
target: x86_64-apple-darwin
platform: darwin-x64
- host: macos-14
target: aarch64-apple-darwin
platform: darwin-arm64
- host: windows-2022
target: x86_64-pc-windows-msvc
platform: win32-x64-msvc
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
key: graph-release-${{ matrix.settings.target }}
- name: Install cross-compilation tools (Linux ARM64)
if: matrix.settings.platform == 'linux-arm64-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
- name: Install dependencies
working-directory: npm
run: npm ci
- name: Build optimized NAPI module
working-directory: npm/packages/graph-node
run: npm run build:napi -- --target ${{ matrix.settings.target }} --release
env:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
- name: Test release build (native platform only)
if: |
(matrix.settings.platform == 'linux-x64-gnu' && runner.os == 'Linux') ||
(matrix.settings.platform == 'darwin-x64' && runner.os == 'macOS' && runner.arch == 'X64') ||
(matrix.settings.platform == 'darwin-arm64' && runner.os == 'macOS' && runner.arch == 'ARM64') ||
(matrix.settings.platform == 'win32-x64-msvc' && runner.os == 'Windows')
working-directory: npm/packages/graph-node
run: npm test
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.settings.platform }}
path: npm/packages/graph-node/*.node
if-no-files-found: error
build-wasm-release:
name: Build WASM Release
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: wasm32-unknown-unknown
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
key: graph-wasm-release
- name: Build optimized WASM
working-directory: npm/packages/graph-wasm
run: npm run build:wasm -- --release
- name: Upload WASM artifact
uses: actions/upload-artifact@v4
with:
name: wasm-release
path: npm/packages/graph-wasm/pkg/
publish-npm:
name: Publish to npm
runs-on: ubuntu-22.04
needs: [build-release, build-wasm-release]
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Download all NAPI artifacts
uses: actions/download-artifact@v4
with:
pattern: release-*
path: artifacts/napi
- name: Download WASM artifact
uses: actions/download-artifact@v4
with:
name: wasm-release
path: npm/packages/graph-wasm/pkg/
- name: Copy binaries to packages
run: |
for dir in artifacts/napi/release-*/; do
platform=$(basename "$dir" | sed 's/release-//')
mkdir -p "npm/graph/platforms/${platform}"
cp -v "$dir"/*.node "npm/graph/platforms/${platform}/"
done
- name: Install dependencies
working-directory: npm
run: npm ci
- name: Publish graph-node platform packages
working-directory: npm/packages/graph-node
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run publish:platforms
- name: Publish graph-node main package
working-directory: npm/packages/graph-node
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public
- name: Publish graph-wasm package
working-directory: npm/packages/graph-wasm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public
publish-cargo:
name: Publish to crates.io
runs-on: ubuntu-22.04
needs: [build-release]
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Login to crates.io
run: cargo login ${{ secrets.CARGO_TOKEN }}
- name: Publish ruvector-graph
working-directory: crates/ruvector-graph
run: cargo publish --allow-dirty
create-github-release:
name: Create GitHub Release
runs-on: ubuntu-22.04
needs: [publish-npm, publish-cargo]
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: release-artifacts
- name: Generate release notes
id: notes
run: |
VERSION=${GITHUB_REF#refs/tags/graph-v}
if [ -z "$VERSION" ]; then
VERSION="${{ inputs.version }}"
fi
cat > release-notes.md <<EOF
# RuVector Graph v${VERSION}
## What's New
### Features
- Neo4j-inspired hypergraph database for vector relationships
- NAPI bindings for all major platforms
- WebAssembly support for browser environments
- High-performance graph traversal and querying
### Platforms
- Linux (x64, ARM64)
- macOS (Intel, Apple Silicon)
- Windows (x64)
- WebAssembly
### Installation
**Node.js:**
\`\`\`bash
npm install @ruvector/graph-node
\`\`\`
**WASM:**
\`\`\`bash
npm install @ruvector/graph-wasm
\`\`\`
**Rust:**
\`\`\`bash
cargo add ruvector-graph
\`\`\`
### Performance
See benchmark results in the CI artifacts.
### Documentation
Visit [docs.ruvector.dev](https://docs.ruvector.dev) for full documentation.
EOF
echo "version=${VERSION}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: graph-v${{ steps.notes.outputs.version }}
name: Graph v${{ steps.notes.outputs.version }}
body_path: release-notes.md
draft: false
prerelease: false
files: |
release-artifacts/**/*.node
release-artifacts/**/pkg/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Notify success
run: |
echo "✅ Successfully released RuVector Graph v${{ steps.notes.outputs.version }}"
echo "📦 NPM: https://www.npmjs.com/package/@ruvector/graph-node"
echo "📦 Crates.io: https://crates.io/crates/ruvector-graph"
echo "🎉 GitHub Release: https://github.com/${{ github.repository }}/releases/tag/graph-v${{ steps.notes.outputs.version }}"