32
32
timeout-minutes : 60
33
33
env :
34
34
CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
35
+ strategy :
36
+ fail-fast : false
37
+ matrix :
38
+ # We want to test debug (for coverage) and release mode
39
+ buildmode : [debug, release]
35
40
steps :
36
41
# Set up tool versions
37
42
- uses : actions/setup-node@v4
78
83
- uses : hendrikmuhs/ccache-action@v1
79
84
name : Xcode Compile Cache
80
85
with :
81
- key : ${{ runner.os }}-ios-v3 # makes a unique key w/related restore key internally
86
+ key : ${{ runner.os }}-${{ matrix.buildmode }}- ios-v3 # makes a unique key w/related restore key internally
82
87
create-symlink : true
83
88
max-size : 1500M
84
89
@@ -144,7 +149,8 @@ jobs:
144
149
max_attempts : 3
145
150
command : HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew && HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils xcbeautify
146
151
147
- - name : Build iOS App
152
+ - name : Build iOS App Debug
153
+ if : contains(matrix.buildmode, 'debug')
148
154
run : |
149
155
export CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros
150
156
export CCACHE_FILECLONE=true
@@ -161,6 +167,23 @@ jobs:
161
167
ccache -s
162
168
shell : bash
163
169
170
+ - name : Build iOS App Release
171
+ if : contains(matrix.buildmode, 'release')
172
+ run : |
173
+ export CCACHE_SLOPPINESS=clang_index_store,file_stat_matches,include_file_ctime,include_file_mtime,ivfsoverlay,pch_defines,modules,system_headers,time_macros
174
+ export CCACHE_FILECLONE=true
175
+ export CCACHE_DEPEND=true
176
+ export CCACHE_INODECACHE=true
177
+ export CCACHE_LIMIT_MULTIPLE=0.95
178
+ ccache -s
179
+ export RCT_NO_LAUNCH_PACKAGER=1
180
+ set -o pipefail
181
+ echo $PATH
182
+ which clang
183
+ yarn tests:ios:build:release
184
+ ccache -s
185
+ shell : bash
186
+
164
187
- name : Metro Bundler Cache
165
188
uses : actions/cache@v4
166
189
with :
@@ -192,9 +215,15 @@ jobs:
192
215
run : nohup sh -c "sleep 110 && xcrun simctl spawn booted log stream --level debug --style compact > simulator.log 2>&1 &"
193
216
194
217
- name : Detox Test
218
+ if : contains(matrix.buildmode, 'debug')
195
219
timeout-minutes : 50
196
220
run : yarn tests:ios:test-cover
197
221
222
+ - name : Detox Test
223
+ if : contains(matrix.buildmode, 'release')
224
+ timeout-minutes : 50
225
+ run : yarn tests:ios:test:release
226
+
198
227
- name : Stop App Video
199
228
if : always()
200
229
continue-on-error : true
@@ -205,16 +234,17 @@ jobs:
205
234
continue-on-error : true
206
235
if : always()
207
236
with :
208
- name : simulator_video
237
+ name : simulator-${{ matrix.buildmode }}_video
209
238
path : simulator.mp4
210
239
211
240
- name : Upload Simulator Log
212
241
uses : actions/upload-artifact@v4
213
242
if : always()
214
243
with :
215
- name : simulator_log
244
+ name : simulator-${{ matrix.buildmode }}_log
216
245
path : simulator.log
217
246
218
247
- uses : codecov/codecov-action@v4
248
+ if : contains(matrix.buildmode, 'debug')
219
249
with :
220
250
verbose : true
0 commit comments