We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0980ef0 commit 3ec17ecCopy full SHA for 3ec17ec
1 file changed
.github/scripts/tests.sh
@@ -1,9 +1,8 @@
1
#!/bin/bash
2
3
ARCH=""
4
-
5
-if [ $1 = "arm" ]
6
-then
+
+if [ "$1" = "arm" ]; then
7
ARCH="arm64"
8
else
9
ARCH="x86_64"
@@ -13,9 +12,18 @@ echo "Building with arch: ${ARCH}"
13
12
14
export LC_CTYPE=en_US.UTF-8
15
+DEVICE_ID=$(xcrun xctrace list devices 2>/dev/null | grep -m1 "My Mac" | grep "${ARCH}" | awk -F '[()]' '{print $2}')
16
17
+if [ -z "$DEVICE_ID" ]; then
18
+ echo "Failed to find device ID for arch ${ARCH}"
19
+ exit 1
20
+fi
21
22
+echo "Using device ID: $DEVICE_ID"
23
24
set -o pipefail && arch -"${ARCH}" xcodebuild \
25
-scheme CodeEditSourceEditor \
26
-derivedDataPath ".build" \
- -destination "platform=macos,arch=${ARCH},name=My Mac" \
27
+ -destination "id=${DEVICE_ID}" \
28
-skipPackagePluginValidation \
29
clean test | xcpretty
0 commit comments