forked from MetalPetal/MetalPetal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·46 lines (37 loc) · 1.56 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
set -e
set -u
set -o pipefail
echo "------------------"
echo "Somke Test (macOS)"
echo "------------------"
swift build
swift test
echo "------------------"
echo "Somke Test (iOS Simulator)"
echo "------------------"
if hash xcpretty 2>/dev/null; then
xcodebuild build -scheme MetalPetal -destination 'platform=iOS Simulator,name=iPhone 11' -workspace . | xcpretty
xcodebuild test -scheme MetalPetal -destination 'platform=iOS Simulator,name=iPhone 11' -workspace . | xcpretty
else
xcodebuild build -scheme MetalPetal -destination 'platform=iOS Simulator,name=iPhone 11' -workspace .
xcodebuild test -scheme MetalPetal -destination 'platform=iOS Simulator,name=iPhone 11' -workspace .
fi
echo "------------------"
echo "Somke Test (macCatalyst)"
echo "------------------"
if hash xcpretty 2>/dev/null; then
xcodebuild build -scheme MetalPetal -destination 'platform=macOS,variant=Mac Catalyst' -workspace . | xcpretty
xcodebuild test -scheme MetalPetal -destination 'platform=macOS,variant=Mac Catalyst' -workspace . | xcpretty
else
xcodebuild build -scheme MetalPetal -destination 'platform=macOS,variant=Mac Catalyst' -workspace .
xcodebuild test -scheme MetalPetal -destination 'platform=macOS,variant=Mac Catalyst' -workspace .
fi
echo "------------------"
echo "Build (Generic iOS Device)"
echo "------------------"
if hash xcpretty 2>/dev/null; then
xcodebuild build -scheme MetalPetal -destination generic/platform=iOS -workspace . | xcpretty
else
xcodebuild build -scheme MetalPetal -destination generic/platform=iOS -workspace .
fi