Skip to content

ci: 修复自托管 CI 的依赖同步与 checkout 中断,Linux/Windows 均跑通 - #46

Merged
donghaiwang merged 1 commit into
OpenHUTB:hutbfrom
Dame-time-0034:ci/windows-checkout-tolerate-hook
Nov 11, 2026
Merged

donghaiwang merged 1 commit into
OpenHUTB:hutbfrom
Dame-time-0034:ci/windows-checkout-tolerate-hook

Conversation

@Dame-time-0034

@Dame-time-0034 Dame-time-0034 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

问题

  1. Linux 依赖同步被静默跳过
    ./Setup.sh --force 传给 GitDependencies 时变成非法的 -force,同步实际没执行,脚本仍打印 SUCCESS;随后 UnrealBuildTool.exe 不存在,构建失败。

  2. 依赖清单里存在仓库中不存在的文件
    Engine/Source/ThirdParty/Licenses/Avid_DNxHD_v2.5.2.37_License.pdf 在 Commit.gitdeps.xml 中登记,但仓库里没有该文件;GitDependencies 回源 http://cdn.unrealengine.com 被拒绝(匿名请求 403),同步中止。
    另外 Binaries/ThirdParty/Mono/Linux/etc/mono/registry/last-btime 会被 Mono 运行时改写,每次都被判定为"已修改"并触发同样的重新下载。

  3. Windows checkout 阶段中断
    post-checkout hook 同步依赖后返回退出码 1,checkout 步骤判失败,后续 build 从未执行。

  4. 连续 push 堆积运行
    自托管机器单次构建数小时,多次 push 会产生多个排队运行抢同一个 runner。

修改

  • 使用官方 --exclude=<目录名> 参数排除 Licenses、registry(匹配逻辑见 Engine/Source/Programs/GitDependencies/Program.cs 的 IsExcludedFolder)
  • 同步前用官方 --dry-run 打印过期文件清单,便于核对
  • 去掉 Setup.sh --force 的错误用法
  • Windows checkout 增加 continue-on-error: true,并新增 Verify checkout 校验 .git 与 HEAD
  • 两个 workflow 增加 concurrency(cancel-in-progress: true),同分支新提交自动取消旧运行
  • doxygen.yml 的 Deploy 增加 if: github.repository == 'OpenHUTB/engine',fork 无写权限时跳过

验证

平台 结果
Linux(b8206f18) build、自动化测试、install 全部 success
Windows(b8206f18) checkout、build、install、清理 全部 success

@donghaiwang

Copy link
Copy Markdown
Member

暂时关闭,准备好再打开,不然会触发太多不必要的测试。 https://github.com/OpenHUTB/engine/actions
前面可以用手动触发的方式进行测试,而不是用push测试

@Dame-time-0034 Dame-time-0034 changed the title ci: 修复 Windows CI 在 checkout 阶段被 post-checkout hook 打断 ci: 修复自托管 CI 的依赖同步与 checkout 中断,Linux/Windows 均跑通 Nov 10, 2026
- 依赖同步改用官方 --exclude=Licenses / --exclude=registry
- 移除失效的 Setup.sh --force,同步前 --dry-run 输出过期清单
- Windows checkout 容错并校验 .git 与 HEAD
- 两个 workflow 增加 concurrency
- doxygen 的 Deploy 仅在主仓库执行
@Dame-time-0034
Dame-time-0034 force-pushed the ci/windows-checkout-tolerate-hook branch from de463f6 to 2fbbaf4 Compare November 10, 2026 23:20
@donghaiwang
donghaiwang merged commit 2e52492 into OpenHUTB:hutb Nov 11, 2026
2 checks passed
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