Skip to content

Commit cc8b0f7

Browse files
committed
Fix CI Failure
1 parent 59170b3 commit cc8b0f7

1 file changed

Lines changed: 138 additions & 43 deletions

File tree

Lines changed: 138 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,163 @@
11
name: Run CI
22
on: [push, pull_request]
33

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+
411
jobs:
512
CI:
6-
runs-on: macos-latest
7-
13+
runs-on: macos-15
14+
815
# ℹ️ Available GitHub Actions Runner Images
916
# https://github.com/actions/runner-images
1017

1118
steps:
1219
- name: Checkout
13-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
1421

15-
- run: bundle install
16-
- run: pod install --repo-update
22+
- name: Setup Ruby and Bundle
23+
run: bundle install
1724

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: Setup CocoaPods
26+
run: pod install --repo-update
27+
28+
- name: Set Xcode Version
29+
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
2030

2131
- 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
32+
run: |
33+
set -o pipefail && xcodebuild build \
34+
-project PinLayout.xcodeproj \
35+
-scheme PinLayout-iOS \
36+
-sdk iphonesimulator \
37+
-destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR_DEVICE }},OS=${{ env.IOS_SIMULATOR_OS }}" \
38+
| xcpretty
2339
2440
- 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
41+
run: |
42+
set -o pipefail && xcodebuild build \
43+
-project PinLayout.xcodeproj \
44+
-scheme PinLayout-tvOS \
45+
-sdk appletvsimulator \
46+
-destination "platform=tvOS Simulator,name=${{ env.TVOS_SIMULATOR_DEVICE }},OS=${{ env.TVOS_SIMULATOR_OS }}" \
47+
| xcpretty
2648
2749
- 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 ../../..
50+
run: |
51+
set -o pipefail && xcodebuild build \
52+
-project PinLayout.xcodeproj \
53+
-scheme PinLayout-macOS \
54+
-sdk macosx \
55+
| xcpretty
56+
57+
- name: Build PinLayoutSample
58+
run: |
59+
set -o pipefail && xcodebuild build \
60+
-workspace PinLayout.xcworkspace \
61+
-scheme PinLayoutSample \
62+
-sdk iphonesimulator \
63+
-destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR_DEVICE }},OS=${{ env.IOS_SIMULATOR_OS }}" \
64+
| xcpretty
65+
66+
- name: iOS Unit Tests
67+
run: |
68+
set -o pipefail && xcodebuild build test \
69+
-workspace PinLayout.xcworkspace \
70+
-scheme PinLayout-iOS \
71+
-sdk iphonesimulator \
72+
-destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR_DEVICE }},OS=${{ env.IOS_SIMULATOR_OS }}" \
73+
| xcpretty
74+
75+
# - name: tvOS Unit Tests
76+
# run: |
77+
# set -o pipefail && xcodebuild build test \
78+
# -workspace PinLayout.xcworkspace \
79+
# -scheme PinLayout-tvOS \
80+
# -sdk appletvsimulator \
81+
# -destination "platform=tvOS Simulator,name=${{ env.TVOS_SIMULATOR_DEVICE }},OS=${{ env.TVOS_SIMULATOR_OS }}" \
82+
# | xcpretty
83+
84+
# - name: macOS Unit Tests
85+
# run: |
86+
# set -o pipefail && xcodebuild test \
87+
# -workspace PinLayout.xcworkspace \
88+
# -scheme PinLayout-macOS \
89+
# -sdk macosx \
90+
# -destination "platform=macOS,name=Any Mac" \
91+
# | xcpretty
92+
93+
- name: Test CocoaPods Integration
94+
run: |
95+
echo "Testing CocoaPods integration..."
96+
cd TestProjects/cocoapods/ios
97+
arch -x86_64 pod install
98+
set -o pipefail && xcodebuild build \
99+
-workspace PinLayout-iOS.xcworkspace \
100+
-scheme PinLayout-iOS \
101+
-sdk iphonesimulator \
102+
-destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR_DEVICE }},OS=${{ env.IOS_SIMULATOR_OS }}" \
103+
| xcpretty
104+
cd ../../..
105+
106+
# - name: Test CocoaPods macOS Integration
107+
# run: |
108+
# cd TestProjects/cocoapods/macos
109+
# arch -x86_64 pod install
110+
# set -o pipefail && xcodebuild build \
111+
# -workspace PinLayout-macOS.xcworkspace \
112+
# -scheme PinLayout-macOS \
113+
# -sdk macosx \
114+
# | xcpretty
115+
# cd ../../..
116+
117+
# - name: Test CocoaPods tvOS Integration
118+
# run: |
119+
# cd TestProjects/cocoapods/tvos
120+
# arch -x86_64 pod install
121+
# set -o pipefail && xcodebuild build \
122+
# -workspace PinLayout-tvOS.xcworkspace \
123+
# -scheme PinLayout-tvOS \
124+
# -sdk appletvsimulator \
125+
# -destination "platform=tvOS Simulator,name=${{ env.TVOS_SIMULATOR_DEVICE }},OS=${{ env.TVOS_SIMULATOR_OS }}" \
126+
# | xcpretty
127+
# cd ../../..
128+
129+
# - name: Test Carthage Integration
130+
# run: |
131+
# cd TestProjects/carthage/ios
132+
# rm Cartfile
133+
# echo "git \"file:///$GITHUB_WORKSPACE\"" > Cartfile
134+
# carthage update --use-ssh --platform iOS --use-xcframeworks
135+
# set -o pipefail && xcodebuild build \
136+
# -project PinLayout-Carthage-iOS.xcodeproj \
137+
# -scheme PinLayout-Carthage-iOS \
138+
# -sdk iphonesimulator \
139+
# -destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR_DEVICE }},OS=${{ env.IOS_SIMULATOR_OS }}" \
140+
# | xcpretty
141+
# rm Cartfile.resolved
142+
# cd ../../..
53143

54144
- 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
145+
run: |
146+
cd TestProjects/swift-package-manager/ios
147+
rm -rf .build
148+
set -o pipefail && xcodebuild build \
149+
-project PinLayout-SPM-iOS.xcodeproj \
150+
-scheme PinLayout-SPM-iOS \
151+
-sdk iphonesimulator \
152+
-destination "platform=iOS Simulator,name=${{ env.IOS_SIMULATOR_DEVICE }},OS=${{ env.IOS_SIMULATOR_OS }}" \
153+
| xcpretty
154+
cd ../../..
155+
156+
- name: Pod Lib Lint
63157
run: set -o pipefail && bundle exec pod lib lint --allow-warnings
64158

65159
- name: Codecov
66160
run: bash <(curl -s https://codecov.io/bash) -D /tmp/PinLayout
67161

68-
- run: echo "🍏 This job's status is ${{ job.status }}."
162+
- name: Job Status
163+
run: echo "🍏 This job's status is ${{ job.status }}."

0 commit comments

Comments
 (0)