-
-
Notifications
You must be signed in to change notification settings - Fork 2
174 lines (167 loc) · 5.46 KB
/
Copy pathci.yml
File metadata and controls
174 lines (167 loc) · 5.46 KB
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
name: hive-ci
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
# x86_64 + CPU only. Runs everywhere, no external deps.
cpu:
name: x86_64 / Python ${{ matrix.python }} / CPU
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install
run: |
python -m pip install --upgrade pip
# Install hive only — sibling packages (busyBee-cpu, honey-comb) are
# NOT present in the checkout. Tests gracefully skip when absent.
pip install -e .[dev,monitor,observability]
- name: Test
env:
HIVE_NO_NVML: "1"
run: pytest -v
- name: Benchmark (smoke)
env:
HIVE_NO_NVML: "1"
run: |
python scripts/hive_benchmark.py \
--transcript-turns 50 --brain-writes 500 \
--honey-comb-mode auto --inference-backend echo \
--quiet
- name: Lint
run: |
python -m ruff check hive/ tests/
python -m mypy hive/ --ignore-missing-imports
- name: Validate CITATION.cff
run: |
if [ ! -f .github/citation.cff ]; then
echo "Error: .github/citation.cff not found"
exit 1
fi
pip install cffconvert
cffconvert --validate -i .github/citation.cff
- name: Security scan (hive only)
run: |
pip install bandit
python -m bandit -r hive/ -ll -q
python scripts/hive_pentest.py --module hive
# Full-stack pentest: hive + busybee-cpu + honey-comb
pentest:
name: Pentest / full stack
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Clone sibling packages
run: |
git clone --depth 1 https://github.com/DJLougen/busyBee-cpu.git /tmp/busyBee-cpu
git clone --depth 1 https://github.com/DJLougen/honey-comb.git /tmp/honey-comb
- name: Install
run: |
python -m pip install --upgrade pip
pip install -e /tmp/busyBee-cpu /tmp/honey-comb -e ".[dev]"
- name: Modular pentest
env:
HIVE_NO_NVML: "1"
run: |
python scripts/hive_pentest.py --fail-on-skip
# x86_64 + CUDA. Requires self-hosted runner with GPU label.
# Disabled until self-hosted runner is registered.
gpu:
name: x86_64 / Python 3.12 / CUDA
if: false # Re-enable when self-hosted GPU runner is available
runs-on: [self-hosted, gpu, cuda]
steps:
- uses: actions/checkout@v4
- name: Install
run: |
python -m pip install --upgrade pip
pip install -e .[dev,monitor,observability]
- name: Test
run: pytest -v
- name: Benchmark
run: |
python scripts/hive_benchmark.py \
--transcript-turns 200 --brain-writes 5000 \
--honey-comb-mode auto --inference-backend echo \
--runs 3 --output bench-gpu.json --quiet
- name: Upload
if: always()
uses: actions/upload-artifact@v4
with:
name: bench-gpu
path: bench-gpu.json
# aarch64 + CUDA. Jetson / Grace.
# Disabled until self-hosted runner is registered.
jetson:
name: aarch64 / Python 3.12 / Jetson
if: false # Re-enable when self-hosted Jetson runner is available
runs-on: [self-hosted, jetson]
steps:
- uses: actions/checkout@v4
- name: Install
run: |
python -m pip install --upgrade pip
pip install --extra-index-url https://pypi.nvidia.com -e .[dev,monitor,observability]
- name: Test
env:
HIVE_NO_NVML: "0"
run: pytest -v
- name: Benchmark
run: |
python scripts/hive_benchmark.py \
--transcript-turns 100 --brain-writes 1000 \
--honey-comb-mode fast --inference-backend echo \
--output bench-jetson.json --quiet
- name: Upload
if: always()
uses: actions/upload-artifact@v4
with:
name: bench-jetson
path: bench-jetson.json
# Build Rust wheels for major platforms.
# Only runs on tags or manual dispatch to avoid burning minutes on every PR.
rust-wheels:
name: Build hive-cpp wheels
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install maturin
run: pip install maturin
- name: Build wheel
working-directory: hive-cpp
run: |
maturin build --release --target ${{ matrix.target }} --out ../dist
- name: Upload wheel
uses: actions/upload-artifact@v4
with:
name: hive-cpp-wheels-${{ matrix.target }}
path: dist/*.whl