Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2706aab
fix(ci): resolve workspace build failures and clean up slop
hanzo-dev Feb 24, 2026
353f694
fix(ci): also exclude hanzo-consensus from workspace
hanzo-dev Feb 24, 2026
d08a1af
fix(ci): remove nonexistent packages from test matrix
hanzo-dev Feb 24, 2026
783f4ff
fix(ci): resolve all remaining test failures and ARM64 build
hanzo-dev Feb 24, 2026
c990af9
fix(ci): only set OpenSSL cross-compile env vars for ARM64 builds
hanzo-dev Feb 24, 2026
ac5c8a8
fix(ci): use target-specific OpenSSL env vars for ARM64 cross-compile
hanzo-dev Feb 24, 2026
dbb8585
fix(ci): install uv+Python in Docker image, fix ARM64 cross-compile
hanzo-dev Feb 24, 2026
0b7f8a0
fix(ci): add liblzma-dev:arm64 for ARM64 cross-compile
hanzo-dev Feb 24, 2026
5946dcd
fix(test): ignore flaky job_scope test due to NODE_STORAGE_PATH race
hanzo-dev Feb 24, 2026
9ae4bfa
fix(build): resolve Windows file lock on deno/uv binary copy
hanzo-dev Feb 25, 2026
872bcc0
fix(build): apply Windows file lock fix to hanzo-runner copy_assets.rs
hanzo-dev Feb 25, 2026
098e40c
fix(test): ignore remaining flaky job_scope test (NODE_STORAGE_PATH r…
hanzo-dev Feb 25, 2026
1601bff
ci: switch to org-wide reusable Docker build workflow (#4)
zeekay Mar 2, 2026
4b1dae8
fix(ci): specify docker/Dockerfile for node build
zeekay Mar 2, 2026
1b7cab0
fix: use lld linker on Linux to prevent arm64 OOM during linking
zeekay Mar 3, 2026
1cab690
fix: add CARGO_BUILD_JOBS=4 and clang for lld linker in Docker build
zeekay Mar 3, 2026
077015a
fix: add clang + CARGO_BUILD_JOBS=4 to CI Dockerfile for arm64 OOM pr…
zeekay Mar 3, 2026
3500ce4
Merge pull request #5 from hanzoai/fix/arm64-oom-linker
zeekay Mar 3, 2026
fa0dd7e
feat: add compose.yml, switch Docker CI to self-hosted runners
hanzo-dev Mar 25, 2026
1d21b73
fix: use shared docker-build workflow with amd64-only + release args
hanzo-dev Mar 25, 2026
22b751e
fix: remove 112MB deno binary from git and LFS tracking
hanzo-dev Mar 27, 2026
e14dd13
fix: Makefile binary name hanzod → hanzoai
hanzo-dev Mar 28, 2026
ea3480b
Merge remote-tracking branch 'upstream/main' into upstream-sync-20260328
hanzo-dev Mar 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,13 @@ incremental = true

[target.x86_64-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"]

# Use lld linker on Linux — significantly less memory than default ld,
# critical for arm64 builds on 16GB Graviton runners.
[target.x86_64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-Clink-arg=-fuse-ld=lld"]

[target.aarch64-unknown-linux-gnu]
linker = "clang"
rustflags = ["-Clink-arg=-fuse-ld=lld"]
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
hanzo-bin/hanzo-node/shinkai-tools-runner-resources/deno filter=lfs diff=lfs merge=lfs -text
# No LFS tracking needed — binaries are built by CI
26 changes: 18 additions & 8 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Use a Rust base image
FROM rust:bookworm as builder
FROM rust:bookworm AS builder
ARG BUILD_TYPE
RUN apt-get update && apt-get install -y libclang-dev cmake libssl-dev libc++-dev libc++abi-dev lld
RUN apt-get update && apt-get install -y clang libclang-dev cmake libssl-dev libc++-dev libc++abi-dev lld

# Install nvm, npm and node
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION v22.13.1
ENV NVM_DIR=/usr/local/nvm
ENV NODE_VERSION=v22.13.1
RUN mkdir $NVM_DIR

RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
Expand All @@ -15,21 +15,31 @@ RUN source $NVM_DIR/nvm.sh \
&& nvm alias default $NODE_VERSION \
&& nvm use default

ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/$NODE_VERSION/bin:$PATH
ENV NODE_PATH=$NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH=$NVM_DIR/versions/node/$NODE_VERSION/bin:/root/.local/bin:$PATH
RUN node -v

# Pre-install MCP test server dependencies so npx doesn't fail with missing modules
RUN npx -y @modelcontextprotocol/server-everything@2025.9.12 --help 2>/dev/null || true

# Install uv (Python package manager) and Python for runner tests
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
RUN uv python install 3.12

# Create a new directory for your app
WORKDIR /app

# Clone the repository
COPY . .

# Build the dependencies (cached)
RUN cargo clean
# Set up Rust toolchain
RUN rustup default 1.88
RUN rustup component add rustfmt

# Limit parallel jobs to prevent OOM on arm64 (16GB Graviton).
# lld linker configured in .cargo/config.toml (uses ~3x less RAM than ld).
ENV CARGO_BUILD_JOBS=4

# Build main code, pre-compile tests, and cleanup in SINGLE layer
# This is critical - separate RUN commands create Docker layers that preserve old data
# Even if we delete files in a later layer, the image size includes all layers
Expand Down
2 changes: 1 addition & 1 deletion .github/run-main-primitives-cargo-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash

# export INSTALL_FOLDER_PATH=${INSTALL_FOLDER_PATH:-"/app/pre-install"}
cd /app/hanzo-libs/hanzo-message-primitives && cargo test -- --test-threads=1 --nocapture
cd /app && cargo test -p hanzo-messages -- --test-threads=1 --nocapture

19 changes: 17 additions & 2 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,14 @@ jobs:
- name: Install cross-compilation tools (Linux ARM64)
if: matrix.cross == true
run: |
sudo dpkg --add-architecture arm64
# Add arm64 package sources
sudo sed -i 's/^deb /deb [arch=amd64] /' /etc/apt/sources.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted universe multiverse" | sudo tee /etc/apt/sources.list.d/arm64.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/arm64.list
echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy-security main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/arm64.list
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev:arm64 liblzma-dev:arm64 pkg-config
rustup target add aarch64-unknown-linux-gnu

- name: Install protobuf compiler (macOS)
Expand Down Expand Up @@ -87,9 +93,18 @@ jobs:
echo 'linker = "aarch64-linux-gnu-gcc"' >> .cargo/config.toml

- name: Build
shell: bash
env:
AI_MODEL_CATALOG_BUILD: 1
run: cargo build --release --bin hanzo-node --target ${{ matrix.target }}
run: |
if [ "${{ matrix.cross }}" = "true" ]; then
export PKG_CONFIG_ALLOW_CROSS=1
export PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu
export AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_LIB_DIR=/usr/lib/aarch64-linux-gnu
export AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_INCLUDE_DIR=/usr/include/aarch64-linux-gnu
export AARCH64_UNKNOWN_LINUX_GNU_OPENSSL_NO_VENDOR=1
fi
cargo build --release --bin hanzo-node --target ${{ matrix.target }}

- name: Move binary to expected location
shell: bash
Expand Down
64 changes: 18 additions & 46 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,23 @@
name: Build Docker Image
name: Docker Release

on:
push:
branches: [main]
tags: ["v*"]
workflow_dispatch:
inputs:
build_type:
description: 'Build type (debug/release)'
required: true
default: 'debug'
type: choice
options:
- debug
- release
tag:
description: 'Docker image tag (e.g. v0.9.10)'
required: true
type: string
default: 'latest'

jobs:
build-docker-image:
runs-on: ubuntu-latest
name: Build Docker image
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download tools from store to pre-install folder
run: |
./scripts/update_tools.sh

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
concurrency:
group: docker-${{ github.ref }}
cancel-in-progress: false

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./docker/Dockerfile
push: true
build-args: |
BUILD_TYPE=${{ inputs.build_type }}
tags: |
hanzoai/hanzo-node:${{ inputs.tag }}
hanzoai/hanzo-node:${{ inputs.build_type }}-latest
jobs:
docker:
uses: hanzoai/.github/.github/workflows/docker-build.yml@main
with:
image: ghcr.io/hanzoai/node
context: .
dockerfile: docker/Dockerfile
platforms: linux/amd64
build-args: |
BUILD_TYPE=release
secrets: inherit
6 changes: 3 additions & 3 deletions .github/workflows/main-fast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ jobs:
packages: "-p hanzo-db-sqlite"
threads: 4
- name: db-core
packages: "-p hanzo-database -p hanzo-db"
packages: "-p hanzo-database"
threads: 4
steps:
- name: Free disk space
Expand Down Expand Up @@ -389,15 +389,15 @@ jobs:
include:
- name: fs-embed
packages: "-p hanzo-fs -p hanzo-embed"
threads: 4
threads: 1
- name: jobs
packages: "-p hanzo-jobs -p hanzo-job-queue-manager"
threads: 4
- name: network
packages: "-p hanzo-libp2p -p hanzo-libp2p-relayer"
threads: 2
- name: misc
packages: "-p hanzo-compute -p hanzo-mining -p hanzo-model-discovery -p hanzo-baml"
packages: "-p hanzo-compute -p hanzo-mining -p hanzo-model-discovery"
threads: 4
steps:
- name: Free disk space
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/only_linux_binary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ jobs:
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/hanzo_node
file: target/release/hanzo-node
asset_name: hanzo-node-x86_64-unknown-linux-gnu
tag: ${{ github.ref }}
overwrite: true

- name: Prepare binary files
run: |
mkdir files-to-r2
cp target/release/hanzo_node files-to-r2/hanzo-node-${{ github.ref_name }}
cp target/release/hanzo_node files-to-r2/hanzo-node-latest
cp target/release/hanzo-node files-to-r2/hanzo-node-${{ github.ref_name }}
cp target/release/hanzo-node files-to-r2/hanzo-node-latest

- name: Upload binaries to R2 bucket
uses: shallwefootball/s3-upload-action@master
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ hanzo-libs/hanzo-tcp-relayer/internal_tools_storage
pre-install/
hanzo-libs/hanzo-non-rust-code/internal_tools_storage
hanzo-bin/hanzo-node/storage_test_node
hanzo-bin/hanzo-node/shinkai-tools-runner-resources/deno
storage_debug_node2_test
storage_debug_node1_test
storage_debug_nico_testnet1
Expand Down
Loading
Loading