Skip to content

Commit 619a886

Browse files
Changing to manual build and updating build steps to include xcode build inline
1 parent 7119966 commit 619a886

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/codeql.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,29 @@ jobs:
243243
shell: bash
244244
run: |
245245
yarn add @iterable/react-native-sdk
246-
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
247-
echo "${{ env.TURBO_CACHE_DIR }}"
246+
247+
echo "Detecting latest available iOS version..."
248+
249+
# First try to find iOS 18.x that's available
250+
LATEST_IOS=$(xcrun simctl list runtimes | grep "iOS 18" | grep -v "watchOS" | grep -v "beta" | grep -v "Beta" | grep -v "unavailable" | tail -1 | sed 's/.*iOS \([0-9]*\.[0-9]*\).*/\1/')
251+
# If no iOS 18.x available, fall back to any available iOS version
252+
if [ -z "$LATEST_IOS" ]; then
253+
echo "No iOS 18.x available, falling back to latest available iOS version..."
254+
LATEST_IOS=$(xcrun simctl list runtimes | grep "iOS" | grep -v "watchOS" | grep -v "beta" | grep -v "Beta" | grep -v "unavailable" | tail -1 | sed 's/.*iOS \([0-9]*\.[0-9]*\).*/\1/')
255+
fi
256+
257+
echo "Using iOS version $LATEST_IOS"
258+
259+
xcodebuild \
260+
-project ReactNativeSdkExample.xcodeproj \
261+
-scheme example \
262+
-sdk iphonesimulator \
263+
-destination "platform=iOS Simulator,OS=$LATEST_IOS,name=iPhone 16 Pro" \
264+
-resultsBundlePath TestResults.xcresult \
265+
test | xcpretty
266+
267+
# yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
268+
# echo "${{ env.TURBO_CACHE_DIR }}"
248269

249270
# echo 'If you are using a "manual" build mode for one or more of the' \
250271
# 'languages you are analyzing, replace this with the commands to build' \

0 commit comments

Comments
 (0)