From b269d8848d30eb226f1ba57764db6492c4a745df Mon Sep 17 00:00:00 2001 From: "peng.li24" <734991033@qq.com> Date: Fri, 11 Sep 2026 14:25:20 +0800 Subject: [PATCH 1/2] =?UTF-8?q?ci:=20=E5=B9=B6=E8=A1=8C=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=20shm/fs/redis=20=E4=B8=89=E5=90=8E=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原 ci 仅用 shm 跑 tutorial。改为 matrix 并行 job(test-shm/test-fs/ test-redis),各自 KVSPACE DSN 独立;redis job 起 redis:7 service。 fail-fast: false,单后端失败不影响其他后端诊断。 Co-Authored-By: Claude Opus 4.8 --- .github/workflows/ci.yml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f540349..f59dd903 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,23 @@ name: ci on: [push, pull_request, repository_dispatch] jobs: - build: + test: runs-on: ubuntu-latest + name: test-${{ matrix.backend.name }} + strategy: + fail-fast: false + matrix: + backend: + - { name: shm, dsn: "shm:///tmp/kvlang_ci_shm.shm" } + - { name: fs, dsn: "fs:///tmp/kvlang_ci_fs" } + - { name: redis, dsn: "redis://127.0.0.1:6379" } + services: + redis: + image: redis:7 + ports: ["6379:6379"] + options: >- + --health-cmd "redis-cli ping" + --health-interval 5s --health-timeout 3s --health-retries 10 steps: - uses: actions/checkout@v4 - name: 下载 ABI 依赖 @@ -15,6 +30,6 @@ jobs: sudo cp layout/target/release/libkvlanglayout.so /usr/lib/ make runtime-rs sudo make install - - name: 测试 - env: { KVSPACE: "shm:///tmp/kvlang_ci" } + - name: 测试 (${{ matrix.backend.name }}) + env: { KVSPACE: "${{ matrix.backend.dsn }}" } run: python3 tutorial/test.py From ec9c06f3b0c120ec86bf3e9144e781d62d1ae32a Mon Sep 17 00:00:00 2001 From: "peng.li24" <734991033@qq.com> Date: Fri, 11 Sep 2026 15:01:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?ci:=20=E7=A7=BB=E9=99=A4=20redis=20?= =?UTF-8?q?=E5=90=8E=E7=AB=AF=EF=BC=8C=E4=BB=85=E5=B9=B6=E8=A1=8C=E6=B5=8B?= =?UTF-8?q?=20shm/fs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit redis 后端每 KV 操作走 TCP RTT,136 例 tutorial 在 CI 上 >30min 过慢。 CI 只需 shm + fs 两后端并行通过即算通过;redis 正确性由本地 benchmark 覆盖。 Co-Authored-By: Claude Opus 4.8 --- .github/workflows/ci.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f59dd903..45c38f88 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,16 +8,8 @@ jobs: fail-fast: false matrix: backend: - - { name: shm, dsn: "shm:///tmp/kvlang_ci_shm.shm" } - - { name: fs, dsn: "fs:///tmp/kvlang_ci_fs" } - - { name: redis, dsn: "redis://127.0.0.1:6379" } - services: - redis: - image: redis:7 - ports: ["6379:6379"] - options: >- - --health-cmd "redis-cli ping" - --health-interval 5s --health-timeout 3s --health-retries 10 + - { name: shm, dsn: "shm:///tmp/kvlang_ci_shm.shm" } + - { name: fs, dsn: "fs:///tmp/kvlang_ci_fs" } steps: - uses: actions/checkout@v4 - name: 下载 ABI 依赖