mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-02 07:53:41 +08:00
- cbm_mkdtemp: translate /tmp/ to %TEMP%\ on Windows - Docker test-windows: cross-compile + run under Wine (without ASan, which doesn't work under Wine) - Wine on PATH fix for Ubuntu noble (/usr/lib/wine/) - Tool preflight check in Dockerfile - 1887/1992 tests pass under Wine (52 fail: regex not available in pure MinGW — works on real MSYS2 which provides <regex.h>)
82 lines
2.4 KiB
YAML
82 lines
2.4 KiB
YAML
# Local test environment — mirrors GitHub Actions CI for ALL platforms.
|
|
#
|
|
# Coverage:
|
|
# Linux arm64: native test + build (mirrors CI ubuntu-24.04-arm)
|
|
# Linux amd64: QEMU test + build (mirrors CI ubuntu-latest)
|
|
# Windows: cross-compile with mingw-w64 (catches all compile errors)
|
|
# macOS: run natively — scripts/test.sh CC=cc && scripts/build.sh CC=cc
|
|
|
|
services:
|
|
# ── Linux test (ASan + UBSan + LeakSanitizer) ──────────────
|
|
test:
|
|
build:
|
|
context: ..
|
|
dockerfile: test-infrastructure/Dockerfile
|
|
platform: linux/arm64
|
|
volumes:
|
|
- ..:/src
|
|
command: ["CC=gcc", "CXX=g++"]
|
|
|
|
test-amd64:
|
|
build:
|
|
context: ..
|
|
dockerfile: test-infrastructure/Dockerfile
|
|
platform: linux/amd64
|
|
volumes:
|
|
- ..:/src
|
|
command: ["CC=gcc", "CXX=g++"]
|
|
|
|
# ── Linux production build (-O2 -Werror) ───────────────────
|
|
build:
|
|
build:
|
|
context: ..
|
|
dockerfile: test-infrastructure/Dockerfile
|
|
platform: linux/arm64
|
|
volumes:
|
|
- ..:/src
|
|
entrypoint: ["scripts/build.sh"]
|
|
command: ["CC=gcc", "CXX=g++"]
|
|
|
|
build-amd64:
|
|
build:
|
|
context: ..
|
|
dockerfile: test-infrastructure/Dockerfile
|
|
platform: linux/amd64
|
|
volumes:
|
|
- ..:/src
|
|
entrypoint: ["scripts/build.sh"]
|
|
command: ["CC=gcc", "CXX=g++"]
|
|
|
|
# ── Windows cross-compile + test (llvm-mingw + Wine) ────────
|
|
build-windows:
|
|
build:
|
|
context: ..
|
|
dockerfile: test-infrastructure/Dockerfile.mingw
|
|
platform: linux/amd64
|
|
volumes:
|
|
- ..:/src
|
|
|
|
test-windows:
|
|
build:
|
|
context: ..
|
|
dockerfile: test-infrastructure/Dockerfile.mingw
|
|
platform: linux/amd64
|
|
volumes:
|
|
- ..:/src
|
|
command: >-
|
|
make -j4 -f Makefile.cbm clean-c &&
|
|
make -j4 -f Makefile.cbm build/c/test-runner
|
|
CC=x86_64-w64-mingw32-clang
|
|
CXX=x86_64-w64-mingw32-clang++ &&
|
|
echo '=== Running tests under Wine ===' &&
|
|
WINEDEBUG=-all wine64 build/c/test-runner.exe &&
|
|
echo '=== Windows test: OK ==='
|
|
|
|
# ── Lint ────────────────────────────────────────────────────
|
|
lint:
|
|
build:
|
|
context: ..
|
|
dockerfile: test-infrastructure/Dockerfile.lint
|
|
volumes:
|
|
- ..:/src
|