forked from layoutBox/PinLayout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-ci.sh
executable file
·148 lines (128 loc) · 5.86 KB
/
build-ci.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
DERIVED_DATA=${1:-/tmp/PinLayout}
set -e &&
set -o pipefail &&
rm -rf $DERIVED_DATA &&
echo "===============================" &&
echo "PinLayout-iOS" &&
echo "===============================" &&
time xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-iOS \
-derivedDataPath $DERIVED_DATA -sdk iphonesimulator13.0 \
-destination 'platform=iOS Simulator,name=iPhone 8,OS=13.0' \
| xcpretty &&
echo "===============================" &&
echo "PinLayout-tvOS" &&
echo "===============================" &&
time xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-tvOS \
-derivedDataPath $DERIVED_DATA -sdk appletvsimulator13.0 \
-destination 'platform=tvOS Simulator,name=Apple TV 4K,OS=13.0' \
| xcpretty &&
echo "===============================" &&
echo "PinLayout-macOS" &&
echo "===============================" &&
time xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-macOS \
-derivedDataPath $DERIVED_DATA -sdk macosx10.15 \
| xcpretty &&
echo "===============================" &&
echo "PinLayoutSample" &&
echo "===============================" &&
time xcodebuild build -workspace PinLayout.xcworkspace -scheme PinLayoutSample \
-derivedDataPath $DERIVED_DATA -sdk iphonesimulator13.0 \
-destination 'platform=iOS Simulator,name=iPhone 7,OS=11.4' \
| xcpretty &&
echo "===============================" &&
echo "iOS unit test" &&
echo "===============================" &&
time xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-iOS \
-derivedDataPath $DERIVED_DATA -sdk iphonesimulator13.0 \
-destination 'platform=iOS Simulator,name=iPhone 7,OS=11.4' \
| xcpretty &&
time xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-iOS \
-derivedDataPath $DERIVED_DATA -sdk iphonesimulator13.0 \
-destination 'platform=iOS Simulator,name=iPhone 8,OS=12.2' \
| xcpretty &&
time xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-iOS \
-derivedDataPath $DERIVED_DATA -sdk iphonesimulator13.0 \
-destination 'platform=iOS Simulator,name=iPhone 8,OS=13.0' \
| xcpretty &&
# echo "==============================="
# echo "tvOS unit test"
# echo "==============================="
# time xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-tvOS \
# -derivedDataPath $DERIVED_DATA -sdk appletvsimulator13.0 \
# -destination 'platform=tvOS Simulator,name=Apple TV 4K,OS=12.2' \
# | xcpretty
# time xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-tvOS \
# -derivedDataPath $DERIVED_DATA -sdk appletvsimulator13.0 \
# -destination 'platform=tvOS Simulator,name=Apple TV 4K,OS=13.0' \
# | xcpretty
# echo "==============================="
# echo "macOS unit test"
# echo "==============================="
# time xcodebuild clean test -workspace PinLayout.xcworkspace -scheme PinLayout-macOS \
# -derivedDataPath $DERIVED_DATA -sdk macosx10.15 \
# | xcpretty
echo "===============================" &&
echo " Cocoapods: iOS Empty project" &&
echo "===============================" &&
cd TestProjects/cocoapods/ios &&
rm -rf $DERIVED_DATA &&
pod install &&
time xcodebuild clean build -workspace PinLayout-iOS.xcworkspace -scheme PinLayout-iOS \
-sdk iphonesimulator13.0 -derivedDataPath $DERIVED_DATA \
-destination 'platform=iOS Simulator,name=iPhone 8,OS=13.0' \
| xcpretty &&
cd ../../.. &&
echo "===============================" &&
echo " Cocoapods: macOS Empty project" &&
echo "===============================" &&
cd TestProjects/cocoapods/macos &&
rm -rf $DERIVED_DATA &&
pod install &&
time xcodebuild clean build -workspace PinLayout-macOS.xcworkspace -scheme PinLayout-macOS \
-sdk macosx10.15 -derivedDataPath $DERIVED_DATA \
| xcpretty &&
cd ../../.. &&
echo "===============================" &&
echo " Cocoapods: tvOS Empty project" &&
echo "===============================" &&
cd TestProjects/cocoapods/tvos &&
rm -rf $DERIVED_DATA &&
pod install &&
time xcodebuild clean build -workspace PinLayout-tvOS.xcworkspace -scheme PinLayout-tvOS \
-sdk appletvsimulator13.0 -derivedDataPath $DERIVED_DATA \
-destination 'platform=tvOS Simulator,name=Apple TV,OS=13.0' \
| xcpretty &&
cd ../../.. &&
echo "===============================" &&
echo " Carthage: iOS Empty project" &&
echo "===============================" &&
cd TestProjects/carthage/ios &&
rm -rf $DERIVED_DATA &&
rm Cartfile &&
echo "git \"$TRAVIS_BUILD_DIR\" \"$TRAVIS_BRANCH\"" > Cartfile &&
carthage update --use-ssh --platform iOS &&
time xcodebuild clean build -project PinLayout-Carthage-iOS.xcodeproj \
-scheme PinLayout-Carthage-iOS -sdk iphonesimulator13.0 \
-derivedDataPath $DERIVED_DATA \
-destination 'platform=iOS Simulator,name=iPhone 8,OS=13.0' \
| xcpretty &&
cd ../../.. &&
echo "===============================" &&
echo " Pod lib lint" &&
echo "===============================" &&
time bundle exec pod lib lint --allow-warnings
# echo "=========================================="
# echo " Swift Package Manager: iOS Empty project "
# echo "=========================================="
# cd TestProjects/swift-package-manager/ios
# rm -rf $DERIVED_DATA
# rm -rf .build
# rm Package.pins
# swift package show-dependencies --format json
# time xcodebuild clean build -project PinLayout-Carthage-iOS.xcodeproj -scheme PinLayout-Carthage-iOS -sdk iphonesimulator13.0 -derivedDataPath $DERIVED_DATA \
# -destination 'platform=iOS Simulator,name=iPhone 8,OS=13.0' \
# | xcpretty
# cd ../../..
#
# #OTHER_SWIFT_FLAGS='-Xfrontend -debug-time-function-bodies'
# xcodebuild clean test -workspace PinLayout.xcworkspace -scheme PinLayout-macOS -derivedDataPath $DERIVED_DATA -sdk macosx10.15