Files
EasyTier/.github/CI.zh-CN.md
T
KKRainbow f8a45ccc20 ci: use lightweight PR checks and conditional nightly builds (#2677)
* ci: use lightweight PR checks and conditional nightly builds

Check three Core platforms, Linux GUI, and Android ARM64 on PRs and
ordinary branch pushes. Keep formatting, clippy, WASI, and all Linux
tests; reserve the per-feature sweep for full builds.

Run complete platform matrices on releases/** pushes and manual
dispatch. At 03:17 Asia/Shanghai, check existing main and develop
branches and dispatch only workflows whose last successful full build
used a different commit, retrying failed components on the next night.

Cache compilation outputs by target and build mode. Build only the GUI
frontend dependencies and reuse the dashboard artifact for Core builds.
Separate full-build concurrency so ordinary pushes cannot cancel them.

Keep the required result checks and propagate failures and
cancellations. Validate successful full-build origins and matching Core,
GUI, and Mobile commits before preparing release assets.

Validation: actionlint 1.7.12, 10 Node tests, read-only GitHub nightly
dry run, GUI frontend build, Linux GUI check, Android ARM64 check, and
Linux musl Core/Web checks including embedded dashboard assets.

* docs: describe CI behavior in English and Chinese

Document PR checks, nightly dispatch, manual builds, release validation,
artifacts, and independent workflows. Keep both versions aligned with
current workflow definitions.

* ci: decouple PR checks from Web dashboard builds

Run PR dashboard builds only when frontend sources, Core configuration
sources, protobuf schemas, or build configuration change. Keep embedded
Web builds in full mode and let ordinary Rust checks start without
frontend artifacts.

Upload dashboard artifacts only for full builds. Skip frontend setup for
ordinary lint runs and remove GUI/frontend setup from test archives.
Update both CI documents to match the new behavior.

Validation: actionlint; frontend dependency and workflow routing cases;
Linux Core cargo check and workspace clippy with frontend outputs
absent.
2026-10-12 00:13:12 +08:00

2.6 KiB

CI

English

触发方式 Core GUI Mobile
目标为 main/develop 的 PR,或 push 到这两个分支 Linux x64、Windows x64、macOS ARM64 的 Core/Web cargo check Linux 前端构建和 Rust 检查 Android ARM64 前端构建和 Rust 检查
Push 到 releases/**,或手动触发 16 个目标和 Magisk 产物 7 个目标的安装包 4 个架构的 APK

Test 运行 CI 脚本测试、fmt、clippy、WASI、Cargo.lock 检查,以及 easytier/easytier-core 的 Linux 测试(含 three_node)。全量模式还逐个 检查 easytier 的 feature,排除 macos-ne。

这四个 workflow 的构建和测试任务跳过 draft PR。普通构建和 Rust 任务可因 无关路径或重复内容而跳过。汇总检查为 core-result、gui-result、 mobile-result 和 test。

PR 仅在前端、Core 配置源码、schema 或构建配置变化时构建 Web 前端。 普通分支 push 仍构建 Web 前端。Core 检查独立运行;Web 的嵌入模式仅在 全量构建中编译。 Test 在普通模式下跳过前端构建,测试归档仅构建 Rust 包。

PR 可上传供 CI 内部复用的测试归档。Web 前端仅在全量模式上传。 Core 二进制、GUI 安装包、APK 和 Magisk 产物仅在全量模式上传。编译产物 启用缓存。普通 push 不会取消全量构建。

每日构建

定时为北京时间 03:17。对实际存在的 main/develop 分支,分别检查 Core、 GUI、Mobile、Test:比较分支 HEAD 与该 workflow 最近一次成功的 workflow_dispatch 提交,相同则跳过,不同或无成功记录则触发该 workflow。 尚未成功构建的提交在下一轮继续触发。

Nightly 只负责触发,结果见对应 workflow。每日 Core 构建设置 sign_windows: false。

手动构建与发布

需要仓库 Write 权限。在 Actions 分别运行 Core、GUI、Mobile,选择 PR 分支 即可生成全量产物。该分支必须包含这些 workflow 定义。Fork PR 需要先在本 仓库建立临时分支。

手动 Core 构建默认开启 SignPath 测试签名(sign_windows: true)。 全量 macOS GUI 构建会签名和公证。

Release 是独立的手动 workflow。输入的 Core/GUI/Mobile run ID 必须分别来自 正确的 workflow、全量构建成功,且提交相同。它下载这些产物并创建 draft release。

其他 workflow

  • OHOS 独立运行,相关 PR 仍可上传 HAR。
  • Go、JavaScript Hosts、Nix 使用各自的路径过滤。
  • Docker 手动触发,下载指定 Core 构建的产物并推送镜像。