From 8bc97b65852adb065070216c4057e294d5bf7940 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Wed, 18 Jun 2025 16:53:32 +0100 Subject: [PATCH] Run Xcode select on the Translations and CalVer workflows. (#4224) * Run Xcode select on the Translations and CalVer workflows. * Use ci_common.sh for xcode-select instead. --- .github/workflows/integration-tests.yml | 4 ---- .github/workflows/ui_tests.yml | 4 ---- .github/workflows/unit_tests.yml | 4 ---- ci_scripts/ci_common.sh | 10 ++++++++++ 4 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 6af94dd83..b84bb7dde 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -17,10 +17,6 @@ jobs: cancel-in-progress: false steps: - # While fastlane has its own way of selecting Xcode, will only work inside fastlane, so we need to set it globally to allow other actions like xcresultparser to use the same Xcode version. - - name: Select Xcode 16.3 - run: sudo xcode-select -s /Applications/Xcode_16.3.app - - uses: actions/checkout@v4 - uses: actions/cache@v4 diff --git a/.github/workflows/ui_tests.yml b/.github/workflows/ui_tests.yml index 10f8e863c..685814bf2 100644 --- a/.github/workflows/ui_tests.yml +++ b/.github/workflows/ui_tests.yml @@ -25,10 +25,6 @@ jobs: cancel-in-progress: true steps: - # While fastlane has its own way of selecting Xcode, will only work inside fastlane, so we need to set it globally to allow other actions like xcresultparser to use the same Xcode version. - - name: Select Xcode 16.3 - run: sudo xcode-select -s /Applications/Xcode_16.3.app - - uses: nschloe/action-cached-lfs-checkout@f46300cd8952454b9f0a21a3d133d4bd5684cfc2 #v1.2.3 - uses: actions/cache@v4 diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index a3c2d1310..36e58f59c 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -19,10 +19,6 @@ jobs: cancel-in-progress: true steps: - # While fastlane has its own way of selecting Xcode, will only work inside fastlane, so we need to set it globally to allow other actions like xcresultparser to use the same Xcode version. - - name: Select Xcode 16.3 - run: sudo xcode-select -s /Applications/Xcode_16.3.app - - uses: nschloe/action-cached-lfs-checkout@f46300cd8952454b9f0a21a3d133d4bd5684cfc2 #v1.2.3 - uses: actions/cache@v4 diff --git a/ci_scripts/ci_common.sh b/ci_scripts/ci_common.sh index aa25691b3..c46758309 100755 --- a/ci_scripts/ci_common.sh +++ b/ci_scripts/ci_common.sh @@ -34,6 +34,8 @@ install_xcode_cloud_brew_dependencies () { } setup_github_actions_environment() { + xcode_select_for_github_actions + unset HOMEBREW_NO_INSTALL_FROM_API export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 @@ -44,6 +46,8 @@ setup_github_actions_environment() { } setup_github_actions_translations_environment() { + xcode_select_for_github_actions + unset HOMEBREW_NO_INSTALL_FROM_API export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 @@ -52,6 +56,12 @@ setup_github_actions_translations_environment() { mint install Asana/locheck } +xcode_select_for_github_actions() { + # While fastlane has its own way of selecting Xcode, that only works inside of fastlane. + # We need to select it globally for other processes like xcresultparser and our custom tools to use the same Xcode version. + sudo xcode-select -s /Applications/Xcode_16.3.app +} + generate_what_to_test_notes() { if [[ -d "$CI_APP_STORE_SIGNED_APP_PATH" ]]; then TESTFLIGHT_DIR_PATH=TestFlight