Skip to content

Control a real USB-connected iPhone from Linux (no Mac, no paid developer account) and expose it to AI agents as MCP tools

ci: the macOS PTY run is its own job, not a required check (#132)

Qinghe Li46fbb4184211
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b526807..8c23c87 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -73,6 +73,23 @@ jobs:
# --all-features:默认不编的 debug-cmds(调试子命令)也要能编译
- run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
- run: cargo test --workspace --all-features --locked
+
+ # macOS 上的终端菜单 PTY 回归。不在规则集的必过检查里:它靠两个进程之间的时间差模拟按键,
+ # 忙的 macOS runner 上调度一卡就会误报(Linux 上同一个脚本在上面的 rust 里,仍是卡点)。
+ # 结果照样显示在 PR 上,失败时看日志判断是不是真问题
+ macos-terminal:
+ needs: [changes]
+ if: ${{ !cancelled() && (github.event_name != 'pull_request' || needs.changes.outputs.code == 'true') }}
+ runs-on: macos-latest
+ steps:
+ - uses: actions/checkout@v7
+ - uses: dtolnay/[email protected]
+ - uses: Swatinem/rust-cache@v2
+ with:
+ key: terminal
+ # 只要 iphone-control 和它的测试程序(pty_menu 在里面)
+ - run: cargo build -p iphone-control --all-features --locked
+ - run: cargo test -p iphone-control --all-features --locked --no-run
- name: Terminal menus (PTY)
run: python3 tests/terminal.py --binary target/debug/iphone-control --test-dir target/debug/deps
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 9515902..0c7533f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -131,7 +131,7 @@ Part 2 checks that a change doesn't break what already works; this part shows th
- Keep them focused; describe what changed and why.
- The tests above pass and are reported in the template ([Required tests](#required-tests)). Bug fixes and features without real-device results are not merged.
-- CI must pass: format, clippy with `-D warnings`, tests (on Linux and macOS), the MSRV check, gitleaks and the package checks (`.deb`, `install.sh`, the Homebrew formula).
+- CI must pass: format, clippy with `-D warnings`, tests (on Linux and macOS), the MSRV check, gitleaks and the package checks (`.deb`, `install.sh`, the Homebrew formula). The terminal-menu PTY test is required on Linux; its macOS run (`macos-terminal`) is reported but not required, since busy macOS runners make its timing unreliable. If it fails, check whether the failure is real.
- User-visible changes get a line in [CHANGELOG.md](CHANGELOG.md) and [CHANGELOG.zh-CN.md](CHANGELOG.zh-CN.md) under *Unreleased* (a Chinese line is welcome but optional for outside contributors; maintainers add it before release). See [Changelog entries](#changelog-entries).
### Changelog entries