Skip to content

Commit 91f7841

Browse files
authored
Merge pull request #178 from ruvnet/feat/rvf-cli-release
feat: RVF CLI cross-platform release binaries
2 parents 1172544 + 2238362 commit 91f7841

2 files changed

Lines changed: 371 additions & 24 deletions

File tree

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
name: Release RVF CLI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'rvf-v*'
7+
workflow_dispatch:
8+
inputs:
9+
tag:
10+
description: 'Release tag (e.g. rvf-v0.1.0)'
11+
required: true
12+
13+
env:
14+
CARGO_TERM_COLOR: always
15+
16+
jobs:
17+
build:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- target: x86_64-unknown-linux-gnu
23+
os: ubuntu-22.04
24+
name: rvf-linux-x64
25+
ext: ''
26+
- target: aarch64-unknown-linux-gnu
27+
os: ubuntu-22.04
28+
name: rvf-linux-arm64
29+
ext: ''
30+
cross: true
31+
- target: x86_64-apple-darwin
32+
os: macos-14
33+
name: rvf-darwin-x64
34+
ext: ''
35+
- target: aarch64-apple-darwin
36+
os: macos-14
37+
name: rvf-darwin-arm64
38+
ext: ''
39+
- target: x86_64-pc-windows-msvc
40+
os: windows-2022
41+
name: rvf-windows-x64
42+
ext: .exe
43+
44+
name: Build ${{ matrix.name }}
45+
runs-on: ${{ matrix.os }}
46+
47+
steps:
48+
- uses: actions/checkout@v4
49+
50+
- name: Setup Rust
51+
uses: dtolnay/rust-toolchain@stable
52+
with:
53+
toolchain: stable
54+
targets: ${{ matrix.target }}
55+
56+
- name: Cache Rust
57+
uses: Swatinem/rust-cache@v2
58+
with:
59+
key: rvf-cli-${{ matrix.target }}
60+
61+
- name: Install cross-compilation tools (Linux ARM64)
62+
if: matrix.cross
63+
run: |
64+
sudo apt-get update
65+
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
66+
67+
- name: Build
68+
shell: bash
69+
run: cargo build -p rvf-cli --release --target ${{ matrix.target }}
70+
env:
71+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
72+
73+
- name: Package
74+
shell: bash
75+
run: |
76+
BINARY="target/${{ matrix.target }}/release/rvf${{ matrix.ext }}"
77+
ARCHIVE="${{ matrix.name }}${{ matrix.ext }}"
78+
79+
if [ "${{ matrix.ext }}" = ".exe" ]; then
80+
cp "$BINARY" "$ARCHIVE"
81+
else
82+
chmod +x "$BINARY"
83+
cp "$BINARY" "$ARCHIVE"
84+
fi
85+
86+
ls -lh "$ARCHIVE"
87+
88+
- name: Upload artifact
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: ${{ matrix.name }}
92+
path: ${{ matrix.name }}${{ matrix.ext }}
93+
if-no-files-found: error
94+
95+
release:
96+
name: Create GitHub Release
97+
needs: build
98+
runs-on: ubuntu-22.04
99+
if: startsWith(github.ref, 'refs/tags/rvf-v') || github.event_name == 'workflow_dispatch'
100+
permissions:
101+
contents: write
102+
103+
steps:
104+
- uses: actions/checkout@v4
105+
106+
- name: Download all artifacts
107+
uses: actions/download-artifact@v4
108+
with:
109+
path: artifacts
110+
111+
- name: Prepare release assets
112+
run: |
113+
mkdir -p release
114+
for dir in artifacts/*/; do
115+
name=$(basename "$dir")
116+
file=$(ls "$dir" | head -1)
117+
cp "$dir/$file" "release/$file"
118+
done
119+
ls -lh release/
120+
121+
- name: Compute checksums
122+
working-directory: release
123+
run: |
124+
sha256sum * > checksums-sha256.txt
125+
cat checksums-sha256.txt
126+
127+
- name: Determine tag
128+
id: tag
129+
run: |
130+
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
131+
echo "tag=${{ github.event.inputs.tag }}" >> "$GITHUB_OUTPUT"
132+
else
133+
echo "tag=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
134+
fi
135+
136+
- name: Create Release
137+
uses: softprops/action-gh-release@v2
138+
with:
139+
tag_name: ${{ steps.tag.outputs.tag }}
140+
name: "RVF CLI ${{ steps.tag.outputs.tag }}"
141+
body: |
142+
## RVF CLI Release
143+
144+
Standalone vector database CLI for creating, querying, and managing RVF stores.
145+
146+
### Download
147+
148+
| Platform | Binary |
149+
|----------|--------|
150+
| Linux x64 | `rvf-linux-x64` |
151+
| Linux ARM64 | `rvf-linux-arm64` |
152+
| macOS x64 (Intel) | `rvf-darwin-x64` |
153+
| macOS ARM64 (Apple Silicon) | `rvf-darwin-arm64` |
154+
| Windows x64 | `rvf-windows-x64.exe` |
155+
156+
### Quick start
157+
158+
```bash
159+
# Download (macOS ARM64 example)
160+
curl -L -o rvf https://github.com/ruvnet/ruvector/releases/download/${{ steps.tag.outputs.tag }}/rvf-darwin-arm64
161+
chmod +x rvf
162+
163+
# Create a store and query
164+
./rvf create mydb.rvf --dimension 128 --metric cosine
165+
./rvf status mydb.rvf
166+
```
167+
168+
See the [CLI README](https://github.com/ruvnet/ruvector/tree/main/crates/rvf/rvf-cli) for full documentation.
169+
files: release/*
170+
draft: false
171+
prerelease: false

0 commit comments

Comments
 (0)