@@ -17,6 +17,9 @@ outputs:
1717 destination :
1818 description : " The destination associated with the given platform and Xcode version"
1919 value : ${{ steps.get-destination.outputs.destination }}
20+ device :
21+ description : " The device name used in the destination"
22+ value : ${{ steps.get-destination.outputs.device }}
2023 sdk :
2124 description : " The SDK associated with the given platform"
2225 value : ${{ steps.get-sdk.outputs.sdk }}
@@ -38,23 +41,16 @@ runs:
3841
3942 - id : get-xcode-version
4043 run : |
41- LATEST_XCODE_VERSION=14.3.1
42- MINIMUM_XCODE_VERSION_IOS_MAC=14.1.0
43- MINIMUM_XCODE_VERSION_WATCH_TV=14.3.1
44+ LATEST_XCODE_VERSION=15.3.0
45+ MINIMUM_XCODE_VERSION=15.0.1
4446
4547 INPUT_XCODE_VERSION=${{ inputs.xcode_version }}
4648
4749 case $INPUT_XCODE_VERSION in
4850 latest)
4951 XCODE_VERSION=$LATEST_XCODE_VERSION ;;
5052 minimum)
51- INPUT_PLATFORM=${{ inputs.platform }}
52- case $INPUT_PLATFORM in
53- iOS|macOS)
54- XCODE_VERSION=$MINIMUM_XCODE_VERSION_IOS_MAC ;;
55- tvOS|watchOS)
56- XCODE_VERSION=$MINIMUM_XCODE_VERSION_WATCH_TV ;;
57- esac ;;
53+ XCODE_VERSION=$MINIMUM_XCODE_VERSION ;;
5854 *)
5955 XCODE_VERSION=$INPUT_XCODE_VERSION ;;
6056 esac
@@ -68,23 +64,42 @@ runs:
6864 INPUT_DESTINATION='${{ inputs.destination }}'
6965 INPUT_XCODE_VERSION=${{ inputs.xcode_version }}
7066
71- DESTINATION_MAPPING='{
72- "minimum": {
73- "iOS": "platform=iOS Simulator,name=iPhone 14,OS=16.1",
74- "tvOS": "platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=16.1",
75- "watchOS": "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.1",
76- "macOS": "platform=macOS,arch=x86_64"
77- },
78- "latest": {
79- "iOS": "platform=iOS Simulator,name=iPhone 14,OS=16.4",
80- "tvOS": "platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=16.4",
81- "watchOS": "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.4",
82- "macOS": "platform=macOS,arch=x86_64"
83- }
84- }'
67+ case $INPUT_PLATFORM/$INPUT_XCODE_VERSION in
68+ iOS/latest)
69+ DEVICE="iPhone 15"
70+ OS_VERSION="17.4"
71+ ;;
72+ iOS/*)
73+ DEVICE="iPhone 14"
74+ OS_VERSION="17.0.1"
75+ ;;
76+ tvOS/latest)
77+ DEVICE="Apple TV 4K (3rd generation)"
78+ OS_VERSION="17.4"
79+ ;;
80+ tvOS/*)
81+ DEVICE="Apple TV 4K (3rd generation)"
82+ OS_VERSION="17.0"
83+ ;;
84+ watchOS/latest)
85+ DEVICE="Apple Watch Series 9 (45mm)"
86+ OS_VERSION="10.4"
87+ ;;
88+ watchOS/*)
89+ DEVICE="Apple Watch Series 8 (45mm)"
90+ OS_VERSION="10.0"
91+ ;;
92+ esac
93+
94+ DESTINATION_MAPPING="{
95+ \"iOS\": \"platform=iOS Simulator,name=$DEVICE,OS=$OS_VERSION\",
96+ \"tvOS\": \"platform=tvOS Simulator,name=$DEVICE,OS=$OS_VERSION\",
97+ \"watchOS\": \"platform=watchOS Simulator,name=$DEVICE,OS=$OS_VERSION\",
98+ \"macOS\": \"platform=macOS,arch=arm64\"
99+ }"
85100
86101 if [ -z "$INPUT_DESTINATION" ]; then
87- DESTINATION=$(echo $DESTINATION_MAPPING | jq -r ".\"$INPUT_XCODE_VERSION\". $INPUT_PLATFORM")
102+ DESTINATION=$(echo $DESTINATION_MAPPING | jq -r ".$INPUT_PLATFORM")
88103 else
89104 DESTINATION=$INPUT_DESTINATION
90105 fi
94109 exit 1
95110 fi
96111 echo "destination=$DESTINATION" >> $GITHUB_OUTPUT
112+ echo "device=$DEVICE" >> $GITHUB_OUTPUT
97113 shell : bash
98114
99115 - id : get-sdk
0 commit comments