macOS 发布改为只出 arm64 单架构(修复 Mac 管线 #7 起连续失败) #447
Reference in New Issue
Block a user
Delete Branch "feat/agc-macos-arm64-only"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
背景
Mac 管线连续失败(#7~#13)的根因是:发布目标一直是
universal-apple-darwin,而随包 Node 便携运行时取自构建宿主的官方发行版,官方 Node 没有 universal 发行版,所以 staging 只能抛「Node 运行时不支持发布目标:universal-apple-darwin」。期间 master 上出现过一版过渡实现(
targetRuntime('universal-apple-darwin')按宿主架构返回 arm64):它能骗过通用包自检(check-macos-bundle.mjs按process.arch校验),但Intel Mac 上这份 arm64 侧车不可执行,等于把坏包发给 Intel 用户——已发布的 dev-mac 0.1.86 就带着这个缺陷。本次决策(按需求方指示)
macOS 只出 arm64 单架构,Intel 暂不支持,恢复路径写进文档而不是糊过去。
build-macos-ci.mjs固定aarch64-apple-darwin:不再编译 x86_64,只跑 arm64 隔离 smoke,首装包命名<产品名>_<版本>_aarch64.dmg(匹配清单侧单架构分支_<version>_aarch64.dmg),构建清单记录smokes与实际清单平台键。stage-node-runtime.mjs:targetRuntime('universal-apple-darwin')恢复失败关闭并写清原因——通用包必须按架构各带一份同版本运行时(另下载另一架构官方发行版)才能构建,在此之前不得只带宿主架构那一份。resolveManifestPlatformKeys('aarch64-apple-darwin')本就只登记darwin-aarch64,resolveReleasePartition仍写<channel>-mac,Apple Silicon 客户端照常收到更新;Intel 客户端会「无可用更新」而不是装到坏包。验证
node --test apps/ai-game-creator-shell/scripts/*.test.mjs→ 92/92(含:#444 的两个测试 stub 修复、入口必须固定 arm64 目标与_aarch64.dmg后缀、universal 目标必须抛错)。npm run check:production-ops/check:encoding/check:doc-index/check:rustfmt、prettier、eslint、git diff --check全绿。node -e "stageNodeRuntime('aarch64-apple-darwin')"走既有扁平game-runtime/node/布局(未改 Rust 侧解析)。影响与遗留
darwin-x86_64键),其客户端更新入口的表现需要实测文案;随包 Node 在 Intel 上本来就不可用。与 #445 的关系
#445 走的是「真正实现 universal 双架构随包 Node」,与本 PR 方向相反。按需求方决定改为单架构后,#445 关闭;那份双架构实现保留在
backup/agc-macos-dualarch-node-runtime(feat/agc-macos-universal-node-runtime)分支,将来恢复 Intel 时可直接取其 staging 部分。