Skip to content

Commit 9c81f84

Browse files
committed
add build yaml device log
1 parent a3c556f commit 9c81f84

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/ios.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ jobs:
4747
# xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959)
4848
device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"`
4949
echo "Selected device: $device"
50+
os=$(xcrun simctl list devices | grep "$device (" | grep -oE 'iOS [0-9.]+' | sort -V | tail -1 | cut -d" " -f2)
51+
echo "Selected OS: $os"
5052
if [ $scheme = default ]; then scheme=$(cat default); fi
5153
if [ "`ls -A | grep -i \\.xcworkspace\$`" ]; then filetype_parameter="workspace" && file_to_build="`ls -A | grep -i \\.xcworkspace\$`"; else filetype_parameter="project" && file_to_build="`ls -A | grep -i \\.xcodeproj\$`"; fi
5254
file_to_build=`echo $file_to_build | awk '{$1=$1;print}'`
53-
xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device"
55+
xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=$platform,name=$device,OS=$os"

0 commit comments

Comments
 (0)