Files
gplan-2/.gitea/workflows/ci.yml
T

52 lines
2.3 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.
# 远端 CI 工作流(2026-11-03 用户裁:CI 迁远端 Mac runner,host 模式直跑)。
# 触发:master 收到 push(post-merge 钩子合回自动推,或人手推 master)——分支推送不触发
# (开发分支不烧远端引擎时长;分支级验证=开发期手动跑批档)。
# 跑什么由 tools/ci/domain_route.sh 按改动域分流(乙案)——
# 游戏码批=两域全量(含渲染闸);文档批=文档域秒级闸;纯闸件/管线批=零触发。
# 运行环境:Mac host 模式(tools/ci/mac_setup.sh 自举),GODOT_BIN/GDSTYLE_BIN 由自举件安装到位。
# 检出用纯 shell 克隆:host 模式执行 JS 系动作(actions/checkout)需要 node 运行时,
# runner 机器无 node——首跑实证「Cannot find: node in PATH」即败(run 4),本仓禁用 JS 系动作,
# 引入新 Actions 前必须确认其执行器形态(shell/composite 可,node/docker 不可)。
# 闸清单与域划分唯一出处 = tools/run_all_gates.sh(本文件只负责触发与分流,不另列闸件)。
name: ci
on:
push:
branches: [master]
jobs:
gates:
runs-on: ci-mac
timeout-minutes: 90
steps:
- name: 检出(纯 shell 克隆)
env:
TOKEN: ${{ github.token }}
run: |
git clone -q "https://${TOKEN}@git.kuaimeo.com/${GITHUB_REPOSITORY}.git" "$GITHUB_WORKSPACE/repo"
cd "$GITHUB_WORKSPACE/repo"
git log --oneline -1
- name: 域分流(乙案)
id: route
run: |
cd "$GITHUB_WORKSPACE/repo"
bash tools/ci/domain_route.sh "${{ github.event.before }}" "${{ github.sha }}"
- name: 导入缓存刷新(闸前置——.godot 不入 git,冷检出一付)
if: steps.route.outputs.mode != 'skip'
run: |
cd "$GITHUB_WORKSPACE/repo"
/usr/local/bin/godot --headless --path game --editor --quit
- name: 跑闸
if: steps.route.outputs.mode != 'skip'
env:
GODOT_BIN: /usr/local/bin/godot
GDSTYLE_BIN: /usr/local/bin/gdstyle
run: |
cd "$GITHUB_WORKSPACE/repo"
MODE="${{ steps.route.outputs.mode }}"
if [ "$MODE" = "full" ]; then ARGS=""; else ARGS="--docs"; fi
echo "[ci] 域=$MODE 跑闸参数=$ARGS"
bash tools/run_all_gates.sh $ARGS