Skip to content

Local code intelligence for developers and AI agents. Connect code, docs and infrastructure in a persistent graph, with CBM Lens, MCP tools, agent integrations and change-aware test selection.

Unify dry-run + release pipelines: lint(format+cppcheck) → test → build → smoke → release

Martin Vogel19576124691d
diff --git a/.github/workflows/dry-run.yml b/.github/workflows/dry-run.yml
index 825b5c8a5..af777017f 100644
--- a/.github/workflows/dry-run.yml
+++ b/.github/workflows/dry-run.yml
@@ -22,7 +22,7 @@ jobs:
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" | sudo tee /etc/apt/sources.list.d/llvm-20.list
sudo apt-get update
- sudo apt-get install -y clang-format-20 clang-tidy-20
+ sudo apt-get install -y clang-format-20
# cppcheck 2.20.0 from source (cached)
- uses: actions/cache@v4
@@ -45,7 +45,6 @@ jobs:
- name: Verify versions
run: |
echo "clang-format: $(clang-format-20 --version)"
- echo "clang-tidy: $(clang-tidy-20 --version | head -1)"
echo "cppcheck: $(cppcheck --version)"
- name: clang-format
@@ -54,9 +53,6 @@ jobs:
- name: cppcheck
run: make -f Makefile.cbm lint-cppcheck
- - name: clang-tidy
- run: make -f Makefile.cbm lint-tidy CLANG_TIDY=clang-tidy-20
-
# ── Step 2: Unit tests (ASan + UBSan) ────────────────────────
test:
needs: [lint]
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index eb6ae9c5d..98c680a83 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -21,8 +21,53 @@ permissions:
contents: write
jobs:
- # ── Step 1: Unit tests ───────────────────────────────────────
+ # ── Step 1: Lint (clang-format + cppcheck, no clang-tidy) ────
+ lint:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install build deps
+ run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev zlib1g-dev cmake
+
+ - name: Install LLVM 20
+ run: |
+ wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
+ echo "deb http://apt.llvm.org/noble/ llvm-toolchain-noble-20 main" | sudo tee /etc/apt/sources.list.d/llvm-20.list
+ sudo apt-get update
+ sudo apt-get install -y clang-format-20
+
+ - uses: actions/cache@v4
+ id: cppcheck-cache
+ with:
+ path: /opt/cppcheck
+ key: cppcheck-2.20.0-ubuntu-amd64
+
+ - name: Build cppcheck 2.20.0
+ if: steps.cppcheck-cache.outputs.cache-hit != 'true'
+ run: |
+ git clone --depth 1 --branch 2.20.0 https://github.com/danmar/cppcheck.git /tmp/cppcheck
+ cmake -S /tmp/cppcheck -B /tmp/cppcheck/build -DCMAKE_BUILD_TYPE=Release -DHAVE_RULES=OFF -DCMAKE_INSTALL_PREFIX=/opt/cppcheck
+ cmake --build /tmp/cppcheck/build -j$(nproc)
+ cmake --install /tmp/cppcheck/build
+
+ - name: Add cppcheck to PATH
+ run: echo "/opt/cppcheck/bin" >> "$GITHUB_PATH"
+
+ - name: Verify versions
+ run: |
+ echo "clang-format: $(clang-format-20 --version)"
+ echo "cppcheck: $(cppcheck --version)"
+
+ - name: clang-format
+ run: make -f Makefile.cbm lint-format CLANG_FORMAT=clang-format-20
+
+ - name: cppcheck
+ run: make -f Makefile.cbm lint-cppcheck
+
+ # ── Step 2: Unit tests (ASan + UBSan) ────────────────────────
test:
+ needs: [lint]
strategy:
matrix:
include:
@@ -45,7 +90,7 @@ jobs:
- name: Run C tests (ASan + UBSan)
run: make -j$(nproc 2>/dev/null || sysctl -n hw.ncpu) -f Makefile.cbm test
- # ── Step 2: Build binaries (standard + UI, all OS) ──────────
+ # ── Step 3: Build binaries (standard + UI, all OS) ───────────
build-unix:
needs: [test]
strategy:
@@ -161,7 +206,7 @@ jobs:
name: binaries-windows-amd64
path: "*.zip"
- # ── Step 3: Smoke test every binary on its target OS ─────────
+ # ── Step 4: Smoke test every binary ──────────────────────────
smoke-unix:
needs: [build-unix]
strategy:
@@ -227,7 +272,7 @@ jobs:
shell: msys2 {0}
run: scripts/smoke-test.sh ./codebase-memory-mcp.exe
- # ── Step 4: Create GitHub release ────────────────────────────
+ # ── Step 5: Create GitHub release ────────────────────────────
release:
needs: [smoke-unix, smoke-windows]
runs-on: ubuntu-latest
diff --git a/Makefile.cbm b/Makefile.cbm
index 92741930a..6d51de44b 100644
--- a/Makefile.cbm
+++ b/Makefile.cbm
@@ -457,6 +457,10 @@ lint-format:
@echo "=== clang-format ==="
@$(CLANG_FORMAT) --dry-run --Werror $(LINT_SRCS) $(LINT_HDRS)
-# All linters
+# All linters (run with make -j3 lint for parallel execution)
lint: lint-tidy lint-cppcheck lint-format
@echo "=== All linters passed ==="
+
+# CI linters (no clang-tidy — platform-dependent, enforced locally via pre-commit)
+lint-ci: lint-cppcheck lint-format
+ @echo "=== CI linters passed ==="
diff --git a/src/pipeline/pass_parallel.c b/src/pipeline/pass_parallel.c
index 09dfd5769..20b175631 100644
--- a/src/pipeline/pass_parallel.c
+++ b/src/pipeline/pass_parallel.c
@@ -25,12 +25,11 @@
#include "pipeline/httplink.h"
#include "cbm.h"
+#include <stdatomic.h>
#include <stdint.h>
-#include <_time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <stdatomic.h>
#include <time.h>
static uint64_t extract_now_ns(void) {