From 5bc5ed1e62d75ae3029ff24f4e5827ab909ac079 Mon Sep 17 00:00:00 2001 From: wangjia <809946525@qq.com> Date: Sun, 26 Jul 2026 00:55:26 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20pangolin=20=E7=9A=84=20runs-on=20?= =?UTF-8?q?=E4=BB=8E=20nas=20=E7=BB=9F=E4=B8=80=E6=94=B9=E4=B8=BA=20mac?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit runner 命名/标签统一:mac-pangolin-2 是跑在 Mac 上的个人级 runner,原来挂 `nas` 标签(历史上按"理想归宿是 NAS Linux runner"预留),命名与实体不符、 易混。现把 runner 标签改为 `mac`(个人级不变,仍服务名下所有仓库),并把 pangolin 全部 workflow 的 `runs-on: nas` → `runs-on: mac` 对齐(ci.yml 9 个 job + 解释注释、deploy-client.yml 4 个 job)。与 jiu 的 `runs-on: mac` 统一, 一个个人级 mac runner 即可服务两边。ci-runner.md 标签引用同步更新。 Co-Authored-By: Claude Fable 5 --- .gitea/workflows/ci.yml | 20 ++++++++++---------- .gitea/workflows/deploy-client.yml | 8 ++++---- docs/ci-runner.md | 6 +++--- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index db6c1bd..b4c682c 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -20,7 +20,7 @@ on: # · runs-on: ubuntu-latest —— 在 catthehacker 容器里跑,仅用于纯 bash 扫描 # (redline/cleartext/portable-sql);容器内**不能**嵌套 `docker run`(DinD 挂载 # 失败,$PWD 在宿主不存在),故套 docker 的 job 不能用它。 -# · runs-on: nas —— host 模式(mac-pangolin-2 直接在宿主跑),`docker run` 是宿主 +# · runs-on: mac —— host 模式(mac-pangolin-2 直接在宿主跑),`docker run` 是宿主 # 真 docker(非嵌套),可正常拉/跑 node/golang/flutter/python/shellcheck 镜像。 # golden 保留 ghcr.io/cirruslabs/flutter Linux 容器 → 与入库基线渲染一致。 jobs: @@ -28,7 +28,7 @@ jobs: # ── Job 1: Lint (shellcheck) ───────────────────────────────────────────── lint: name: Lint — shellcheck - runs-on: nas + runs-on: mac steps: - name: Checkout uses: actions/checkout@v4 @@ -81,7 +81,7 @@ jobs: # ── Job 2: OpenAPI Sync Check ──────────────────────────────────────────── openapi-check: name: OpenAPI Sync Check - runs-on: nas + runs-on: mac steps: - name: Checkout uses: actions/checkout@v4 @@ -120,7 +120,7 @@ jobs: # ── Job 4: Flutter 客户端(分析 + 单测/组件测试)──────────────────────── flutter-client: name: Flutter — analyze + test - runs-on: nas + runs-on: mac steps: - name: Checkout uses: actions/checkout@v4 @@ -156,7 +156,7 @@ jobs: # (改了 design/colors_and_type.css 没重生成,或手改了生成物)。 codegen-drift: name: Codegen Drift — token 生成物未漂移 - runs-on: nas + runs-on: mac steps: - name: Checkout uses: actions/checkout@v4 @@ -170,7 +170,7 @@ jobs: ds-flow: name: DS-flow — 原型/跨端同源/代码色单源闸 - runs-on: nas + runs-on: mac steps: - name: Checkout uses: actions/checkout@v4 @@ -189,7 +189,7 @@ jobs: # -tags integration(需 docker 起 mysql/redis),见 go-integration job。 go-server: name: Go — build + test - runs-on: nas + runs-on: mac steps: - name: Checkout uses: actions/checkout@v4 @@ -215,7 +215,7 @@ jobs: # 详见 scripts/e2e-smoke.sh + server/test/e2e/。 e2e-smoke: name: E2E Smoke — L4 进程级端到端 - runs-on: nas + runs-on: mac steps: - name: Checkout uses: actions/checkout@v4 @@ -241,7 +241,7 @@ jobs: # · -p 1 串行:一次只起一个 mysql 容器,避免并发把 Docker Desktop 压垮/端口资源争用。 go-integration: name: Go — integration (mysql/redis testcontainers) - runs-on: nas + runs-on: mac steps: - name: Checkout uses: actions/checkout@v4 @@ -256,7 +256,7 @@ jobs: # tablet/desktop-stats golden 与 stats-overhaul 工作区耦合,待其合并后并入本 job。 golden: name: Golden — 视觉回归 (全量:components/auth/desktop/tablet) - runs-on: nas + runs-on: mac steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.gitea/workflows/deploy-client.yml b/.gitea/workflows/deploy-client.yml index 39b7688..8ba9cf7 100644 --- a/.gitea/workflows/deploy-client.yml +++ b/.gitea/workflows/deploy-client.yml @@ -34,7 +34,7 @@ concurrency: jobs: build-android: - runs-on: nas + runs-on: mac env: GOPROXY: https://goproxy.cn,direct PUB_HOSTED_URL: https://pub.flutter-io.cn @@ -106,7 +106,7 @@ jobs: # simply picks up whatever artifacts DO exist — an absent "macos" # artifact is not an error there. build-macos: - runs-on: nas + runs-on: mac continue-on-error: true env: PUB_HOSTED_URL: https://pub.flutter-io.cn @@ -137,7 +137,7 @@ jobs: path: dist/ build-ios: - runs-on: nas + runs-on: mac continue-on-error: true env: PUB_HOSTED_URL: https://pub.flutter-io.cn @@ -168,7 +168,7 @@ jobs: # (对应平台下载保留 pangolin1 上一版,待可用时下个 client-v* 追上)。 release-deploy: needs: [build-android] - runs-on: nas + runs-on: mac steps: - name: Checkout uses: actions/checkout@v4 diff --git a/docs/ci-runner.md b/docs/ci-runner.md index 7c9f7dc..5941e46 100644 --- a/docs/ci-runner.md +++ b/docs/ci-runner.md @@ -10,13 +10,13 @@ | 级别 | **项目级**(绑 `wangjia/pangolin`,只服务本仓库) | | 机器 | mac 本机(`/Users/wangjia/bin/act_runner` v0.6.1) | | 执行模式 | **host**(非容器) | -| label | `nas`(即 `runs-on: nas`) | +| label | `mac`(即 `runs-on: mac`) | | 连接 | 经 jiu 的 TCP relay `127.0.0.1:13000` → NAS gitea `192.168.3.200:3000` | ### 为什么是 host 模式 + mac - ci.yml 的 9 个 job **全是 docker-in-docker**(每个 job 内部 `docker run …` 拉 golang/flutter/redis 等镜像)。container 模式(像 jiu 的 `ubuntu-latest:docker://catthehacker`)在非特权容器里跑不了 DinD,所以必须 **host 模式**。 - mac 的 Docker Desktop 能跑 Linux 容器,host 模式下 `docker run ` 可用。 -- 理想归宿其实是 **NAS(Linux)host runner**(给 NAS 现有 runner 加 `nas:host` label),mac 只是当前落点。 +- 理想归宿其实是 **NAS(Linux)host runner**(给 NAS 现有 runner 加 `mac:host` label),mac 只是当前落点。 ### 为什么要 relay(13000) mac 上的 Shadowrocket 网络扩展会拦截 act_runner 这个 Go 二进制的流量,直连 NAS gitea 失败。jiu 已有一个常驻 python TCP relay(`~/bin/tcp_relay.py`,`127.0.0.1:13000 → 192.168.3.200:3000`),act_runner 连本地 relay 绕过。pangolin runner **复用**这个 relay。 @@ -30,7 +30,7 @@ runner: capacity: 1 timeout: 3h labels: - - "nas:host" + - "mac:host" cache: enabled: true host: