Files
sundynix-agentix/.github/workflows/ci.yml
T
Blizzard a5cf2c5f36 ci: 构建链补完 wails v2→v3 迁移,CI 触发收敛到 main
代码早就全量迁到 v3(go.mod 只要 wails/v3、main.go import v3/pkg/application),
但"怎么构建"这一层从没跟上,全还是 v2:

- release.yml 装 v2 CLI(wails@v2.12.0)去编 v3 代码,编不过;产物路径也还
  指向 v2 的 build/bin/,而 v3 落在 bin/。这条只在打 v* tag 时触发,迁移后
  一次都没跑过,所以坏了半个月没人知道 —— 下次发版必炸。
- Makefile 的 wails dev/build 直接 command not found。
- README 叫人装 v2 CLI;RELEASE.md 还在提早已删除的 wails.json。

改动:
- ci.yml 触发从 [main, dev] 收到 [main]。dev 分支已删,开发在 feat/wails3,
  留着 dev 是死条件;PR 以 main 为目标仍会跑,合入前有关卡。
- release.yml 全量转 v3:
  * CLI 钉死 v3.0.0-alpha2.117,与 go.mod 的 wails/v3 版本一致 —— alpha 阶段
    CLI 生成的 bindings 和运行时配套,版本错开会出难查的怪问题。
  * mac 走 wails3 task darwin:package:universal。v3 的 build 只出裸二进制
    (macOS 上双击不起窗),必须 package 才有 .app;本地实跑验证过,
    lipo -archs 确认是真 universal(x86_64 + arm64)。
  * Windows 保持 v2 时代行为发裸 .exe。v3 的 package 默认走 NSIS 出 installer,
    依赖 runner 上有 makensis,属额外未知数,要升级安装包再单独议。
  * 产物路径 build/bin/ → bin/。
  * fail_on_unmatched_files 改 true,并按 matrix 只匹配自己那个产物 ——
    原来是 false 且两个平台都列全量文件,产物路径写错会安静发一个没附件的
    Release。这次的 bug 正是路径漂移,得让它当场炸。
- RELEASE.md 版本号对齐表补上第三处 build/config.yml 的 info.version(此前写着
  "必须三处对齐"却只列了两处,第三处是已删的 wails.json),并记下改完必须跑
  wails3 task common:update:build-assets 重新生成 Info.plist —— 这坑踩过。
- 清掉 v2 残留:frontend/wailsjs/(v2 绑定,v3 用已跟踪的 bindings/)及其
  gitignore 规则、build/bin/ 里 v2 时代的 .app。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 15:03:32 +08:00

73 lines
2.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: CI
# 只认 mainpush 到 main、以及任何以 main 为目标的 PR。
# 开发分支(feat/*)自己 push 不跑 CI,靠合入 main 前的 PR 把关。
on:
push:
branches: [main]
pull_request:
branches: [main]
# 同一分支新 push 取消上一次未完成的运行,省 CI 时间。
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
go:
name: Go · build + vet + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.25"
cache-dependency-path: "**/go.sum"
- name: build + vet + test4 模块;bus 用内嵌 NATS,无需外部服务)
run: |
set -e
for m in sundynix-shared sundynix-gateway sundynix-dispatcher sundynix-mcp-go; do
echo "::group::$m"
(cd "$m" && go build ./... && go vet ./... && go test ./...)
echo "::endgroup::"
done
web:
name: Frontend · tsc
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dir: [sundynix-desktop/frontend, sundynix-admin]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: ${{ matrix.dir }}/package-lock.json
- name: install + typecheck
working-directory: ${{ matrix.dir }}
run: |
npm ci
npx tsc --noEmit
py:
name: mcp-py · sandbox guard
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: install + test(无 Docker 时测降级路径)
working-directory: sundynix-mcp-py
run: |
python -m pip install --upgrade pip
python -m pip install -e . pytest
PYTHONPATH=src:tests python -m pytest tests/ -q || \
PYTHONPATH=src:tests python -c "import test_sandbox as t; \
fns=[getattr(t,n) for n in dir(t) if n.startswith('test_')]; \
[ (f(),print('PASS',f.__name__)) for f in fns ]; print(f'{len(fns)} passed')"