Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
ruvector/.github/workflows/build-tiny-dancer.yml at main · bigdatasciencegroup/ruvector · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
See all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
bigdatasciencegroup
ruvector
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
ruvector
/
.github
/
workflows
/
build-tiny-dancer.yml
Copy path
View runs
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
244 lines (211 loc) · 8.14 KB
main
Breadcrumbs
ruvector
/
.github
/
workflows
/
build-tiny-dancer.yml
Copy path
Top
File metadata and controls
Code
Blame
244 lines (211 loc) · 8.14 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
name
:
Build Tiny Dancer Native Modules
on
:
push
:
branches
:
[main]
paths
:
-
'
crates/ruvector-tiny-dancer-core/**
'
-
'
crates/ruvector-tiny-dancer-node/**
'
-
'
npm/packages/tiny-dancer/**
'
-
'
.github/workflows/build-tiny-dancer.yml
'
tags
:
-
'
v*
'
pull_request
:
branches
:
[main]
paths
:
-
'
crates/ruvector-tiny-dancer-core/**
'
-
'
crates/ruvector-tiny-dancer-node/**
'
-
'
npm/packages/tiny-dancer/**
'
workflow_dispatch
:
inputs
:
publish
:
description
:
'
Publish to npm after build
'
required
:
false
type
:
boolean
default
:
false
env
:
CARGO_TERM_COLOR
:
always
jobs
:
build
:
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-13
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
name
:
Build Tiny Dancer ${{ matrix.settings.platform }}
runs-on
:
${{ matrix.settings.host }}
steps
:
-
uses
:
actions/checkout@v4
-
name
:
Setup Node.js
uses
:
actions/setup-node@v4
with
:
node-version
:
'
18
'
-
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
:
tiny-dancer-${{ 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/packages/tiny-dancer
run
:
npm install --ignore-scripts --omit=optional --force
-
name
:
Build native module
working-directory
:
npm/packages/tiny-dancer
run
:
|
npx napi build --platform --release --cargo-cwd ../../../crates/ruvector-tiny-dancer-node --target ${{ matrix.settings.target }}
env
:
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER
:
aarch64-linux-gnu-gcc
-
name
:
Find built .node files (debug)
shell
:
bash
run
:
|
echo "=== Searching for Tiny Dancer .node files ==="
find npm/packages/tiny-dancer -name "*.node" -type f 2>/dev/null ||
true
find crates/ruvector-tiny-dancer-node -name "*.node" -type f 2>/dev/null ||
true
-
name
:
Prepare artifact
shell
:
bash
run
:
|
mkdir -p tiny-dancer-artifacts/${{ matrix.settings.platform }}
# Find the built .node file
NODE_FILE=$(find npm/packages/tiny-dancer -name "*.node" -type f | head -1)
if [ -z "$NODE_FILE" ]; then
NODE_FILE=$(find crates/ruvector-tiny-dancer-node -name "*.node" -type f | head -1)
fi
if [ -z "$NODE_FILE" ]; then
echo "ERROR: No .node file found"
exit 1
fi
echo "Found: $NODE_FILE"
cp -v "$NODE_FILE" "tiny-dancer-artifacts/${{ matrix.settings.platform }}/"
-
name
:
Test native module (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')
continue-on-error
:
true
working-directory
:
npm/packages/tiny-dancer
run
:
npm test
-
name
:
Upload artifact
uses
:
actions/upload-artifact@v4
with
:
name
:
tiny-dancer-${{ matrix.settings.platform }}
path
:
tiny-dancer-artifacts/${{ matrix.settings.platform }}/*.node
if-no-files-found
:
error
publish
:
name
:
Publish Tiny Dancer Platform Packages
runs-on
:
ubuntu-22.04
needs
:
build
if
:
inputs.publish == true || startsWith(github.ref, 'refs/tags/v')
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 artifacts
uses
:
actions/download-artifact@v4
with
:
path
:
artifacts
-
name
:
Create and publish platform packages
env
:
NODE_AUTH_TOKEN
:
${{ secrets.NPM_TOKEN }}
run
:
|
VERSION="0.1.15"
echo "Publishing version: $VERSION"
for dir in artifacts/tiny-dancer-*/; do
platform=$(basename "$dir" | sed 's/tiny-dancer-//')
NODE_FILE=$(find "$dir" -name "*.node" | head -1)
if [ -z "$NODE_FILE" ]; then
echo "No .node file found in $dir"
continue
fi
echo "=== Publishing @ruvector/tiny-dancer-${platform}@${VERSION} ==="
# Create package directory
PKG_DIR="npm-pkg/tiny-dancer-${platform}"
mkdir -p "$PKG_DIR"
# Determine OS and CPU
case "$platform" in
linux-x64-gnu)
OS="linux"; CPU="x64"; LIBC='"libc": ["glibc"],'
NODE_NAME="ruvector-tiny-dancer.linux-x64-gnu.node"
;;
linux-arm64-gnu)
OS="linux"; CPU="arm64"; LIBC='"libc": ["glibc"],'
NODE_NAME="ruvector-tiny-dancer.linux-arm64-gnu.node"
;;
darwin-x64)
OS="darwin"; CPU="x64"; LIBC=""
NODE_NAME="ruvector-tiny-dancer.darwin-x64.node"
;;
darwin-arm64)
OS="darwin"; CPU="arm64"; LIBC=""
NODE_NAME="ruvector-tiny-dancer.darwin-arm64.node"
;;
win32-x64-msvc)
OS="win32"; CPU="x64"; LIBC=""
NODE_NAME="ruvector-tiny-dancer.win32-x64-msvc.node"
;;
esac
# Copy and rename binary
cp "$NODE_FILE" "$PKG_DIR/$NODE_NAME"
# Create package.json
cat > "$PKG_DIR/package.json" << EOF
{
"name": "@ruvector/tiny-dancer-${platform}",
"version": "${VERSION}",
"os": ["${OS}"],
"cpu": ["${CPU}"],
${LIBC}
"main": "${NODE_NAME}",
"files": ["${NODE_NAME}"],
"description": "Neural router for AI agent orchestration - ${platform} platform",
"keywords": ["ruvector", "tiny-dancer", "neural-router", "napi-rs"],
"author": "ruv.io Team <info@ruv.io>",
"license": "MIT",
"repository": {"type": "git", "url": "https://github.com/ruvnet/ruvector"},
"engines": {"node": ">= 18"},
"publishConfig": {"registry": "https://registry.npmjs.org/", "access": "public"}
}
EOF
# Publish
cd "$PKG_DIR"
npm publish --access public || echo "Failed to publish @ruvector/tiny-dancer-${platform}"
cd ../..
done
-
name
:
Copy binaries to main package
run
:
|
for dir in artifacts/tiny-dancer-*/; do
platform=$(basename "$dir" | sed 's/tiny-dancer-//')
NODE_FILE=$(find "$dir" -name "*.node" | head -1)
if [ -n "$NODE_FILE" ]; then
cp -v "$NODE_FILE" "npm/packages/tiny-dancer/ruvector-tiny-dancer.${platform}.node"
fi
done
ls -la npm/packages/tiny-dancer/*.node ||
true
-
name
:
Publish main package
working-directory
:
npm/packages/tiny-dancer
env
:
NODE_AUTH_TOKEN
:
${{ secrets.NPM_TOKEN }}
run
:
npm publish --access public || echo "Package may already exist"
You can’t perform that action at this time.