From ccaac40bd701c56c119b3f412e1a7eed9fa5a317 Mon Sep 17 00:00:00 2001 From: Rintaro Ishizaki Date: Mon, 6 Jul 2026 10:50:07 -0700 Subject: [PATCH] Fix documentation check building every target N times The yq expression used to read documentation targets from .spi.yml wrapped the config in select(.documentation_targets[] != ""). Because the filter inside select() evaluates .documentation_targets[] as a stream of booleans, select() re-emits the config once per target, and the trailing .documentation_targets[] then multiplies the list to N*N entries. For a package with 17 doc targets this expanded to ~272 targets, so check-docs.sh built every target ~17 times and the job hit its 20 minute timeout (appearing to hang / infinite loop). Move the empty-string guard onto each individual target so every target is emitted exactly once. --- .github/workflows/scripts/check-docs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts/check-docs.sh b/.github/workflows/scripts/check-docs.sh index 2555bc35..28a8bce9 100755 --- a/.github/workflows/scripts/check-docs.sh +++ b/.github/workflows/scripts/check-docs.sh @@ -94,7 +94,7 @@ if ! command -v yq &> /dev/null; then fi if [ -z "${docs_targets}" ] ; then - docs_targets=$(yq -r ".builder.configs[] | select(.documentation_targets[] != \"\") | .documentation_targets[]" .spi.yml) + docs_targets=$(yq -r ".builder.configs[].documentation_targets[] | select(. != \"\")" .spi.yml) fi package_files=$(find . -maxdepth 1 -name 'Package*.swift')