forked from LinkedInAttic/LayoutKit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
64 lines (60 loc) · 2.47 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
#!/bin/sh
# Builds all targets and runs tests.
DERIVED_DATA=${1:-/tmp/LayoutKit}
echo "Derived data location: $DERIVED_DATA";
# TODO: enable tvOS 10.0 tests. These tests work locally but codesign fails on travis.
# https://github.com/linkedin/LayoutKit/issues/51
#-destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=10.0' \
# Looks like iOS 8 simulator doesn't work in Xcode 8.
# -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 &&
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 &&
time xcodebuild clean test \
-project LayoutKit.xcodeproj \
-scheme LayoutKit-tvOS \
-sdk appletvsimulator10.0 \
-derivedDataPath $DERIVED_DATA \
-destination 'platform=tvOS Simulator,name=Apple TV 1080p,OS=9.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 &&
time xcodebuild clean build \
-project LayoutKit.xcodeproj \
-scheme LayoutKitSampleApp \
-sdk iphonesimulator10.0 \
-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 6,OS=10.0' \
-destination 'platform=iOS Simulator,name=iPhone 6 Plus,OS=10.0' \
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 &&
time xcodebuild clean test \
-project LayoutKit.xcodeproj \
-scheme LayoutKit-iOS \
-sdk iphonesimulator10.0 \
-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 6,OS=10.0' \
-destination 'platform=iOS Simulator,name=iPhone 6 Plus,OS=10.0' \
OTHER_SWIFT_FLAGS='-Xfrontend -debug-time-function-bodies' \
| tee build.log \
| xcpretty &&
cat build.log | sh debug-time-function-bodies.sh