forked from layoutBox/PinLayout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-ci.sh
executable file
·106 lines (86 loc) · 4.08 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
DERIVED_DATA=${1:-/tmp/PinLayout}
set -o pipefail &&
rm -rf $DERIVED_DATA &&
echo "===============================" &&
echo "fastlane iOS travis" &&
echo "===============================" &&
time bundle exec fastlane ios travis &&
# echo "===============================" &&
# echo "fastlane macOS travis" &&
# echo "===============================" &&
time bundle exec fastlane mac travis &&
echo "===============================" &&
echo "iOS unit test" &&
echo "===============================" &&
time xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-iOS -derivedDataPath $DERIVED_DATA -sdk iphonesimulator11.4 \
-destination 'platform=iOS Simulator,name=iPhone 6,OS=9.3' \
-destination 'platform=iOS Simulator,name=iPhone 7,OS=10.2' \
-destination 'platform=iOS Simulator,name=iPhone 8,OS=11.4' \
| xcpretty &&
echo "===============================" &&
echo "tvOS unit test" &&
echo "===============================" &&
time xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-tvOS -derivedDataPath $DERIVED_DATA -sdk appletvsimulator11.4 \
-destination 'platform=tvOS Simulator,name=Apple TV 4K,OS=11.4' \
| xcpretty &&
echo "===============================" &&
echo "macOS unit test" &&
echo "===============================" &&
time xcodebuild clean test -workspace PinLayout.xcworkspace -scheme PinLayout-macOS -derivedDataPath $DERIVED_DATA -sdk macosx10.13 \
| 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 iphonesimulator11.4 -derivedDataPath $DERIVED_DATA \
-destination 'platform=iOS Simulator,name=iPhone 8,OS=11.4' \
| 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.13 -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 appletvsimulator11.4 -derivedDataPath $DERIVED_DATA \
-destination 'platform=tvOS Simulator,name=Apple TV,OS=11.4' \
| 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 iphonesimulator11.4 -derivedDataPath $DERIVED_DATA \
-destination 'platform=iOS Simulator,name=iPhone 7,OS=11.4' \
| xcpretty &&
cd ../../.. &&
# 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 iphonesimulator11.4 -derivedDataPath $DERIVED_DATA \
# -destination 'platform=iOS Simulator,name=iPhone 7,OS=11.4' \
# | xcpretty &&
# cd ../../..
#
# #OTHER_SWIFT_FLAGS='-Xfrontend -debug-time-function-bodies'
# xcodebuild clean test -workspace PinLayout.xcworkspace -scheme PinLayout-macOS -derivedDataPath $DERIVED_DATA -sdk macosx10.13 &&