From 3375bc1235c2c55836e10cabae165430fe5034e7 Mon Sep 17 00:00:00 2001 From: harryisfish Date: Tue, 10 Nov 2026 16:15:56 +0800 Subject: [PATCH 1/6] ci(mobile): reuse the simulator app by its inputs and sample runner load The iOS job spends about 35 minutes building before a UI run that fails within minutes on a slow simulator. Cache the simulator app keyed by its inputs, the runner image and the Rust toolchain, and record the runner's load, memory and busiest processes while the UI test runs. --- .github/workflows/mobile.yml | 34 ++++++++++++++++++++++++++++++---- packages/docs/ci.md | 2 +- scripts/ci-runner-load.sh | 16 ++++++++++++++++ 3 files changed, 47 insertions(+), 5 deletions(-) create mode 100755 scripts/ci-runner-load.sh diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index 8d5da5149..50bfd5787 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -95,19 +95,40 @@ jobs: node-version: '24' cache: pnpm cache-dependency-path: pnpm-lock.yaml + # The app embeds no commit, so a rerun or an unrelated change reuses the app built from the + # same inputs, Xcode image and Rust toolchain instead of spending its build again. + - name: Key the simulator app by its inputs + id: app + run: echo "key=ios-simulator-app-$ImageOS-$ImageVersion-$(rustc -V | shasum -a 256 | cut -c1-16)-${{ hashFiles('apps/mobile/**', 'packages/**', 'crates/**', 'Cargo.toml', 'Cargo.lock', 'pnpm-lock.yaml', 'scripts/build-mobile-secure.sh', '!**/node_modules/**') }}" >> "$GITHUB_OUTPUT" + - name: Restore the simulator app built from the same inputs + id: app_cache + uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 + with: + path: .artifacts/native/ios-build/Build/Products/Release-iphonesimulator/Vibeface.app + key: ${{ steps.app.outputs.key }} - run: pnpm install --frozen-lockfile - - run: scripts/build-mobile-secure.sh ios + - if: steps.app_cache.outputs.cache-hit != 'true' + run: scripts/build-mobile-secure.sh ios - name: Build the simulator app + if: steps.app_cache.outputs.cache-hit != 'true' working-directory: apps/mobile run: | - mkdir -p ../../.artifacts/native npx expo prebuild --platform ios xcodebuild -workspace ios/Vibeface.xcworkspace -scheme Vibeface -configuration Release \ -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' ARCHS=arm64 \ -derivedDataPath ../../.artifacts/native/ios-build CODE_SIGN_IDENTITY=- CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM= build + - name: Save the simulator app for the same inputs + if: steps.app_cache.outputs.cache-hit != 'true' + uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 + with: + path: .artifacts/native/ios-build/Build/Products/Release-iphonesimulator/Vibeface.app + key: ${{ steps.app.outputs.key }} + - name: Package the simulator app + run: | + mkdir -p .artifacts/native # Ad-hoc signing writes the simulator entitlements into the binary; without them the Keychain refuses SecureStore. - otool -l ../../.artifacts/native/ios-build/Build/Products/Release-iphonesimulator/Vibeface.app/Vibeface | grep -q "sectname __entitlements" - cd ../../.artifacts/native/ios-build/Build/Products/Release-iphonesimulator + otool -l .artifacts/native/ios-build/Build/Products/Release-iphonesimulator/Vibeface.app/Vibeface | grep -q "sectname __entitlements" + cd .artifacts/native/ios-build/Build/Products/Release-iphonesimulator zip -qry "$GITHUB_WORKSPACE/.artifacts/native/vibeface-ios-simulator.zip" Vibeface.app - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: @@ -164,6 +185,8 @@ jobs: subprocess.run(["xcrun", "simctl", "boot", simulator], check=True) subprocess.run(["xcrun", "simctl", "bootstatus", simulator, "-b"], check=True) PY + - name: Sample runner load until the job ends + run: nohup scripts/ci-runner-load.sh > .artifacts/native/runner-load.log 2>&1 & - name: Prepare the task simulator's XCTest runner env: AGENT_DEVICE_HOME: ${{ github.workspace }}/.artifacts/native/agent-device @@ -289,6 +312,9 @@ jobs: set -e echo "Native Provider e2e exit code: $result" exit "$result" + - name: Show runner load during the run + if: always() + run: cat .artifacts/native/runner-load.log 2>/dev/null || true - name: Remove only this task simulator and private acceptance state id: native_cleanup if: always() diff --git a/packages/docs/ci.md b/packages/docs/ci.md index 416264a89..09d4a07f6 100644 --- a/packages/docs/ci.md +++ b/packages/docs/ci.md @@ -306,4 +306,4 @@ GitHub 主分支规则不要求 PR 先更新到最新 base,也不将 `ci-gate` 桌面测试使用打包应用自身的 DevTools 页面,核对真实 Electron 版本、窗口隔离、内置包来源、自有 Core、退出和重启。测试预先用包内 CLI 建立不入全网(`--no-mesh`)的独立 Node,随后由真实启动器启动并持有 Core;首次初始化逻辑另由桌面会话测试覆盖。Windows 另外核对真实 SID/DACL、维护通道、Unicode 路径、Provider 子进程回收和当前用户服务。Unix shell、Unix 权限位及 Linux 证明宿主夹具保留在 Unix 测试中;协调器的协议测试在两端使用各自的私有 IPC。所有 Provider 均为受控夹具,不调用真实模型。 -原生移动端构建可使用 `ci.yml` 的 `mobile_apps=ios|android|both`。`both` 让两个系统并行构建,`mobile-gate` 只验收选中的系统。iOS 设备归档验证不等同于模拟器界面或真机安装验收;现有 `mobile.yml` 保留模拟器界面测试。手动移动端验收按运行编号隔离并行,避免新提交取消尚在验证的专用模拟器任务。缺少 iOS 分发身份时,未签名设备归档的收据必须保留不可安装状态。 +原生移动端构建可使用 `ci.yml` 的 `mobile_apps=ios|android|both`。`both` 让两个系统并行构建,`mobile-gate` 只验收选中的系统。iOS 设备归档验证不等同于模拟器界面或真机安装验收;现有 `mobile.yml` 保留模拟器界面测试。手动移动端验收按运行编号隔离并行,避免新提交取消尚在验证的专用模拟器任务。缺少 iOS 分发身份时,未签名设备归档的收据必须保留不可安装状态。 iOS 模拟器 app 按输入缓存:键包含 runner 镜像版本、rustc 版本和 `apps/mobile`、`packages`、`crates`、lock 文件及 `build-mobile-secure.sh` 的摘要,命中时跳过安全库和 Xcode 构建,仍核对 entitlements。界面测试期间 `scripts/ci-runner-load.sh` 每 10 秒记录负载、空闲与压缩内存、swap 和最忙的进程名,结束时打印到日志,用于区分模拟器慢和宿主资源不足。 diff --git a/scripts/ci-runner-load.sh b/scripts/ci-runner-load.sh new file mode 100755 index 000000000..58e635711 --- /dev/null +++ b/scripts/ci-runner-load.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +# Samples a macOS runner's load every 10 seconds until the job ends, so a slow simulator can be +# told apart from a starved host. Prints only counts and process names. +set -u +printf 'cpus=%s memory_mib=%s\n' "$(sysctl -n hw.ncpu)" "$(( $(sysctl -n hw.memsize) / 1048576 ))" +page=$(sysctl -n hw.pagesize) +while :; do + vm_stat | awk -v page="$page" -v at="$(date -u +%H:%M:%S)" -v load="$(sysctl -n vm.loadavg | awk '{print $2}')" ' + /Pages free/ { free = $3 } + /Pages occupied by compressor/ { compressed = $5 } + /^Swapouts/ { swapouts = $2 } + END { printf "%s load=%s free_mib=%d compressed_mib=%d swapouts=%d", at, load, free * page / 1048576, compressed * page / 1048576, swapouts }' + ps -Ao pcpu=,ucomm= | sort -rn | head -3 | awk '{ cpu = $1; $1 = ""; printf " |%s %s%%", $0, cpu }' + echo + sleep 10 +done From f3d07896ec347333142b24345976d8cbd199cba2 Mon Sep 17 00:00:00 2001 From: harryisfish Date: Tue, 10 Nov 2026 17:16:07 +0800 Subject: [PATCH 2/6] ci(mobile): slim the simulator and boot it before the host build Runner sampling showed a 3-core, 7 GB host at load 280-460 with ~60 MB free while the new simulator ran its first-boot widgets, Spotlight and system daemons during the UI test. Slim the simulator with simslim, keeping photos, push, keychain, links, connectivity and assets the app uses, boot it before the host build so remaining startup overlaps the build, and turn off the runner's own Spotlight indexing. --- .github/workflows/mobile.yml | 56 +++++++++++++++++++++++------------- packages/docs/ci.md | 2 +- 2 files changed, 37 insertions(+), 21 deletions(-) diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index 50bfd5787..17eb3460f 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -135,30 +135,27 @@ jobs: name: vibeface-ios-simulator-${{ github.sha }} path: .artifacts/native/vibeface-ios-simulator.zip if-no-files-found: error - - name: Build the same-source host Node and browser cryptography + # Booting the simulator before the host build overlaps its remaining startup work with the build + # instead of the UI run. The runner's own Spotlight indexing only adds load. + - name: Sample runner load until the job ends + run: | + sudo mdutil -a -i off > /dev/null + nohup scripts/ci-runner-load.sh > .artifacts/native/runner-load.log 2>&1 & + - name: Install simslim env: - SOURCE_COMMIT: ${{ github.sha }} - CARGO_TARGET_DIR: ${{ github.workspace }}/.artifacts/native/target + GOTOOLCHAIN: auto + GOBIN: ${{ github.workspace }}/.artifacts/native/simslim run: | - umask 077 - mkdir -p .artifacts/native/private - chmod 700 .artifacts/native .artifacts/native/private - printf '%s\n' host-source > .artifacts/native/private/stage.txt - test "$(git rev-parse HEAD)" = "$SOURCE_COMMIT" - test -z "$(git status --porcelain --untracked-files=normal)" - test "$(uname -m)" = arm64 - printf '%s\n' host-build > .artifacts/native/private/stage.txt - cargo install wasm-bindgen-cli --version 0.2.129 --locked - bash scripts/build-web-crypto.sh - bash scripts/build-web.sh - CARGO_ENCODED_RUSTFLAGS="$(python3 scripts/release-rustflags.py)" cargo build --release -p vibeface -p vibeface-core --locked - .artifacts/native/target/release/vibeface --version - .artifacts/native/target/release/vibeface-core --version + go install github.com/mobai-app/simslim/cmd/simslim@v0.14.0 + echo "SIMSLIM=$GOBIN/simslim" >> "$GITHUB_ENV" - name: Create the dedicated iOS Provider simulator env: + SIMSLIM_BOOT_TIMEOUT: 15m + SIMSLIM_SPAWN_TIMEOUT: 5m VIBEFACE_E2E_SOURCE_COMMIT: ${{ github.sha }} run: | umask 077 + mkdir -p .artifacts/native/private python3 - <<'PY' import json, os, pathlib, platform, re, subprocess pathlib.Path(".artifacts/native/private/stage.txt").write_text("simulator-create\n") @@ -182,11 +179,30 @@ jobs: "VIBEFACE_E2E_APP_DIR": str(pathlib.Path("apps/app/dist/client").resolve()), "VIBEFACE_E2E_CRYPTO_MODULE": str(pathlib.Path("apps/app/dist/client/vibeface_secure.js").resolve())}.items(): output.write(key + "=" + value + "\n") - subprocess.run(["xcrun", "simctl", "boot", simulator], check=True) + # Boots once, turns off the widget, search and other daemons the app does not use, then boots slim. + # Keeps photos, push, keychain, links, files and assets that the app or its tests rely on. + subprocess.run([os.environ["SIMSLIM"], "on", simulator, "--except", "photos,store,icloud,web,connectivity,other,mdm"], check=True) subprocess.run(["xcrun", "simctl", "bootstatus", simulator, "-b"], check=True) PY - - name: Sample runner load until the job ends - run: nohup scripts/ci-runner-load.sh > .artifacts/native/runner-load.log 2>&1 & + - name: Build the same-source host Node and browser cryptography + env: + SOURCE_COMMIT: ${{ github.sha }} + CARGO_TARGET_DIR: ${{ github.workspace }}/.artifacts/native/target + run: | + umask 077 + mkdir -p .artifacts/native/private + chmod 700 .artifacts/native .artifacts/native/private + printf '%s\n' host-source > .artifacts/native/private/stage.txt + test "$(git rev-parse HEAD)" = "$SOURCE_COMMIT" + test -z "$(git status --porcelain --untracked-files=normal)" + test "$(uname -m)" = arm64 + printf '%s\n' host-build > .artifacts/native/private/stage.txt + cargo install wasm-bindgen-cli --version 0.2.129 --locked + bash scripts/build-web-crypto.sh + bash scripts/build-web.sh + CARGO_ENCODED_RUSTFLAGS="$(python3 scripts/release-rustflags.py)" cargo build --release -p vibeface -p vibeface-core --locked + .artifacts/native/target/release/vibeface --version + .artifacts/native/target/release/vibeface-core --version - name: Prepare the task simulator's XCTest runner env: AGENT_DEVICE_HOME: ${{ github.workspace }}/.artifacts/native/agent-device diff --git a/packages/docs/ci.md b/packages/docs/ci.md index 09d4a07f6..c460df55e 100644 --- a/packages/docs/ci.md +++ b/packages/docs/ci.md @@ -306,4 +306,4 @@ GitHub 主分支规则不要求 PR 先更新到最新 base,也不将 `ci-gate` 桌面测试使用打包应用自身的 DevTools 页面,核对真实 Electron 版本、窗口隔离、内置包来源、自有 Core、退出和重启。测试预先用包内 CLI 建立不入全网(`--no-mesh`)的独立 Node,随后由真实启动器启动并持有 Core;首次初始化逻辑另由桌面会话测试覆盖。Windows 另外核对真实 SID/DACL、维护通道、Unicode 路径、Provider 子进程回收和当前用户服务。Unix shell、Unix 权限位及 Linux 证明宿主夹具保留在 Unix 测试中;协调器的协议测试在两端使用各自的私有 IPC。所有 Provider 均为受控夹具,不调用真实模型。 -原生移动端构建可使用 `ci.yml` 的 `mobile_apps=ios|android|both`。`both` 让两个系统并行构建,`mobile-gate` 只验收选中的系统。iOS 设备归档验证不等同于模拟器界面或真机安装验收;现有 `mobile.yml` 保留模拟器界面测试。手动移动端验收按运行编号隔离并行,避免新提交取消尚在验证的专用模拟器任务。缺少 iOS 分发身份时,未签名设备归档的收据必须保留不可安装状态。 iOS 模拟器 app 按输入缓存:键包含 runner 镜像版本、rustc 版本和 `apps/mobile`、`packages`、`crates`、lock 文件及 `build-mobile-secure.sh` 的摘要,命中时跳过安全库和 Xcode 构建,仍核对 entitlements。界面测试期间 `scripts/ci-runner-load.sh` 每 10 秒记录负载、空闲与压缩内存、swap 和最忙的进程名,结束时打印到日志,用于区分模拟器慢和宿主资源不足。 +原生移动端构建可使用 `ci.yml` 的 `mobile_apps=ios|android|both`。`both` 让两个系统并行构建,`mobile-gate` 只验收选中的系统。iOS 设备归档验证不等同于模拟器界面或真机安装验收;现有 `mobile.yml` 保留模拟器界面测试。手动移动端验收按运行编号隔离并行,避免新提交取消尚在验证的专用模拟器任务。缺少 iOS 分发身份时,未签名设备归档的收据必须保留不可安装状态。 iOS 模拟器 app 按输入缓存:键包含 runner 镜像版本、rustc 版本和 `apps/mobile`、`packages`、`crates`、lock 文件及 `build-mobile-secure.sh` 的摘要,命中时跳过安全库和 Xcode 构建,仍核对 entitlements。专用模拟器在主机构建前由 simslim v0.14.0 开机并精简:关闭小组件、Spotlight、Siri、健康、家庭、新闻地图、遥测、邮件日历和信息类后台服务,保留相册、推送、钥匙串、链接、互联和资源服务,让首启负载与主机构建重叠;runner 的 Spotlight 索引同时关闭。从模拟器创建起,`scripts/ci-runner-load.sh` 每 10 秒记录负载、空闲与压缩内存、swap 和最忙的进程名,结束时打印到日志,用于区分模拟器慢和宿主资源不足。 From 2136395fdfc1d7e12b4d9463b9f642085f5c192f Mon Sep 17 00:00:00 2001 From: harryisfish Date: Tue, 10 Nov 2026 17:23:45 +0800 Subject: [PATCH 3/6] ci(mobile): keep docs out of the simulator app cache key --- .github/workflows/mobile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index 17eb3460f..3023ab26a 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -99,7 +99,7 @@ jobs: # same inputs, Xcode image and Rust toolchain instead of spending its build again. - name: Key the simulator app by its inputs id: app - run: echo "key=ios-simulator-app-$ImageOS-$ImageVersion-$(rustc -V | shasum -a 256 | cut -c1-16)-${{ hashFiles('apps/mobile/**', 'packages/**', 'crates/**', 'Cargo.toml', 'Cargo.lock', 'pnpm-lock.yaml', 'scripts/build-mobile-secure.sh', '!**/node_modules/**') }}" >> "$GITHUB_OUTPUT" + run: echo "key=ios-simulator-app-$ImageOS-$ImageVersion-$(rustc -V | shasum -a 256 | cut -c1-16)-${{ hashFiles('apps/mobile/**', 'packages/**', '!packages/docs/**', 'crates/**', 'Cargo.toml', 'Cargo.lock', 'pnpm-lock.yaml', 'scripts/build-mobile-secure.sh', '!**/node_modules/**') }}" >> "$GITHUB_OUTPUT" - name: Restore the simulator app built from the same inputs id: app_cache uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 From 86d4bbd95f1bd35091236ab003c0ded3cba99535 Mon Sep 17 00:00:00 2001 From: harryisfish Date: Tue, 10 Nov 2026 17:49:53 +0800 Subject: [PATCH 4/6] ci(mobile): install simslim from its pinned release binary --- .github/workflows/mobile.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index 3023ab26a..f58f90eff 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -142,12 +142,13 @@ jobs: sudo mdutil -a -i off > /dev/null nohup scripts/ci-runner-load.sh > .artifacts/native/runner-load.log 2>&1 & - name: Install simslim - env: - GOTOOLCHAIN: auto - GOBIN: ${{ github.workspace }}/.artifacts/native/simslim run: | - go install github.com/mobai-app/simslim/cmd/simslim@v0.14.0 - echo "SIMSLIM=$GOBIN/simslim" >> "$GITHUB_ENV" + mkdir -p .artifacts/native/simslim + cd .artifacts/native/simslim + curl -fsSLo simslim.tar.gz https://github.com/MobAI-App/simslim/releases/download/v0.14.0/simslim-v0.14.0-macos-arm64.tar.gz + echo "a3db0de6f428f9f8fd5dff256b122f98791c138521dc1330d99643719d8fe9ff simslim.tar.gz" | shasum -a 256 -c + tar -xzf simslim.tar.gz simslim + echo "SIMSLIM=$PWD/simslim" >> "$GITHUB_ENV" - name: Create the dedicated iOS Provider simulator env: SIMSLIM_BOOT_TIMEOUT: 15m From 47a3bdb5448ac009676b1470ba46e7b83a2329bf Mon Sep 17 00:00:00 2001 From: harryisfish Date: Tue, 10 Nov 2026 18:42:10 +0800 Subject: [PATCH 5/6] ci(mobile): key the cached app by every bundled input and cache only clean builds --- .github/workflows/mobile.yml | 8 +++++--- packages/docs/ci.md | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index f58f90eff..ea897d155 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -99,7 +99,7 @@ jobs: # same inputs, Xcode image and Rust toolchain instead of spending its build again. - name: Key the simulator app by its inputs id: app - run: echo "key=ios-simulator-app-$ImageOS-$ImageVersion-$(rustc -V | shasum -a 256 | cut -c1-16)-${{ hashFiles('apps/mobile/**', 'packages/**', '!packages/docs/**', 'crates/**', 'Cargo.toml', 'Cargo.lock', 'pnpm-lock.yaml', 'scripts/build-mobile-secure.sh', '!**/node_modules/**') }}" >> "$GITHUB_OUTPUT" + run: echo "key=ios-simulator-app-$ImageOS-$ImageVersion-$( (rustc -V; node -v) | shasum -a 256 | cut -c1-16)-${{ hashFiles('apps/mobile/**', 'packages/**', '!packages/docs/**', 'crates/**', 'config/**', 'package.json', 'pnpm-workspace.yaml', 'Cargo.toml', 'Cargo.lock', 'pnpm-lock.yaml', 'scripts/build-mobile-secure.sh', '!**/node_modules/**') }}" >> "$GITHUB_OUTPUT" - name: Restore the simulator app built from the same inputs id: app_cache uses: actions/cache/restore@caa296126883cff596d87d8935842f9db880ef25 @@ -117,6 +117,8 @@ jobs: xcodebuild -workspace ios/Vibeface.xcworkspace -scheme Vibeface -configuration Release \ -sdk iphonesimulator -destination 'generic/platform=iOS Simulator' ARCHS=arm64 \ -derivedDataPath ../../.artifacts/native/ios-build CODE_SIGN_IDENTITY=- CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM= build + # Only an app built from the committed sources, including the regenerated bindings, may be cached. + test -z "$(git status --porcelain --untracked-files=normal)" - name: Save the simulator app for the same inputs if: steps.app_cache.outputs.cache-hit != 'true' uses: actions/cache/save@caa296126883cff596d87d8935842f9db880ef25 @@ -139,7 +141,7 @@ jobs: # instead of the UI run. The runner's own Spotlight indexing only adds load. - name: Sample runner load until the job ends run: | - sudo mdutil -a -i off > /dev/null + sudo mdutil -a -i off > /dev/null || true nohup scripts/ci-runner-load.sh > .artifacts/native/runner-load.log 2>&1 & - name: Install simslim run: | @@ -181,7 +183,7 @@ jobs: "VIBEFACE_E2E_CRYPTO_MODULE": str(pathlib.Path("apps/app/dist/client/vibeface_secure.js").resolve())}.items(): output.write(key + "=" + value + "\n") # Boots once, turns off the widget, search and other daemons the app does not use, then boots slim. - # Keeps photos, push, keychain, links, files and assets that the app or its tests rely on. + # Keeps photos, push, keychain, links, connectivity and assets that the app or its tests rely on. subprocess.run([os.environ["SIMSLIM"], "on", simulator, "--except", "photos,store,icloud,web,connectivity,other,mdm"], check=True) subprocess.run(["xcrun", "simctl", "bootstatus", simulator, "-b"], check=True) PY diff --git a/packages/docs/ci.md b/packages/docs/ci.md index c460df55e..f266935a0 100644 --- a/packages/docs/ci.md +++ b/packages/docs/ci.md @@ -306,4 +306,4 @@ GitHub 主分支规则不要求 PR 先更新到最新 base,也不将 `ci-gate` 桌面测试使用打包应用自身的 DevTools 页面,核对真实 Electron 版本、窗口隔离、内置包来源、自有 Core、退出和重启。测试预先用包内 CLI 建立不入全网(`--no-mesh`)的独立 Node,随后由真实启动器启动并持有 Core;首次初始化逻辑另由桌面会话测试覆盖。Windows 另外核对真实 SID/DACL、维护通道、Unicode 路径、Provider 子进程回收和当前用户服务。Unix shell、Unix 权限位及 Linux 证明宿主夹具保留在 Unix 测试中;协调器的协议测试在两端使用各自的私有 IPC。所有 Provider 均为受控夹具,不调用真实模型。 -原生移动端构建可使用 `ci.yml` 的 `mobile_apps=ios|android|both`。`both` 让两个系统并行构建,`mobile-gate` 只验收选中的系统。iOS 设备归档验证不等同于模拟器界面或真机安装验收;现有 `mobile.yml` 保留模拟器界面测试。手动移动端验收按运行编号隔离并行,避免新提交取消尚在验证的专用模拟器任务。缺少 iOS 分发身份时,未签名设备归档的收据必须保留不可安装状态。 iOS 模拟器 app 按输入缓存:键包含 runner 镜像版本、rustc 版本和 `apps/mobile`、`packages`、`crates`、lock 文件及 `build-mobile-secure.sh` 的摘要,命中时跳过安全库和 Xcode 构建,仍核对 entitlements。专用模拟器在主机构建前由 simslim v0.14.0 开机并精简:关闭小组件、Spotlight、Siri、健康、家庭、新闻地图、遥测、邮件日历和信息类后台服务,保留相册、推送、钥匙串、链接、互联和资源服务,让首启负载与主机构建重叠;runner 的 Spotlight 索引同时关闭。从模拟器创建起,`scripts/ci-runner-load.sh` 每 10 秒记录负载、空闲与压缩内存、swap 和最忙的进程名,结束时打印到日志,用于区分模拟器慢和宿主资源不足。 +原生移动端构建可使用 `ci.yml` 的 `mobile_apps=ios|android|both`。`both` 让两个系统并行构建,`mobile-gate` 只验收选中的系统。iOS 设备归档验证不等同于模拟器界面或真机安装验收;现有 `mobile.yml` 保留模拟器界面测试。手动移动端验收按运行编号隔离并行,避免新提交取消尚在验证的专用模拟器任务。缺少 iOS 分发身份时,未签名设备归档的收据必须保留不可安装状态。 iOS 模拟器 app 按输入缓存:键包含 runner 镜像版本、rustc 版本和 `apps/mobile`、`packages`、`crates`、`config`、根 `package.json`、`pnpm-workspace.yaml`、lock 文件及 `build-mobile-secure.sh` 的摘要(不含 `packages/docs`),以及 Node 版本;构建后工作树必须干净才写缓存,命中时跳过安全库和 Xcode 构建,仍核对 entitlements。专用模拟器在主机构建前由 simslim v0.14.0 开机并精简:关闭小组件、Spotlight、Siri、健康、家庭、新闻地图、遥测、邮件日历和信息类后台服务,保留相册、推送、钥匙串、链接、互联和资源服务,让首启负载与主机构建重叠;runner 的 Spotlight 索引同时关闭。从安装 simslim 前起,`scripts/ci-runner-load.sh` 每 10 秒记录负载、空闲与压缩内存、swap 和最忙的进程名,结束时打印到日志,用于区分模拟器慢和宿主资源不足。 From bcb270317d646a9050db4885922dfb42563a6469 Mon Sep 17 00:00:00 2001 From: harryisfish Date: Tue, 10 Nov 2026 19:44:31 +0800 Subject: [PATCH 6/6] ci(mobile): give an uncached iOS build and UI run room within the job limit --- .github/workflows/mobile.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mobile.yml b/.github/workflows/mobile.yml index ea897d155..defe1d6fa 100644 --- a/.github/workflows/mobile.yml +++ b/.github/workflows/mobile.yml @@ -76,7 +76,7 @@ jobs: ios: if: ${{ !inputs.android_only && github.event_name == 'workflow_dispatch' && inputs.platforms != 'android' }} runs-on: macos-26 - timeout-minutes: 60 + timeout-minutes: 90 steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 with: