Skip to content

feat: zero-shell self-contained workspace (real per-lib test projects)#59

Merged
Sunrisepeak merged 3 commits into
mainfrom
feat/zero-shell-workspace
Jun 30, 2026
Merged

feat: zero-shell self-contained workspace (real per-lib test projects)#59
Sunrisepeak merged 3 commits into
mainfrom
feat/zero-shell-workspace

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

What

Realizes 基于 mcpp 自包含 + 消除所有 shell + 支持 -p 单独运行: the mcpp-index repo is now both the package index AND a mcpp workspace whose members are real test projects that genuinely use and test each library — driven entirely by mcpp, no shell driver.

Requires mcpp 0.0.79 (workspace-aware mcpp test + the build.mcpp cwd fix).

Changes

  • Members → real test projects. Each tests/examples/<lib>/ is now [dependencies] compat.<lib> + tests/*.cpp with behavioral assertions (no src/):
    • cjson — build → serialize → parse, assert fields
    • eigen — header-only linear algebra (determinant / QR solve)
    • nlohmann.json — dump → parse round-trip + ordered_json
    • openblascfg(windows) cblas_dgemm [19 22; 43 50] (no-op off-Windows)
    • build-mcpp — asserts build.mcpp's generated source + define took effect
  • CI is now shell-free: smoke-workspace runs mcpp test --workspace; smoke-examples runs mcpp test -p <lib>. Deleted tests/run_workspace.sh + tests/run_example.sh. MCPP_VERSION → 0.0.79.

Verified locally (mcpp 0.0.79)

mcpp test --workspace5/5 members pass; mcpp test -p <lib> works per member.

Scope / follow-ups (design doc §9)

  • Kept smoke_compat_*.sh (imgui/glfw need a display; libarchive/zlib broader matrix) — migrating those to headless mcpp test members is a later increment.
  • eigen drops the eigen_blas dgemm_ assert: feature-built dependency objects don't link into test binaries yet (a separate mcpp follow-up).

Each tests/examples/<lib>/ becomes a real mcpp TEST project: [dependencies]
compat.<lib> + tests/*.cpp behavioral assertions (no src/). Driven entirely by
mcpp, no shell:
- cjson: build→serialize→parse, assert fields
- eigen: header-only linear algebra (det/solve)
- nlohmann.json: dump→parse round-trip + ordered_json
- openblas: cfg(windows) cblas_dgemm [19 22;43 50] (no-op off-Windows)
- build-mcpp: assert build.mcpp's generated source + define took effect

CI (needs mcpp 0.0.79: workspace-aware test + build.mcpp cwd fix):
- smoke-workspace runs 'mcpp test --workspace'; smoke-examples 'mcpp test -p <lib>'
- deleted tests/run_workspace.sh + tests/run_example.sh; MCPP_VERSION -> 0.0.79

Kept (broader/display matrix, migrate later): smoke_compat_*.sh.
eigen drops the eigen_blas dgemm assert — feature-built dep objects don't link
into test binaries yet (mcpp follow-up). See design doc §9.

(held until mcpp 0.0.79 is released — CI downloads the released binary)
…cpp workspace

Migrates every smoke_compat_*.sh into real per-library test projects and rebuilds
CI around 'mcpp test --workspace'. The index's whole test surface is now the
workspace; no shell drivers remain (except the documented imgui-module exception).

New members (faithful migration of the smoke heredocs):
- core: gtest + ftxui + lua + mbedtls + opengl/khrplatform (per-OS ldflags via cfg)
- archive: libarchive + zlib/bzip2/lz4/xz/zstd (versions + round-trip)
- imgui: headless in-memory ImGui frame
- gui-stack: glfw + X11/XCB stack (xext/xrender/.../xau/xdmcp/xcb/x11), linux via cfg
- imgui-window: imgui+glfw+GL3 backends build+link (window run opt-in), linux via cfg
cjson/eigen/nlohmann drop the gcc pin so they run cross-platform (auto toolchain).

CI: validate.yml collapses smoke-full-linux/smoke-portable/smoke-examples/
smoke-workspace into ONE 'workspace' matrix (linux/macos/windows) running
'mcpp test --workspace' — members self-gate by [target.cfg]. Deleted 5 smoke
scripts. Kept smoke_imgui_module.sh: the public imgui module package has an empty
namespace (builtin index), not yet mappable to a local path in a workspace member.

Verified locally (mcpp 0.0.79): mcpp test --workspace → all 10 members pass.
See .agents/docs/2026-06-30-complete-test-ci-rearchitecture.md.
@Sunrisepeak Sunrisepeak merged commit f6d3d70 into main Jun 30, 2026
6 checks passed
@Sunrisepeak Sunrisepeak deleted the feat/zero-shell-workspace branch June 30, 2026 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant