Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
description: 'JSON string of Python versions'
required: false
type: string
default: '["3.10", "3.11", "3.12", "3.13"]'
default: '["3.10", "3.11", "3.12", "3.13", "3.14"]'
build_sdist:
description: 'Whether to build source distribution'
required: false
Expand Down Expand Up @@ -42,7 +42,7 @@ on:
python_json:
description: 'JSON string of Python versions'
required: false
default: '["3.10", "3.11", "3.12", "3.13"]'
default: '["3.10", "3.11", "3.12", "3.13", "3.14"]'

jobs:
build-sdist:
Expand Down Expand Up @@ -170,6 +170,7 @@ jobs:
"3.11") PYTHON_FULL="3.11.8" ;;
"3.12") PYTHON_FULL="3.12.2" ;;
"3.13") PYTHON_FULL="3.13.2" ;;
"3.14") PYTHON_FULL="3.14.3" ;;
*)
echo "Error: Unknown python version $PYTHON_VERSION"
exit 1
Expand Down
11 changes: 10 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ name = "openviking"
dynamic = ["version"]
description = "An Agent-native context database"
readme = "README.md"
requires-python = ">=3.10"
authors = [
{name = "ByteDance", email = "noreply@bytedance.com"}
]
license = { text = "Apache-2.0" }
requires-python = ">=3.10"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
Expand All @@ -27,6 +27,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
]
dependencies = [
"pydantic>=2.0.0",
Expand Down Expand Up @@ -96,6 +97,14 @@ eval = [
"datasets>=2.0.0",
"pandas>=2.0.0",
]
build = [
"setuptools>=61.0",
"setuptools-scm>=8.0",
"pybind11>=2.13.0",
"cmake>=3.15",
"wheel",
"build",
]
# vikingbot core dependencies
bot = [
"pydantic-settings>=2.0.0",
Expand Down
48 changes: 28 additions & 20 deletions third_party/agfs/agfs-server/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ GO=go
GOFLAGS=-v
ADDR?=:8080

# OS detection
ifeq ($(OS),Windows_NT)
PLATFORM := windows
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
PLATFORM := linux
endif
ifeq ($(UNAME_S),Darwin)
PLATFORM := darwin
endif
endif

# Build information
VERSION?=$(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
BUILD_TIME=$(shell date -u '+%Y-%m-%d_%H:%M:%S')
Expand All @@ -25,26 +38,18 @@ build: ## Build the server binary
@echo "Build complete: $(BUILD_DIR)/$(BINARY_NAME)"

build-lib: ## Build AGFS binding library
@echo "Detecting OS for building binding library..."
@OS=$$(uname -s | tr '[:upper:]' '[:lower:]'); \
LIB_NAME=libagfsbinding; \
CMD_PYBINDING_DIR=cmd/pybinding; \
case "$$OS" in \
darwin*) \
echo "Building for macOS..."; \
CGO_ENABLED=1 $(GO) build -buildmode=c-shared -o $(BUILD_DIR)/$$LIB_NAME.dylib $$CMD_PYBINDING_DIR/main.go; \
;; \
linux*) \
echo "Building for Linux..."; \
CGO_ENABLED=1 $(GO) build -buildmode=c-shared -o $(BUILD_DIR)/$$LIB_NAME.so $$CMD_PYBINDING_DIR/main.go; \
;; \
msys*|cygwin*|mingw*) \
echo "Building for Windows..."; \
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ AR=x86_64-w64-mingw32-ar GOOS=windows GOARCH=amd64 CGO_ENABLED=1 $(GO) build -buildmode=c-shared -o $(BUILD_DIR)/$$LIB_NAME.dll $$CMD_PYBINDING_DIR/main.go; \
;; \
*) echo "Unsupported OS: $$OS"; exit 1 ;; \
esac; \
echo "Build complete in $(BUILD_DIR)"
@echo "Building binding library for $(PLATFORM)..."
@mkdir -p $(BUILD_DIR)
ifeq ($(PLATFORM),darwin)
CGO_ENABLED=1 $(GO) build -buildmode=c-shared -o $(BUILD_DIR)/libagfsbinding.dylib cmd/pybinding/main.go
else ifeq ($(PLATFORM),linux)
CGO_ENABLED=1 $(GO) build -buildmode=c-shared -o $(BUILD_DIR)/libagfsbinding.so cmd/pybinding/main.go
else ifeq ($(PLATFORM),windows)
CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ AR=x86_64-w64-mingw32-ar GOOS=windows GOARCH=amd64 CGO_ENABLED=1 $(GO) build -buildmode=c-shared -o $(BUILD_DIR)/libagfsbinding.dll cmd/pybinding/main.go
else
@echo "Unsupported OS: $(PLATFORM)" && exit 1
endif
@echo "Build complete in $(BUILD_DIR)"

run: build
@echo "Starting $(BINARY_NAME) on $(ADDR)..."
Expand Down Expand Up @@ -104,3 +109,6 @@ release: clean test build ## Run tests and build release binary
GOOS=darwin GOARCH=arm64 $(GO) build $(LDFLAGS) -o $(BUILD_DIR)/release/$(BINARY_NAME)-darwin-arm64 $(CMD_DIR)/main.go
GOOS=windows GOARCH=amd64 $(GO) build $(LDFLAGS) -o $(BUILD_DIR)/release/$(BINARY_NAME)-windows-amd64.exe $(CMD_DIR)/main.go
@echo "Release builds complete in $(BUILD_DIR)/release/"

help: ## Display this help screen
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
Loading
Loading