Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Select Xcode and Simulator version based available version #1659

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@

set -euo pipefail

if [ -d "/Applications/Xcode_16.1.app" ]; then
xcode_version="16.1"
iphone_version="16"
else
xcode_version="15.3"
iphone_version="15"
fi

# Set default parameters
if [[ -z "${SPM:-}" ]]; then
SPM=false
Expand All @@ -31,7 +39,7 @@ if [[ -z "${SPM:-}" ]]; then
fi
if [[ -z "${OS:-}" ]]; then
OS=iOS
DEVICE="iPhone 16"
DEVICE="iPhone ${iphone_version}"
echo "Defaulting to OS=$OS"
echo "Defaulting to DEVICE=$DEVICE"
fi
Expand Down Expand Up @@ -123,6 +131,6 @@ function xcb() {
}

# Run xcodebuild
sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer
sudo xcode-select -s "/Applications/Xcode_${xcode_version}.app/Contents/Developer"
xcb "${flags[@]}"
echo "$message"
Loading