forked from LinkedInAttic/LayoutKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
69 lines (61 loc) · 2.36 KB
/
build.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
#!/bin/sh
# Builds all targets and runs tests.
DERIVED_DATA=${1:-/tmp/LayoutKit}
echo "Derived data location: $DERIVED_DATA";
#-destination 'platform=iOS Simulator,name=iPhone 6,OS=8.4' \
#-destination 'platform=iOS Simulator,name=iPhone 6 Plus,OS=8.4' \
set -o pipefail &&
rm -rf $DERIVED_DATA &&
# Run test on MacOS
time xcodebuild clean test \
-project LayoutKit.xcodeproj \
-scheme LayoutKit-macOS \
-sdk macosx10.12 \
-derivedDataPath $DERIVED_DATA \
OTHER_SWIFT_FLAGS='-Xfrontend -debug-time-function-bodies' \
| tee build.log \
| xcpretty &&
cat build.log | sh debug-time-function-bodies.sh &&
rm -rf $DERIVED_DATA &&
# Run test on tvOS
time xcodebuild clean test \
-project LayoutKit.xcodeproj \
-scheme LayoutKit-tvOS \
-sdk appletvsimulator10.2 \
-derivedDataPath $DERIVED_DATA \
-destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=9.2' \
-destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.2' \
OTHER_SWIFT_FLAGS='-Xfrontend -debug-time-function-bodies' \
| tee build.log \
| xcpretty &&
cat build.log | sh debug-time-function-bodies.sh &&
rm -rf $DERIVED_DATA &&
# Build sample app
time xcodebuild clean build \
-project LayoutKit.xcodeproj \
-scheme LayoutKitSampleApp \
-sdk iphonesimulator10.3 \
-derivedDataPath $DERIVED_DATA \
-destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3' \
-destination 'platform=iOS Simulator,name=iPhone 6 Plus,OS=9.3' \
-destination 'platform=iOS Simulator,name=iPhone 7,OS=10.3' \
-destination 'platform=iOS Simulator,name=iPhone 7 Plus,OS=10.3' \
OTHER_SWIFT_FLAGS='-Xfrontend -debug-time-function-bodies' \
| tee build.log \
| xcpretty &&
cat build.log | sh debug-time-function-bodies.sh &&
rm -rf $DERIVED_DATA &&
# Run test on iOS
time xcodebuild clean test \
-project LayoutKit.xcodeproj \
-scheme LayoutKit-iOS \
-sdk iphonesimulator10.3 \
-derivedDataPath $DERIVED_DATA \
-destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3' \
-destination 'platform=iOS Simulator,name=iPhone 6 Plus,OS=9.3' \
-destination 'platform=iOS Simulator,name=iPhone 7,OS=10.3' \
-destination 'platform=iOS Simulator,name=iPhone 7 Plus,OS=10.3' \
OTHER_SWIFT_FLAGS='-Xfrontend -debug-time-function-bodies' \
| tee build.log \
| xcpretty &&
cat build.log | sh debug-time-function-bodies.sh