forked from MetalPetal/MetalPetal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·83 lines (65 loc) · 2.94 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/bash
set -e
set -u
set -o pipefail
BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
echo "------------------"
echo "Preparing..."
echo "------------------"
echo "Running boilerplate-generator..."
swift run --package-path "$BASEDIR/Utilities" main boilerplate-generator "$BASEDIR"
echo "Running umbrella-header-generator..."
swift run --package-path "$BASEDIR/Utilities" main umbrella-header-generator "$BASEDIR"
echo "Running swift-package-generator..."
swift run --package-path "$BASEDIR/Utilities" main swift-package-generator "$BASEDIR"
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 "Somke Test (tvOS Simulator)"
echo "------------------"
if hash xcpretty 2>/dev/null; then
xcodebuild build -scheme MetalPetal -destination 'platform=tvOS Simulator,name=Apple TV' -workspace . | xcpretty
xcodebuild test -scheme MetalPetal -destination 'platform=tvOS Simulator,name=Apple TV' -workspace . | xcpretty
else
xcodebuild build -scheme MetalPetal -destination 'platform=tvOS Simulator,name=Apple TV' -workspace .
xcodebuild test -scheme MetalPetal -destination 'platform=tvOS Simulator,name=Apple TV' -workspace .
fi
echo "------------------"
echo "Build (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
echo "------------------"
echo "Build (tvOS Device)"
echo "------------------"
if hash xcpretty 2>/dev/null; then
xcodebuild build -scheme MetalPetal -destination generic/platform=tvOS -workspace . | xcpretty
else
xcodebuild build -scheme MetalPetal -destination generic/platform=tvOS -workspace .
fi