From bfd9fe85bd09b20d475be9beb42d042dc19b2f57 Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Wed, 6 Aug 2025 11:07:16 +0800 Subject: [PATCH 1/3] maint(ios): skip unnecessary network steps when buildLevel is build Skips codesigning and upload to TestFlight in this case. Fixes: #14286 --- ios/engine/build.sh | 2 +- resources/teamcity/ios/keyman-ios-test.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/engine/build.sh b/ios/engine/build.sh index fd473a2cdf..07ff68c8a2 100755 --- a/ios/engine/build.sh +++ b/ios/engine/build.sh @@ -50,7 +50,7 @@ XCODEFLAGS="-quiet -configuration $CONFIG" XCODEFLAGS_EXT="$XCODEFLAGS -derivedDataPath \"$DERIVED_DATA\" -workspace ../keymanios.xcworkspace" CODE_SIGN= -if builder_is_debug_build; then +if builder_is_debug_build || ( builder_is_ci_build && ! builder_is_ci_build_level_release ); then CODE_SIGN="CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO ${DEV_TEAM:-} CODE_SIGN_ENTITLEMENTS= CODE_SIGNING_ALLOWED=NO" fi diff --git a/resources/teamcity/ios/keyman-ios-test.sh b/resources/teamcity/ios/keyman-ios-test.sh index 9f918b8d8f..d3d97e3ba7 100755 --- a/resources/teamcity/ios/keyman-ios-test.sh +++ b/resources/teamcity/ios/keyman-ios-test.sh @@ -103,8 +103,8 @@ function _upload_to_testflight_pr_area_fv() { function do_build() { ios_build ios_capture_build_artifacts - _upload_to_testflight_pr_area - _upload_to_testflight_pr_area_fv + builder_if_release_build_level _upload_to_testflight_pr_area + builder_if_release_build_level _upload_to_testflight_pr_area_fv } ba_mac_unlock_keychain From eba4977cf90d5e538e3e41dc931a6ca902c2b0bb Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Sat, 9 Aug 2025 04:49:13 +0200 Subject: [PATCH 2/3] maint(ios): remove unnecessary PR number check The check for PR number vs base branch is no longer necessary, as this is controlled by buildLevel instead. Removing it. Note that the `--pr-number` parameter is no longer required in keyman-ios-test.sh. See comment inline. --- resources/teamcity/ios/keyman-ios-test.sh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/resources/teamcity/ios/keyman-ios-test.sh b/resources/teamcity/ios/keyman-ios-test.sh index d3d97e3ba7..077de1b2c1 100755 --- a/resources/teamcity/ios/keyman-ios-test.sh +++ b/resources/teamcity/ios/keyman-ios-test.sh @@ -70,12 +70,6 @@ function __do_upload_to_testflight() { } function _upload_to_testflight_pr_area() { - # shellcheck disable=SC2154 - if ! [[ "${PR_NUMBER}" =~ ^[0-9]+$ ]]; then - builder_echo "Ignoring TestFlight upload for non-PR build" - return - fi - builder_echo start "upload to testflight" "Uploading build to TestFlight (PR area)" # shellcheck disable=SC2154 __do_upload_to_testflight "${SIL_ITC_PROVIDER}" "${SIL_API_KEY_ID}" "${SIL_ITC_TEAM_ID}" keyman @@ -83,12 +77,6 @@ function _upload_to_testflight_pr_area() { } function _upload_to_testflight_pr_area_fv() { - # shellcheck disable=SC2154 - if ! [[ "${PR_NUMBER}" =~ ^[0-9]+$ ]]; then - builder_echo "Ignoring TestFlight upload for non-PR build" - return - fi - if ! builder_has_option --fv; then builder_echo "Skipping FirstVoices upload to TestFlight as --fv option is not set" return From 75f0d657bbee330d7637385f2694703e6e4e765a Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Sun, 10 Aug 2025 05:03:01 +0200 Subject: [PATCH 3/3] maint(ios): add todo on --pr-number Build-bot: skip --- resources/teamcity/ios/keyman-ios-test.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/resources/teamcity/ios/keyman-ios-test.sh b/resources/teamcity/ios/keyman-ios-test.sh index 077de1b2c1..a8752391d8 100755 --- a/resources/teamcity/ios/keyman-ios-test.sh +++ b/resources/teamcity/ios/keyman-ios-test.sh @@ -21,6 +21,13 @@ THIS_SCRIPT="$(readlink -f "${BASH_SOURCE[0]}")" ################################ Main script ################################ +# TODO: remove unused `--pr-number` option. Unfortunately, the mechanism we +# designed to skip this, `--builder-ignore-unknown-options`, does not work for +# options with values. We need another one, for example, something like +# `--builder-ignore-unknown-value-options=pr-number[,...]`, so for now I will +# leave it alone. The option ultimately needs to be removed from the TC build +# configuration also. (Unused as of #14466) + builder_describe \ "Build KeymanEngine and Keyman for iOS" \ "all run all actions" \