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
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:
env: { GH_TOKEN: "${{ secrets.GITHUB_TOKEN }}" }
run: ./ci/deps.sh
- name: 构建
run: make runtime layout
run: make shm
- name: 测试
env: { KVSPACE: "shm:///tmp/kvlang_ci" }
run: python3 tutorial/test.py
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@
# make shm 链 kvspace-c 后端(SHM,默认,= all 的后端组件)
# make durable 链 kvspace_durable 后端(redis/fs/s3)
# make test durable 后端全量 tutorial 回归
# make install 一次性安装产物到最终态目录(.so→/usr/lib,可执行→/usr/bin,头→/usr/include/kvlang/)
# make all 全部(shm 后端 + json)
# make clean 清理 bin/ 与各构建目录
# 切换后端只需 make shm / make durable:runtime 经 cmake 重配、layout 经环境变量重建。

BIN := bin
KVSPACE_LIB ?= kvspace-c

.PHONY: all runtime term layout json oldhero shm durable test clean
.PHONY: all runtime term layout json oldhero shm durable test install clean

all: runtime term layout json

Expand All @@ -36,8 +37,16 @@ term:

layout:
KVLANG_KVSPACE_LIB=$(KVSPACE_LIB) cargo build --release --manifest-path layout/Cargo.toml --example layout_file
KVLANG_KVSPACE_LIB=$(KVSPACE_LIB) cargo build --release --manifest-path layout/Cargo.toml
cp layout/target/release/examples/layout_file $(BIN)/

install:
install -d /usr/lib /usr/bin /usr/include/kvlang
install -m 755 $(BIN)/libkvlang_runtime.so /usr/lib/
install -m 755 layout/target/release/libkvlang_layout.so /usr/lib/
install -m 755 $(BIN)/kvlang $(BIN)/layout_file /usr/bin/
install -m 644 runtime/include/kvlang_runtime.h runtime/include/kvlang_rwirext.h /usr/include/kvlang/

json:
ifeq ($(KVSPACE_LIB),kvspace_durable)
cd runtime-rwirext_example/go/json && CGO_LDFLAGS="-L$(CURDIR)/../kvspace-durable/target/release -lkvspace_durable -Wl,--disable-new-dtags -Wl,-rpath,$(CURDIR)/../kvspace-durable/target/release" go build -o ../../../bin/json-rwirext ./cmd/
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# kvlang

[![CI](https://github.com/array2d/kvlang/actions/workflows/ci.yml/badge.svg)](https://github.com/array2d/kvlang/actions/workflows/ci.yml)
[![Go Version](https://img.shields.io/badge/Go-1.24+-00ADD8?logo=go)](https://go.dev/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Tutorial Examples](https://img.shields.io/badge/tutorials-140%20examples-4c1)](tutorial/)

Expand Down
1 change: 0 additions & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# kvlang

[![CI](https://github.com/array2d/kvlang/actions/workflows/ci.yml/badge.svg)](https://github.com/array2d/kvlang/actions/workflows/ci.yml)
[![Go Version](https://img.shields.io/badge/Go-1.24+-00ADD8?logo=go)](https://go.dev/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Tutorial Examples](https://img.shields.io/badge/tutorials-140%20examples-4c1)](tutorial/)

Expand Down
Loading