1
1
name : Run CI
2
2
on : [push, pull_request]
3
3
4
+ env :
5
+ XCODE_VERSION : " 16.4.0"
6
+ IOS_SIMULATOR_DEVICE : " iPhone 16"
7
+ IOS_SIMULATOR_OS : " 18.4"
8
+ TVOS_SIMULATOR_DEVICE : " Apple TV 4K (3rd generation)"
9
+ TVOS_SIMULATOR_OS : " 18.4"
10
+
4
11
jobs :
5
12
CI :
6
- runs-on : macos-latest
7
-
13
+ runs-on : macos-15
14
+
8
15
# ℹ️ Available GitHub Actions Runner Images
9
16
# https://github.com/actions/runner-images
10
17
11
18
steps :
12
19
- name : Checkout
13
- uses : actions/checkout@v2
20
+ uses : actions/checkout@v4
14
21
15
- - run : bundle install
16
- - run : pod install --repo-update
22
+ - name : Setup CocoaPods
23
+ run : pod install --repo-update
17
24
18
- - name : Set Xcode Version 14.2.0 (iOS 16.2)
19
- run : sudo xcode-select -s /Applications/Xcode_14.2.0 .app
25
+ - name : Set Xcode Version
26
+ run : sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }} .app
20
27
21
28
- name : Build PinLayout-iOS
22
- run : set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-iOS -sdk iphonesimulator16.2 -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=16.2' | xcpretty
29
+ run : |
30
+ set -o pipefail && xcodebuild build \
31
+ -project PinLayout.xcodeproj \
32
+ -scheme PinLayout-iOS \
33
+ -sdk iphonesimulator \
34
+ -destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR_DEVICE }},OS=${{ env.IOS_SIMULATOR_OS }}" \
35
+ | xcpretty
23
36
24
37
- name : Build PinLayout-tvOS
25
- run : set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-tvOS -sdk appletvsimulator16.1 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=16.1' | xcpretty
38
+ run : |
39
+ set -o pipefail && xcodebuild build \
40
+ -project PinLayout.xcodeproj \
41
+ -scheme PinLayout-tvOS \
42
+ -sdk appletvsimulator \
43
+ -destination "platform=tvOS Simulator,name=${{ env.TVOS_SIMULATOR_DEVICE }},OS=${{ env.TVOS_SIMULATOR_OS }}" \
44
+ | xcpretty
26
45
27
46
- name : Build PinLayout-macOS
28
- run : set -o pipefail && xcodebuild build -project PinLayout.xcodeproj -scheme PinLayout-macOS -sdk macosx13.1 | xcpretty
29
-
30
- - name : Build PinLayoutSample - iOS 16.2
31
- run : set -o pipefail && xcodebuild build -workspace PinLayout.xcworkspace -scheme PinLayoutSample -sdk iphonesimulator16.2 -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=16.2' | xcpretty
32
-
33
- - name : iOS unit tests
34
- run : set -o pipefail && xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-iOS -sdk iphonesimulator16.2 -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=16.2' | xcpretty
35
-
36
- # # - name: tvOS unit tests
37
- # # run: set -o pipefail && xcodebuild build test -workspace PinLayout.xcworkspace -scheme PinLayout-tvOS -sdk appletvos16.1 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=16.2' | xcpretty
38
-
39
- # # - name: macOS unit tests
40
- # # run: set -o pipefail && xcodebuild test -workspace PinLayout.xcworkspace -scheme PinLayout-macOS -sdk macosx12.1 -destination 'platform=macOS,name=Any Mac' | xcpretty
41
-
42
- - name : Cocoapods - iOS Empty project
43
- run : set -o pipefail && cd TestProjects/cocoapods/ios && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-iOS.xcworkspace -scheme PinLayout-iOS -sdk iphonesimulator16.2 -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=16.2' | xcpretty && cd ../../..
44
-
45
- # - name: Cocoapods - macOS Empty project
46
- # run: set -o pipefail && cd TestProjects/cocoapods/macos && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-macOS.xcworkspace -scheme PinLayout-macOS -sdk macosx12.1 | xcpretty && cd ../../..
47
-
48
- # - name: Cocoapods - tvOS Empty project
49
- # run: set -o pipefail && cd TestProjects/cocoapods/tvos && arch -x86_64 pod install && xcodebuild build -workspace PinLayout-tvOS.xcworkspace -scheme PinLayout-tvOS -sdk appletvsimulator16.1 -destination 'platform=tvOS Simulator,name=Apple TV 4K (2nd generation),OS=16.1' | xcpretty && cd ../../..
50
-
51
- # - name: Carthage - iOS Empty project
52
- # run: set -o pipefail && cd TestProjects/carthage/ios && rm Cartfile && echo "git \"file:///$BASEDIR\"" > Cartfile && carthage update --use-ssh --platform iOS --use-xcframeworks && xcodebuild build -project PinLayout-Carthage-iOS.xcodeproj -scheme PinLayout-Carthage-iOS -sdk iphonesimulator16.2 -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=16.2' | xcpretty && rm Cartfile.resolved && cd ../../..
47
+ run : |
48
+ set -o pipefail && xcodebuild build \
49
+ -project PinLayout.xcodeproj \
50
+ -scheme PinLayout-macOS \
51
+ -sdk macosx \
52
+ | xcpretty
53
+
54
+ - name : Build PinLayoutSample
55
+ run : |
56
+ set -o pipefail && xcodebuild build \
57
+ -workspace PinLayout.xcworkspace \
58
+ -scheme PinLayoutSample \
59
+ -sdk iphonesimulator \
60
+ -destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR_DEVICE }},OS=${{ env.IOS_SIMULATOR_OS }}" \
61
+ | xcpretty
62
+
63
+ - name : iOS Unit Tests
64
+ run : |
65
+ set -o pipefail && xcodebuild build test \
66
+ -workspace PinLayout.xcworkspace \
67
+ -scheme PinLayout-iOS \
68
+ -sdk iphonesimulator \
69
+ -destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR_DEVICE }},OS=${{ env.IOS_SIMULATOR_OS }}" \
70
+ | xcpretty
71
+
72
+ # - name: tvOS Unit Tests
73
+ # run: |
74
+ # set -o pipefail && xcodebuild build test \
75
+ # -workspace PinLayout.xcworkspace \
76
+ # -scheme PinLayout-tvOS \
77
+ # -sdk appletvsimulator \
78
+ # -destination "platform=tvOS Simulator,name=${{ env.TVOS_SIMULATOR_DEVICE }},OS=${{ env.TVOS_SIMULATOR_OS }}" \
79
+ # | xcpretty
80
+
81
+ # - name: macOS Unit Tests
82
+ # run: |
83
+ # set -o pipefail && xcodebuild test \
84
+ # -workspace PinLayout.xcworkspace \
85
+ # -scheme PinLayout-macOS \
86
+ # -sdk macosx \
87
+ # -destination "platform=macOS,name=Any Mac" \
88
+ # | xcpretty
89
+
90
+ - name : Test CocoaPods Integration
91
+ run : |
92
+ echo "Testing CocoaPods integration..."
93
+ cd TestProjects/cocoapods/ios
94
+ pod install
95
+ set -o pipefail && xcodebuild build \
96
+ -workspace PinLayout-iOS.xcworkspace \
97
+ -scheme PinLayout-iOS \
98
+ -sdk iphonesimulator \
99
+ -destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR_DEVICE }},OS=${{ env.IOS_SIMULATOR_OS }}" \
100
+ | xcpretty
101
+ cd ../../..
102
+
103
+ # - name: Test CocoaPods macOS Integration
104
+ # run: |
105
+ # cd TestProjects/cocoapods/macos
106
+ # pod install
107
+ # set -o pipefail && xcodebuild build \
108
+ # -workspace PinLayout-macOS.xcworkspace \
109
+ # -scheme PinLayout-macOS \
110
+ # -sdk macosx \
111
+ # | xcpretty
112
+ # cd ../../..
113
+
114
+ # - name: Test CocoaPods tvOS Integration
115
+ # run: |
116
+ # cd TestProjects/cocoapods/tvos
117
+ # pod install
118
+ # set -o pipefail && xcodebuild build \
119
+ # -workspace PinLayout-tvOS.xcworkspace \
120
+ # -scheme PinLayout-tvOS \
121
+ # -sdk appletvsimulator \
122
+ # -destination "platform=tvOS Simulator,name=${{ env.TVOS_SIMULATOR_DEVICE }},OS=${{ env.TVOS_SIMULATOR_OS }}" \
123
+ # | xcpretty
124
+ # cd ../../..
125
+
126
+ # - name: Test Carthage Integration
127
+ # run: |
128
+ # cd TestProjects/carthage/ios
129
+ # rm Cartfile
130
+ # echo "git \"file:///$GITHUB_WORKSPACE\"" > Cartfile
131
+ # carthage update --use-ssh --platform iOS --use-xcframeworks
132
+ # set -o pipefail && xcodebuild build \
133
+ # -project PinLayout-Carthage-iOS.xcodeproj \
134
+ # -scheme PinLayout-Carthage-iOS \
135
+ # -sdk iphonesimulator \
136
+ # -destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR_DEVICE }},OS=${{ env.IOS_SIMULATOR_OS }}" \
137
+ # | xcpretty
138
+ # rm Cartfile.resolved
139
+ # cd ../../..
53
140
54
141
- name : Swift Package Manager - iOS Empty project
55
- run : set -o pipefail && cd TestProjects/swift-package-manager/ios && rm -rf .build && xcodebuild build -project PinLayout-SPM-iOS.xcodeproj -scheme PinLayout-SPM-iOS -sdk iphonesimulator16.2 -destination 'platform=iOS Simulator,name=iPhone SE (3rd generation),OS=16.2' | xcpretty && cd ../../..
56
-
57
- - name : Set XCode Version 13.4.1 (iOS 15.5)
58
- run : sudo xcode-select -s /Applications/Xcode_13.4.1.app
59
- - name : Build PinLayoutSample - iOS 15.5
60
- run : set -o pipefail && xcodebuild clean build -workspace PinLayout.xcworkspace -scheme PinLayoutSample -sdk iphonesimulator15.5 -destination 'platform=iOS Simulator,name=iPhone 8,OS=15.5' | xcpretty
61
-
62
- - name : Pod lib lint
63
- run : set -o pipefail && bundle exec pod lib lint --allow-warnings
142
+ run : |
143
+ cd TestProjects/swift-package-manager/ios
144
+ rm -rf .build
145
+ set -o pipefail && xcodebuild build \
146
+ -project PinLayout-SPM-iOS.xcodeproj \
147
+ -scheme PinLayout-SPM-iOS \
148
+ -sdk iphonesimulator \
149
+ -destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR_DEVICE }},OS=${{ env.IOS_SIMULATOR_OS }}" \
150
+ | xcpretty
151
+ cd ../../..
152
+
153
+ - name : Pod Lib Lint
154
+ run : set -o pipefail && pod lib lint --allow-warnings
64
155
65
156
- name : Codecov
66
157
run : bash <(curl -s https://codecov.io/bash) -D /tmp/PinLayout
67
158
68
- - run : echo "🍏 This job's status is ${{ job.status }}."
159
+ - name : Job Status
160
+ run : echo "🍏 This job's status is ${{ job.status }}."
0 commit comments