Skip to content

Commit eba812e

Browse files
authored
Merge branch 'headroomlabs-ai:main' into main
2 parents 46d0eb5 + cbfa267 commit eba812e

103 files changed

Lines changed: 7843 additions & 848 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 78 additions & 0 deletions
Loading

.github/workflows/docs.yml

Lines changed: 57 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ permissions:
2121
contents: read
2222

2323
jobs:
24-
validate:
24+
validate-mkdocs:
25+
name: Validate mkdocs build
2526
if: github.event_name == 'pull_request'
2627
runs-on: ubuntu-latest
2728
timeout-minutes: 10
@@ -46,7 +47,31 @@ jobs:
4647
- name: Build docs
4748
run: mkdocs build
4849

49-
deploy:
50+
validate-nextjs:
51+
name: Validate Next.js build
52+
if: github.event_name == 'pull_request'
53+
runs-on: ubuntu-latest
54+
timeout-minutes: 15
55+
steps:
56+
- uses: actions/checkout@v6
57+
58+
- name: Setup Node.js
59+
uses: actions/setup-node@v6
60+
with:
61+
node-version: '20'
62+
cache: npm
63+
cache-dependency-path: docs/package-lock.json
64+
65+
- name: Install dependencies
66+
run: npm ci
67+
working-directory: docs
68+
69+
- name: Build docs
70+
run: npm run build
71+
working-directory: docs
72+
73+
deploy-github-pages:
74+
name: Deploy GitHub Pages
5075
if: github.event_name != 'pull_request'
5176
runs-on: ubuntu-latest
5277
permissions:
@@ -73,3 +98,33 @@ jobs:
7398

7499
- name: Build and deploy
75100
run: mkdocs gh-deploy --force
101+
102+
deploy-vercel:
103+
name: Deploy Vercel Docs
104+
if: >-
105+
github.event_name != 'pull_request'
106+
&& github.ref == 'refs/heads/main'
107+
&& github.repository_owner == 'headroomlabs-ai'
108+
runs-on: ubuntu-latest
109+
permissions:
110+
contents: read
111+
steps:
112+
- uses: actions/checkout@v6
113+
114+
- name: Setup Node.js
115+
uses: actions/setup-node@v6
116+
with:
117+
node-version: '20'
118+
cache: npm
119+
cache-dependency-path: docs/package-lock.json
120+
121+
- name: Install dependencies
122+
run: npm ci
123+
working-directory: docs
124+
125+
- name: Deploy to Vercel
126+
run: npx vercel deploy --prod --token=${{ secrets.VERCEL_TOKEN }}
127+
working-directory: docs
128+
env:
129+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
130+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

.github/workflows/release.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ on:
5050
- "pyproject.toml"
5151
- "scripts/verify-versions.py"
5252
- "scripts/version-sync.py"
53+
- "scripts/build_npm_release_assets.mjs"
54+
- "scripts/verify_npm_release_assets.mjs"
5355
- "Cargo.toml"
5456
- "Cargo.lock"
5557
workflow_dispatch:
@@ -187,20 +189,7 @@ jobs:
187189

188190
- name: Build npm release packages
189191
run: |
190-
mkdir -p release-assets
191-
192-
cd sdk/typescript
193-
npm install
194-
npm run build
195-
npm version ${{ needs.detect-version.outputs.npm_version }} --no-git-tag-version --allow-same-version
196-
npm pack --pack-destination ../../release-assets
197-
198-
cd ../../plugins/openclaw
199-
npm install ../../release-assets/headroom-ai-${{ needs.detect-version.outputs.npm_version }}.tgz
200-
npm install
201-
npm run build
202-
npm version ${{ needs.detect-version.outputs.npm_version }} --no-git-tag-version --allow-same-version
203-
npm pack --pack-destination ../../release-assets
192+
node scripts/build_npm_release_assets.mjs "${{ needs.detect-version.outputs.npm_version }}" release-assets
204193
205194
- name: Upload release assets artifact
206195
uses: actions/upload-artifact@v7
@@ -833,10 +822,11 @@ jobs:
833822
env:
834823
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
835824
run: |
825+
version="${{ needs.detect-version.outputs.npm_version }}"
836826
cd sdk/typescript
837-
npm install
827+
npm ci
838828
npm run build
839-
npm version ${{ needs.detect-version.outputs.npm_version }} --no-git-tag-version --allow-same-version
829+
npm version "$version" --no-git-tag-version --allow-same-version
840830
npm publish --access public
841831
continue-on-error: true
842832

@@ -845,10 +835,19 @@ jobs:
845835
env:
846836
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
847837
run: |
838+
version="${{ needs.detect-version.outputs.npm_version }}"
848839
cd plugins/openclaw
849-
npm install
840+
npm ci
850841
npm run build
851-
npm version ${{ needs.detect-version.outputs.npm_version }} --no-git-tag-version --allow-same-version
842+
npm version "$version" --no-git-tag-version --allow-same-version
843+
HEADROOM_NPM_VERSION="$version" node <<'EOF'
844+
const fs = require("fs");
845+
const pkg = JSON.parse(fs.readFileSync("package.json", "utf8"));
846+
pkg.dependencies = pkg.dependencies || {};
847+
pkg.dependencies["headroom-ai"] = `^${process.env.HEADROOM_NPM_VERSION}`;
848+
fs.writeFileSync("package.json", `${JSON.stringify(pkg, null, 2)}\n`);
849+
EOF
850+
node prepare-dist.mjs
852851
npm publish --access public
853852
continue-on-error: true
854853

.github/workflows/rust.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,19 @@ jobs:
5454
components: rustfmt, clippy
5555
- name: Cache cargo registry + build
5656
uses: Swatinem/rust-cache@v2
57+
- uses: actions/setup-python@v6
58+
with:
59+
python-version: '3.11'
60+
- name: Provide ONNX Runtime dylib
61+
# headroom-core is built with `ort-load-dynamic` (see its
62+
# Cargo.toml): the ONNX Runtime shared library is dlopen'd at
63+
# runtime instead of statically linked, so the magika/detection
64+
# tests need a real libonnxruntime.so and ORT_DYLIB_PATH pointing
65+
# at it — same contract `headroom/_ort.py` fulfills for Python
66+
# users via the pip `onnxruntime` package.
67+
run: |
68+
pip install 'onnxruntime>=1.16.0'
69+
echo "ORT_DYLIB_PATH=$(python -c "import onnxruntime, pathlib; p = pathlib.Path(onnxruntime.__file__).parent / 'capi'; print(next(iter(sorted(p.glob('libonnxruntime.so*')))))")" >> "$GITHUB_ENV"
5770
- name: cargo fmt --check
5871
run: cargo fmt --all -- --check
5972
- name: cargo clippy

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ scripts/*
1818
!scripts/changelog-gen.py
1919
!scripts/verify-versions.py
2020
!scripts/pr-governance.py
21+
!scripts/bootstrap-windows-dev.ps1
22+
!scripts/build_npm_release_assets.mjs
23+
!scripts/build_python_release_smoke.py
24+
!scripts/release_smoke_all.py
25+
!scripts/verify_npm_release_assets.mjs
2126
!scripts/tests/
2227
!scripts/README.md
2328
!scripts/repro_codex_replay.py
@@ -121,6 +126,9 @@ venv.bak/
121126
# Node.js dependencies (never commit vendored deps)
122127
node_modules/
123128

129+
# Local release smoke outputs
130+
release-assets-local/
131+
124132
# Secrets and API keys - NEVER commit these
125133
*.pem
126134
*.key

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.31.0"
2+
".": "0.32.0"
33
}

0 commit comments

Comments
 (0)