@@ -15,18 +15,24 @@ jobs:
1515 ios :
1616 name : iOS
1717 runs-on : macOS-latest
18+ env :
19+ LOGSDIR : /tmp/.keyvalueobservation.xcodebuild/iOS/Logs
1820
1921 steps :
2022 - name : Checkout Code
2123 uses : actions/checkout@v2
2224
25+ - name Setup Environment
26+ run : |
27+ mkdir -p "$LOGSDIR"
28+
2329 - name : Build iOS
2430 run : |
25- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=iOS" -configuration Debug
31+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=iOS" -configuration Debug 2>&1 | tee "$LOGSDIR/build-ios.log"
2632
2733 - name : Build iOS Simulator
2834 run : |
29- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=iOS Simulator" -configuration Debug
35+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=iOS Simulator" -configuration Debug 2>&1 | tee "$LOGSDIR/build-iossimulator.log"
3036
3137 - name : Test
3238 run : |
@@ -35,39 +41,65 @@ jobs:
3541 IOS_SIM = "iPhone 12 Pro" # Fallback Simulator
3642 fi
3743
38- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -testPlan "KeyValueObservationTests" -destination "platform=iOS Simulator,name=$IOS_SIM" -configuration Debug ONLY_ACTIVE_ARCH=YES test
44+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -testPlan "KeyValueObservationTests" -destination "platform=iOS Simulator,name=$IOS_SIM" -configuration Debug ONLY_ACTIVE_ARCH=YES test 2>&1 | tee "$LOGSDIR/test-ios.log"
45+
46+ - name : Upload Logs
47+ uses : actions/upload-artifact@v2
48+ if : always()
49+ with :
50+ name : iOSBuildLogs
51+ path : ${{ env.LOGSDIR }}/*.log
3952
4053 maccatalyst :
4154 name : Mac Catalyst
4255 runs-on : macOS-latest
56+ env :
57+ LOGSDIR : /tmp/.keyvalueobservation.xcodebuild/macCatalyst/Logs
4358
4459 steps :
4560 - name : Checkout Code
4661 uses : actions/checkout@v2
4762
63+ - name Setup Environment
64+ run : |
65+ mkdir -p "$LOGSDIR"
66+
4867 - name : Build
4968 run : |
50- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=macOS,variant=Mac Catalyst" -configuration Debug
69+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -destination "generic/platform=macOS,variant=Mac Catalyst" -configuration Debug 2>&1 | tee "$LOGSDIR/build-maccatalyst.log"
5170
5271 - name : Test
5372 run : |
54- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -testPlan "KeyValueObservationTests" -destination "platform=macOS,variant=Mac Catalyst" -configuration Debug ONLY_ACTIVE_ARCH=YES test
73+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation" -testPlan "KeyValueObservationTests" -destination "platform=macOS,variant=Mac Catalyst" -configuration Debug ONLY_ACTIVE_ARCH=YES test 2>&1 | tee "$LOGSDIR/test-maccatalyst.log"
74+
75+ - name : Upload Logs
76+ uses : actions/upload-artifact@v2
77+ if : always()
78+ with :
79+ name : MacCatalystBuildLogs
80+ path : ${{ env.LOGSDIR }}/*.log
5581
5682 macos :
5783 name : macOS
5884 runs-on : macOS-latest
85+ env :
86+ LOGSDIR : /tmp/.keyvalueobservation.xcodebuild/macOS/Logs
5987
6088 steps :
6189 - name : Checkout Code
6290 uses : actions/checkout@v2
6391
92+ - name Setup Environment
93+ run : |
94+ mkdir -p "$LOGSDIR"
95+
6496 - name : Build
6597 run : |
66- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation macOS" -destination "generic/platform=macOS" -configuration Debug
98+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation macOS" -destination "generic/platform=macOS" -configuration Debug 2>&1 | tee "$LOGSDIR/build-macos.log"
6799
68100 - name : Test
69101 run : |
70- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation macOS" -testPlan "KeyValueObservation macOS Tests" -derivedDataPath ".xcodebuild" -configuration Debug ONLY_ACTIVE_ARCH=YES test
102+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation macOS" -testPlan "KeyValueObservation macOS Tests" -derivedDataPath ".xcodebuild" -configuration Debug ONLY_ACTIVE_ARCH=YES test 2>&1 | tee "$LOGSDIR/test-macos.log"
71103
72104 - name : Generate Code Coverage File
73105 if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
@@ -84,21 +116,34 @@ jobs:
84116 file : ./codecov.lcov
85117 verbose : true
86118
119+ - name : Upload Logs
120+ uses : actions/upload-artifact@v2
121+ if : always()
122+ with :
123+ name : macOSBuildLogs
124+ path : ${{ env.LOGSDIR }}/*.log
125+
87126 tvos :
88127 name : tvOS
89128 runs-on : macOS-latest
129+ env :
130+ LOGSDIR : /tmp/.keyvalueobservation.xcodebuild/tvOS/Logs
90131
91132 steps :
92133 - name : Checkout Code
93134 uses : actions/checkout@v2
94135
136+ - name Setup Environment
137+ run : |
138+ mkdir -p "$LOGSDIR"
139+
95140 - name : Build tvOS
96141 run : |
97- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -destination "generic/platform=tvOS" -configuration Debug
142+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -destination "generic/platform=tvOS" -configuration Debug 2>&1 | tee "$LOGSDIR/build-tvos.log"
98143
99144 - name : Build tvOS Simulator
100145 run : |
101- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -destination "generic/platform=tvOS Simulator" -configuration Debug
146+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -destination "generic/platform=tvOS Simulator" -configuration Debug 2>&1 | tee "$LOGSDIR/build-tvossimulator.log"
102147
103148 - name : Test
104149 run : |
@@ -107,23 +152,36 @@ jobs:
107152 TVOS_SIM = "Apple TV" # Fallback Simulator
108153 fi
109154
110- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -testPlan "KeyValueObservation tvOS Tests" -destination "platform=tvOS Simulator,name=$TVOS_SIM" -configuration Debug ONLY_ACTIVE_ARCH=YES test
155+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation tvOS" -testPlan "KeyValueObservation tvOS Tests" -destination "platform=tvOS Simulator,name=$TVOS_SIM" -configuration Debug ONLY_ACTIVE_ARCH=YES test 2>&1 | tee "$LOGSDIR/test-tvos.log"
156+
157+ - name : Upload Logs
158+ uses : actions/upload-artifact@v2
159+ if : always()
160+ with :
161+ name : tvOSBuildLogs
162+ path : ${{ env.LOGSDIR }}/*.log
111163
112164 watchos :
113165 name : watchOS
114166 runs-on : macOS-11
167+ env :
168+ LOGSDIR : /tmp/.keyvalueobservation.xcodebuild/watchOS/Logs
115169
116170 steps :
117171 - name : Checkout Code
118172 uses : actions/checkout@v2
119173
174+ - name Setup Environment
175+ run : |
176+ mkdir -p "$LOGSDIR"
177+
120178 - name : Build watchOS
121179 run : |
122- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -destination "generic/platform=watchOS" -configuration Debug
180+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -destination "generic/platform=watchOS" -configuration Debug 2>&1 | tee "$LOGSDIR/build-watchos.log"
123181
124182 - name : Build watchOS Simulator
125183 run : |
126- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -destination "generic/platform=watchOS Simulator" -configuration Debug
184+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -destination "generic/platform=watchOS Simulator" -configuration Debug 2>&1 | tee "$LOGSDIR/build-watchossimulator.log"
127185
128186 - name : Test
129187 run : |
@@ -132,4 +190,11 @@ jobs:
132190 WATCHOS_SIM = "Apple Watch Series 6 - 44mm" # Fallback Simulator
133191 fi
134192
135- xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -testPlan "KeyValueObservation watchOS Tests" -destination "platform=watchOS Simulator,name=$WATCHOS_SIM" -configuration Debug ONLY_ACTIVE_ARCH=YES test
193+ xcodebuild -project KeyValueObservation.xcodeproj -scheme "KeyValueObservation watchOS" -testPlan "KeyValueObservation watchOS Tests" -destination "platform=watchOS Simulator,name=$WATCHOS_SIM" -configuration Debug ONLY_ACTIVE_ARCH=YES test 2>&1 | tee "$LOGSDIR/test-watchos.log"
194+
195+ - name : Upload Logs
196+ uses : actions/upload-artifact@v2
197+ if : always()
198+ with :
199+ name : watchOSBuildLogs
200+ path : ${{ env.LOGSDIR }}/*.log
0 commit comments