Skip to content

Commit 901a86e

Browse files
committed
ci(harmony-build): type-check against the OpenHarmony SDK, not the HMS tree
The discovery matched sdk/default/hms/ets first; @ohos.* and @Kit.* declarations live under sdk/default/openharmony/ets. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EsHKy4wWXVtHrQLr2mKfpF
1 parent d76c092 commit 901a86e

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

‎.github/workflows/harmony-build.yml‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,11 @@ jobs:
8989
if [ -z "$ets_dir" ]; then
9090
for root in "${DEVECO_SDK_HOME:-}" /opt /usr/local /usr/lib /root /home /github/home; do
9191
[ -n "$root" ] && [ -d "$root" ] || continue
92-
api_dir="$(find "$root" -maxdepth 8 -type d -path '*/ets/api' -name api 2>/dev/null \
93-
| grep -E '/openharmony/ets/api$|/ets/api$' | head -n 1)"
92+
# The @ohos.*/@kit.* declarations live under the OpenHarmony SDK
93+
# (sdk/<ver>/openharmony/ets); the sibling hms/ets tree only
94+
# holds HMS kits and must not win.
95+
api_dir="$(find "$root" -maxdepth 8 -type d -path '*/openharmony/ets/api' 2>/dev/null \
96+
| sort | head -n 1)"
9497
if [ -n "$api_dir" ]; then
9598
ets_dir="$(dirname "$api_dir")"
9699
break

0 commit comments

Comments
 (0)