Skip to content

fix(ci): repair macOS installer packaging and validate artifacts - #185

Merged
YoungSx merged 2 commits into
mainfrom
fix-ci-failures-pr
Sep 8, 2026
Merged

fix(ci): repair macOS installer packaging and validate artifacts#185
YoungSx merged 2 commits into
mainfrom
fix-ci-failures-pr

Conversation

@YoungSx

@YoungSx YoungSx commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

v1.5.0 的 macOS 发布打包在未配置 installer 签名时失败:系统 Bash 3.2 在 set -u 下展开空 signing_args 会报 unbound variable。后续 builder 又只接受 Contents/MacOS/cli,而本次 Uno 产物的 CLI 实际位于 Contents/Resources/cli

本次修复让参数数组包含必需参数,按安装脚本的顺序探测两个 CLI 位置,并通过参数传递 plist 路径,支持含单引号的目录。产物检查同步采用可执行候选规则,避免第一个不可执行文件遮住第二个有效位置。现有 macOS PR job 改为发布携带 CLI 的 .app、构建 unsigned .pkg、展开真实包、核对包内 postinstall,并在临时根执行安装脚本及链接后的 CLI。发布 workflow 也在上传前执行同一产物检查。AGENTS.md 补充目标 shell 与打包入口的回归规则。

修改文件:

  • .github/workflows/release-packaging.yml:修复 Bash 3.2 参数数组,上传前核验真实 pkg。
  • .github/workflows/platform-build-gates.yml:将安装包构建与执行检查接入现有 macOS PR job。
  • scripts/release/build-macos-pkg.sh:支持两个 CLI 位置,并安全读取带引号路径的 plist。
  • scripts/gates/macos_pkg_build_contract.py:10 个用例执行真实发布步骤,覆盖签名参数、目录和拒绝分支。
  • scripts/gates/run-macos-pkg-artifact-gate.sh:展开真实包、核对包内脚本、在临时根执行并验证命令。
  • scripts/gates/run-release-artifact-contract-gate.sh:统一可执行候选选择,补回退和拒绝自测。
  • AGENTS.md:记录目标 shell 与安装包入口的验证规则。

验证:

  • Bash 3.2.57 与本机 Bash 5.2 均通过 10 个行为用例;执行的是 release workflow 的实际 build-pkg 步骤及 builder,仅替换平台工具。
  • 逐项移除空数组、双目录和路径引用修复,分别重现 unbound variable、缺少 CLI、Python 字符串语法错误;恢复后通过。另确认产物检查在修复前拒绝可执行候选回退,修复后通过。
  • Release 构建及 GitHubWorkflowContractTests:16/16 通过;现有安装链接检查 15 项、产物检查自测 24 项、workflow 检查自测 15 项及 9 个 workflow 检查通过。
  • Bash 3.2 语法检查、git diff --check 通过。构建只出现既有 C# 警告。

当前 PR head fa0e3c609b058f96e1f93a964020706c92457913 的 CI 证据:

  • macOS Desktop 已通过。实际生成 artifacts/macos/SalmonEgg-1.5.1.pkg,确认 CLI 在 Contents/Resources/cli;校验和、真实 pkgutil --expand-full、包内 postinstall 与链接后的 Mach-O --version 均通过。产物来自该 PR 的测试合并提交 97dcdd019dcd6fe672f164c4e1881cf37977228d,版本为 1.5.1-alpha.0.2+97dcdd019dcd6fe672f164c4e1881cf37977228d
  • CI Core 构建与测试通过:4986 成功、63 跳过、0 失败。

签名、公证与系统全局安装未验证;本次在真实包的临时展开目录执行包内安装脚本。

失败依据:https://github.com/salmonloop/salmon-egg/actions/runs/34225171678

最终检查:当前 head fa0e3c60 的 12 项检查通过,Deterministic GUI Smoke Gates 按既有配置跳过;无失败或等待项,PR 无冲突(MERGEABLE / CLEAN)。

Keep pkg arguments nonempty for macOS Bash 3.2 nounset, accept both Uno CLI bundle layouts, and pass plist paths as data. Exercise the actual release step and build and inspect an unsigned package in the macOS PR gate.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@vercel

vercel Bot commented Sep 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
salmonegg Ready Ready Preview Sep 8, 2026 5:54pm UTC

Select an executable CLI candidate before accepting its bundle location. Cover an unusable MacOS candidate with a valid Resources fallback and reject two unusable candidates.
@YoungSx
YoungSx merged commit 4a4e3c5 into main Sep 8, 2026
13 checks passed
@YoungSx
YoungSx deleted the fix-ci-failures-pr branch September 8, 2026 18:47
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