Skip to content

feat: release v0.1.5 — upgrade deps, macOS 14 support, build fully via mcpp#26

Merged
Sunrisepeak merged 9 commits into
mainfrom
feat/v0.1.5-upgrade-deps-macos14
Jun 8, 2026
Merged

feat: release v0.1.5 — upgrade deps, macOS 14 support, build fully via mcpp#26
Sunrisepeak merged 9 commits into
mainfrom
feat/v0.1.5-upgrade-deps-macos14

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Jun 8, 2026

Copy link
Copy Markdown
Member

概述

发布 d2x 0.1.5:升级到最新 xlings/mcpp,新增 macOS 14 支持,并把 d2x 自身的构建 + CI + release 全面切换到 mcpp 体系(移除 xmake)。✅ CI 五个作业全绿。

改动

依赖升级(均到最新版)

  • mcpp 0.0.130.0.520.0.13 已从 registry 移除,原 CI 实际已濒临失效。
  • xlings 0.4.310.4.51llmapi 0.2.50.2.6tinyhttps 0.2.20.2.3
  • 版本号 → 0.1.5config.cppm / mcpp.toml / README)。

构建/CI/release 全面切换到 mcpp(移除 xmake)

  • .xlings.json 为 linux/macosx/windows 都 pin mcpp。
  • ci.yml:linux / macos-14 / macos-15 / windows 四平台统一用 mcpp build。mcpp 自带工具链,彻底绕开此前 macOS SDK / xmake / brew-llvm 的一系列问题。
  • release.yml:linux(--static musl 全静态)/ macOS / Windows 均改用 mcpp,并加入 --version 校验防止发错版本。
  • 删除 xmake.lua:d2x 自身只用 mcpp 构建。(buildtools/xmake 是 d2x-buildtools 交付物、d2mcpp checker 的 xmake 路径均不受影响。)

macOS 14 支持(issue #19

mcpp 在 macos-14 runner 上原生构建并通过(CI build (macos-14, mcpp) 绿)。release 的 macOS 产物在 macos-14 上构建,使其可运行于 macOS 14+。

Issue 处理

  • windows 平台 d2x checker 卡住 #24:新增 checker-smoke (linux) CI 作业——取 d2mcpp 课程、在 120s 超时内跑 d2x checker,断言其能输出首个练习的编译错误而非卡在加载日志。证明 checker 在 Linux 正常;windows 平台 d2x checker 卡住 #24 是 Windows 特有问题。另含一处相关修复(Windows run_command_capture2>&1)。
  • feature: i18n support #8book 命令支持任意 book/<lang> 子书(不再硬编码 zh/en),缺失回退默认。

验证

  • ✅ CI 五作业全绿:linux / macos-14 / macos-15 / windows(均 mcpp)+ checker-smoke。
  • ✅ 本地 mcpp build / mcpp build --static 通过,d2x --version = 0.1.5

备注

  • windows 平台 d2x checker 卡住 #24 的 Windows 交互式卡住无法由 CI 复现(CI 非交互),完整修复仍需 Windows 实机;checker-smoke 已证明机制在 Linux 正常,可作为回归守护。issue 暂不关闭。
  • release.yml 为手动 workflow_dispatch,不被 PR CI 覆盖,但其 mcpp 步骤与已验证的 ci.yml 一致。

…pport

Dependency upgrades (to latest):
- mcpp 0.0.13 -> 0.0.52 (.xlings.json); 0.0.13 was removed from the registry
- xlings 0.4.31 -> 0.4.51 (CI/release)
- llmapi 0.2.5 -> 0.2.6, mcpplibs-tinyhttps 0.2.2 -> 0.2.3 (xmake.lua),
  aligning the xmake build with mcpp.toml
- bump version to 0.1.5 (config.cppm, mcpp.toml, README)

CI / macOS 14 support (#19):
- the xlings-bundled xmake is built against a fixed macOS SDK and aborts on
  older runners ("built for macOS 15.5 which is newer than running OS"); install
  xmake via the official setup action and use xlings only for the LLVM toolchain
- build-macos now runs a [macos-14, macos-15] matrix; release builds on macos-14
  so the artifact also runs on newer macOS

Issue fixes:
- #24 (contributing): Windows run_command_capture now redirects stderr to stdout
  (2>&1) like linux/macos, so build errors / D2X_WAIT markers are captured
- #8: `book` resolves any project-provided book/<lang> sub-book, not just zh/en,
  falling back to the default book/ when absent

chore: ignore generated mcpp.lock and compile_commands.json
The xlings-bundled clang (20.1.7) is also built against a newer macOS SDK
and aborts on macos-14 with dyld "Symbol not found: __ZdaPv" — the same OS
mismatch as the xmake binary. Switch the macOS CI matrix to OS-matched
toolchains: xmake from the official action + LLVM from Homebrew. Project
deps come from xmake's mcpplibs-index, so xlings is no longer needed for the
macOS build.

release.yml: keep building the macOS artifact on macos-15 (where the xlings
toolchain runs natively, preserving the no-LLVM-runtime-dep check) and only
fix the previously hardcoded LLVM SDK path to be resolved dynamically.
- ci.yml: new `checker-smoke (linux)` job builds d2x, checks out the d2mcpp
  course, and runs `d2x checker` against it under a 120s timeout, asserting it
  reaches and reports the FIRST exercise's build error rather than hanging on
  the init log. The checker waits for edits forever, so the timeout kill is the
  expected healthy outcome; we only assert output was produced.
- release.yml: build the Linux artifact with `mcpp build --static` (matching the
  CI build path) instead of xmake, producing a statically-linked binary; add a
  version-assert guard so a release never ships a mismatched d2x --version.
Switch the macOS (macos-14/15) and Windows build jobs from xmake to the same
mcpp path already used on Linux, and pin mcpp for macosx/windows in
.xlings.json. The d2mcpp checker buildtool (xmake d2x-buildtools) is unrelated
and unchanged.
- release.yml: macOS and Windows release jobs now build with mcpp (matching CI
  and the Linux release job), with a version-assert guard. macOS builds on
  macos-14 so the artifact runs on macOS 14+.
- Delete xmake.lua: d2x is now built exclusively via mcpp (mcpp.toml) across
  local/CI/release. The buildtools/xmake plugin (the d2x-buildtools deliverable
  for d2x-type courses) and the d2mcpp checker path are unaffected.
@Sunrisepeak Sunrisepeak changed the title feat: release v0.1.5 — upgrade to latest xlings/mcpp + macOS 14 support feat: release v0.1.5 — upgrade deps, macOS 14 support, build fully via mcpp Jun 8, 2026
@Sunrisepeak Sunrisepeak merged commit 93df9ae into main Jun 8, 2026
5 checks passed
@Sunrisepeak Sunrisepeak deleted the feat/v0.1.5-upgrade-deps-macos14 branch June 8, 2026 07:27
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