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