Skip to content

ci: narrow CI matrix to ubuntu (cost reduction)#24

Merged
hqhq1025 merged 3 commits intomainfrom
wt/ci-cost-cut
Apr 18, 2026
Merged

ci: narrow CI matrix to ubuntu (cost reduction)#24
hqhq1025 merged 3 commits intomainfrom
wt/ci-cost-cut

Conversation

@hqhq1025
Copy link
Copy Markdown
Collaborator

@hqhq1025 hqhq1025 commented Apr 18, 2026

Summary

  • ci.yml lint/typecheck/test 收窄到 ubuntu-only(fast 1-2 min feedback)
  • 三平台 build 由 release.yml tag 触发(不影响日常开发节奏)
  • husky pre-push hook 本地强制 typecheck + lint(几秒就 fail fast)
  • 仓库已转 public,Actions 完全免费

Why

  • 开发期间 CI 慢会拖慢节奏;ubuntu only 1-2 min vs 三平台 5+ min
  • 跨平台风险主要在 native deps,release tag build 时验证一次足够
  • husky 兜底保证本地不挂的代码才推

Test plan

  • PR 触发只跑 ubuntu CI
  • tag push 仍触发 release.yml 三平台
  • 故意 typecheck 失败时 git push 被 husky 阻止

…tags)

Signed-off-by: hqhq1025 <1506751656@qq.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • [Major] PR/main 丢失跨平台前置验证,平台回归会延迟到打 tag 才暴露(直接影响发布稳定性)— 证据 .github/workflows/ci.yml:18
    Suggested fix:
    check:
      strategy:
        fail-fast: false
        matrix:
          os: [ubuntu-latest, windows-latest, macos-latest]
      if: ${{ github.event_name != 'pull_request' || matrix.os != 'macos-latest' }}
      runs-on: ${{ matrix.os }}

Summary

  • Review mode: initial
  • 发现 1 个 Major 问题:当前改动把 PR/main 的 CI 从多平台收窄到仅 Ubuntu,导致 Windows/macOS 相关问题只能在 release tag 阶段发现,回归反馈周期明显变长。

Testing

  • Not run (automation)

open-codesign Bot

Comment thread .github/workflows/ci.yml
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ubuntu-latest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Major] 这里将 runs-on 固定为 ubuntu-latest,会让 PR/main 阶段失去 Windows/macOS 前置验证。建议至少保留 windows-latest(PR)并在 main 保留全矩阵,以继续控成本但避免平台问题延迟到 tag 发布时才暴露。

strategy:
  fail-fast: false
  matrix:
    os: [ubuntu-latest, windows-latest, macos-latest]
if: ${{ github.event_name != 'pull_request' || matrix.os != 'macos-latest' }}
runs-on: ${{ matrix.os }}

- Add husky pre-push hook that runs typecheck + lint locally before push
- Add husky prepare script and devDep to package.json
- Add CI section to README explaining ubuntu-only CI and tag-based cross-platform builds
- ci.yml already has lint/typecheck/test on ubuntu-only (no change needed)

Signed-off-by: hqhq1025 <1506751656@qq.com>
@github-advanced-security
Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@hqhq1025
Copy link
Copy Markdown
Collaborator Author

@github-actions Decision: keep ubuntu-only on PR/main during the v0.x rapid-dev phase. Rationale per PR description (faster feedback loop, cross-platform validated on tag via release.yml). Will revisit after v0.1 ships.

Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • [Major] PR/main 失去跨平台前置验证,Windows/macOS 回归会延后到发版 tag 才暴露,拉长反馈周期并增加修复成本。证据 .github/workflows/ci.yml:18
    Suggested fix:

    check:
      strategy:
        fail-fast: false
        matrix:
          os: [ubuntu-latest, windows-latest, macos-latest]
      runs-on: ${{ matrix.os }}
  • [Major] pre-push 脚本未启用 fail-fast,pnpm -r typecheck 失败后仍会继续执行;若后续 pnpm lint 成功,脚本最终返回 0,导致坏状态代码仍可 push。证据 .husky/pre-push:3
    Suggested fix:

    #!/usr/bin/env sh
    set -e
    echo "Running pre-push checks..."
    pnpm -r typecheck
    pnpm lint
    echo "Pre-push checks passed"

Summary

  • Review mode: follow-up after new commits
  • 本次仍有 2 个 Major 问题,分别影响跨平台质量门禁与本地推送门禁可靠性。
  • 约束检查补充:新增依赖 husky 为 devDependency;许可证信息 Not found in repo/docs(本次未在仓内找到可核验条目)。未发现直接 SDK 引入、UI token 违规、或静默 fallback 的新增问题。

Testing

  • Not run (automation)
  • 建议补充一次 hook 行为验证:人为制造 typecheck 失败时,git push 必须被阻止。

open-codesign Bot

Comment thread .github/workflows/ci.yml
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ubuntu-latest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Major] PR/main 仅在 ubuntu 验证会延迟发现 Windows/macOS 回归。建议恢复矩阵并保留 fail-fast: false

check:
  strategy:
    fail-fast: false
    matrix:
      os: [ubuntu-latest, windows-latest, macos-latest]
  runs-on: ${{ matrix.os }}

Comment thread .husky/pre-push
@@ -0,0 +1,5 @@
#!/usr/bin/env sh
echo "Running pre-push checks..."
pnpm -r typecheck
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Major] 这里缺少 fail-fast,typecheck 失败后脚本仍可能最终返回 0(若 lint 成功)。建议在脚本开头加 set -e

#!/usr/bin/env sh
set -e
echo "Running pre-push checks..."
pnpm -r typecheck
pnpm lint
echo "Pre-push checks passed"

Signed-off-by: hqhq1025 <1506751656@qq.com>
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings

  • [Major] Dropping PR/main CI to Ubuntu-only removes pre-merge Windows/macOS verification, so platform regressions can be discovered only at tag-release time, increasing compatibility risk and repair cost. Evidence .github/workflows/ci.yml:18
    Suggested fix:
    check:
      strategy:
        fail-fast: false
        matrix:
          os: [ubuntu-latest, windows-latest, macos-latest]
      runs-on: ${{ matrix.os }}

Summary

  • Review mode: follow-up after new commits
  • 1 Major issue remains in the latest head: PR/main CI no longer validates Windows/macOS before merge.
  • docs/VISION.md and docs/PRINCIPLES.md: Not found in repo/docs in this checkout.

Testing

  • Not run (automation)

open-codesign Bot

Comment thread .github/workflows/ci.yml
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ubuntu-latest
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Major] Ubuntu-only PR/main CI removes pre-merge Windows/macOS validation and delays platform regression detection to release tags.

check:
  strategy:
    fail-fast: false
    matrix:
      os: [ubuntu-latest, windows-latest, macos-latest]
  runs-on: ${{ matrix.os }}

@hqhq1025 hqhq1025 merged commit 589f7c2 into main Apr 18, 2026
6 checks passed
@hqhq1025 hqhq1025 deleted the wt/ci-cost-cut branch April 18, 2026 15:50
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.

2 participants