From 3c3a0728ce47516b332c3bae0d656a91b4325ced Mon Sep 17 00:00:00 2001 From: Ngo Quoc Dat Date: Mon, 19 Oct 2026 06:43:24 +0700 Subject: [PATCH] ci: run macOS Tests when the PluginKit ABI checker changes --- .claude/rules/ci.md | 2 +- scripts/ci/detect-changed-paths.sh | 6 +++--- scripts/ci/test_detect_changed_paths.py | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.claude/rules/ci.md b/.claude/rules/ci.md index 7afaaebb5c..f2aa33e454 100644 --- a/.claude/rules/ci.md +++ b/.claude/rules/ci.md @@ -118,7 +118,7 @@ The required check names are in `AGENTS.md` (CI). Reading a red check: `.claude/ - `detect-changed-paths.sh [--base ] macos|plugins|ios|oracle|hana|release` prints `true` or `false`. An unknown suite or flag exits 2. - A PR passes its base SHA, a push `github.event.before`. No base prints true. The all-zero SHA of a new ref diffs against `git merge-base HEAD origin/main`, so a branch cut from main skips what main already ran; with no merge base it prints true. - `macos` watches the app, test, plugin, package, native, config and libs folders, `TestPlans/`, `project.yml`, the app's `Package.resolved`, the build scripts and CI scripts it runs, the setup actions and its workflow. `Packages/` covers TableProMacCore. -- `plugins` watches `Plugins/`, `Packages/TableProCore/`, `Packages/TableProOracle/`, `Native/`, `Libs/`, `Configs/`, `project.yml`, the app's `Package.resolved`, the project, libs and bridge scripts, `verify-plugin-loads.sh` and the setup actions. +- `plugins` watches `Plugins/`, `Packages/TableProCore/`, `Packages/TableProOracle/`, `Native/`, `Libs/`, `Configs/`, `project.yml`, the app's `Package.resolved`, the project, libs and bridge scripts, `verify-plugin-loads.sh`, `scripts/check-pluginkit-abi.sh` and the setup actions. - `ios` watches `TableProMobile/`, `Libs/`, `Plugins/TableProPluginKit/` (the package target is a symlink to it), and every `../` path it reads out of `TableProMobile/project.yml`. - `oracle` watches `Packages/TableProOracle/`; `hana` watches `Native/HanaBridge/`. Each suite also watches its own workflow. - `release` watches what the Release build reads: the app, plugin, package, native, config and libs folders, `project.yml`, the app's `Package.resolved`, `.github/plugin-registry.json`, the release scripts it runs (`build.sh`, `package.sh`, `registry.py`, `version.py`, `notes.py`), the build and CI scripts it runs and the setup actions. It skips `Plugins/*Tests/` and `Packages/*/Tests/`. diff --git a/scripts/ci/detect-changed-paths.sh b/scripts/ci/detect-changed-paths.sh index 2d7ddec8fa..7a716bbcd2 100755 --- a/scripts/ci/detect-changed-paths.sh +++ b/scripts/ci/detect-changed-paths.sh @@ -24,15 +24,15 @@ case "$SUITE" in 'TablePro\.xcodeproj/project\.xcworkspace/xcshareddata/swiftpm/Package\.resolved$' 'scripts/(generate-project|download-libs|create-openssl-dylibs|build-dameng|build-hana)\.sh$' 'scripts/lib/' 'scripts/ci/(detect-changed-paths|summarize-xcresult|verify-plugin-loads)\.sh$' - 'scripts/release/notes\.py$' '\.github/actions/(setup-xcode(gen)?|prepare-build)/' - '\.github/workflows/macos-tests\.yml$') ;; + 'scripts/check-pluginkit-abi\.sh$' 'scripts/release/notes\.py$' + '\.github/actions/(setup-xcode(gen)?|prepare-build)/' '\.github/workflows/macos-tests\.yml$') ;; plugins) # Registry plugins link the TableProCore and TableProOracle products. PATTERNS=('Plugins/' 'Packages/TableProCore/' 'Packages/TableProOracle/' 'Native/' 'Libs/' 'Configs/' 'project\.yml$' 'TablePro\.xcodeproj/project\.xcworkspace/xcshareddata/swiftpm/Package\.resolved$' 'scripts/(generate-project|download-libs|create-openssl-dylibs|build-dameng|build-hana)\.sh$' - 'scripts/lib/' 'scripts/ci/verify-plugin-loads\.sh$' + 'scripts/lib/' 'scripts/ci/verify-plugin-loads\.sh$' 'scripts/check-pluginkit-abi\.sh$' '\.github/actions/(setup-xcode(gen)?|prepare-build)/' '\.github/workflows/macos-tests\.yml$') ;; ios) # The package's TableProPluginKit target is a symlink, so git reports its changes here. diff --git a/scripts/ci/test_detect_changed_paths.py b/scripts/ci/test_detect_changed_paths.py index 3e1acec325..2023049aee 100644 --- a/scripts/ci/test_detect_changed_paths.py +++ b/scripts/ci/test_detect_changed_paths.py @@ -151,6 +151,9 @@ def test_macos_keeps_its_test_folders_and_ignores_the_release_workflow(self): def test_macos_runs_on_the_build_setup_action(self): self.assertEqual(self.verdict_after("macos", ".github/actions/prepare-build/action.yml"), "true") + def test_macos_runs_on_the_pluginkit_abi_checker(self): + self.assertEqual(self.verdict_after("macos", "scripts/check-pluginkit-abi.sh"), "true") + def test_macos_runs_on_the_notes_script_its_build_phase_reads(self): self.assertEqual(self.verdict_after("macos", "scripts/release/notes.py"), "true") self.assertEqual(self.verdict_after("macos", "scripts/release/feed.py"), "false") @@ -174,6 +177,7 @@ def test_plugins_runs_on_what_the_plugin_build_reads(self): "scripts/build-hana.sh", "scripts/lib/deployment-target.sh", "scripts/ci/verify-plugin-loads.sh", + "scripts/check-pluginkit-abi.sh", ".github/actions/setup-xcode/action.yml", ".github/actions/setup-xcodegen/action.yml", ".github/actions/prepare-build/action.yml",