From 2ced4332804e72ffc895b656a76de352bc771632 Mon Sep 17 00:00:00 2001 From: Bruno Cunha Date: Thu, 14 Nov 2024 16:33:53 +0000 Subject: [PATCH] Updating version of Xcode --- .github/workflows/_build.yml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml index 3b9f649e3..dfde6d69e 100644 --- a/.github/workflows/_build.yml +++ b/.github/workflows/_build.yml @@ -70,8 +70,15 @@ jobs: run: bundle exec pod install working-directory: Example - - name: Select Xcode 16 - run: sudo xcode-select --switch /Applications/Xcode_16.app + - name: Select Xcode 16 if available, otherwise use default + run: | + if [ -d "/Applications/Xcode_16.app" ]; then + sudo xcode-select --switch /Applications/Xcode_16.app + else + ls /Applications | grep Xcode + echo "Xcode 16 not found, using default Xcode version" + sudo xcode-select --switch /Applications/Xcode.app + fi - name: Install clang-format run: brew install clang-format @@ -124,8 +131,15 @@ jobs: run: bundle exec pod install working-directory: Example - - name: Select Xcode 16 - run: sudo xcode-select --switch /Applications/Xcode_16.app + - name: Select Xcode 16 if available, otherwise use default + run: | + if [ -d "/Applications/Xcode_16.app" ]; then + sudo xcode-select --switch /Applications/Xcode_16.app + else + ls /Applications | grep Xcode + echo "Xcode 16 not found, using default Xcode version" + sudo xcode-select --switch /Applications/Xcode.app + fi - name: Analyze run: ./scripts/ci ${{ matrix.schemes }} analysis