Skip to content

ci: maximum optimization for self-hosted runner - #60

Merged
Gaubee merged 1 commit into
mainfrom
ci/optimize-speed
Dec 22, 2025
Merged

Gaubee merged 1 commit into
mainfrom
ci/optimize-speed

Conversation

@Gaubee

@Gaubee Gaubee commented Dec 22, 2025

Copy link
Copy Markdown
Contributor

Self-hosted 极速优化

优化点

优化 之前 之后
Set up job 10s (下载 actions) ~2s (无下载)
Checkout 3s (actions/checkout) ~1s (git fetch)
Install 18s ~2s (cache hit)
Tasks 串行 turbo 并行

实现方式

Self-hosted 快速路径:

  • 直接用 git 命令,跳过 actions/checkout 下载
  • 环境预装,跳过 setup-node/setup-pnpm
  • 保持 node_modules,pnpm install 秒完成
  • turbo 并行执行 typecheck + build + i18n

GitHub-hosted Fallback:

  • 标准 actions 流程
  • 完整环境安装
  • 确保 CI 不中断

Self-hosted (ci-fast):
- Completely separate job with NO actions defined
- No action downloads in Set up job phase
- Single turbo command: typecheck + build + i18n + test
- Error logs captured and printed on failure
- E2E only when code changes

GitHub-hosted (ci-standard):
- Standard actions workflow (fallback)
- Same turbo parallel execution

Expected self-hosted timing:
- Set up job: ~2s (no downloads)
- Git checkout: ~1s
- Install: ~2s (cache hit)
- All checks: turbo parallel ~30s
@Gaubee
Gaubee merged commit da8439b into main Dec 22, 2025
5 checks passed
@Gaubee
Gaubee deleted the ci/optimize-speed branch January 4, 2026 07:21
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