5
5
branches : [main]
6
6
pull_request :
7
7
8
+ concurrency :
9
+ group : ${{ github.workflow }}-${{ github.ref }}
10
+ cancel-in-progress : true
11
+
8
12
env :
9
13
SENTRY_AUTH_TOKEN : ${{ secrets.SENTRY_AUTH_TOKEN }}
10
14
@@ -147,6 +151,7 @@ jobs:
147
151
# we want that the matrix keeps running, default is to cancel them if it fails.
148
152
fail-fast : false
149
153
matrix :
154
+ rn-architecture : ['legacy', 'new']
150
155
platform : ["ios", "android"]
151
156
include :
152
157
- platform : ios
@@ -187,16 +192,26 @@ jobs:
187
192
id : app-plain-cache
188
193
with :
189
194
path : ${{ matrix.appPlain }}
190
- key : ${{ github.workflow }}-${{ github.job }}-appplain-${{ hashFiles('test/perf/TestAppPlain/**') }}
195
+ # if the whole plain app folder is hashed the cache is never hit as there are files generated in the folder
196
+ # the cache key is calculated both at cache retrieval and save time
197
+ # hashFiles fails when there are rn android new arch generated files in the folder (exact reason unknown)
198
+ key : ${{ github.workflow }}-${{ github.job }}-appplain-${{ matrix.platform }}-${{ matrix.rn-architecture }}-${{ hashFiles('test/perf/TestAppPlain/yarn.lock') }}
191
199
- name : Build app plain
192
200
if : steps.app-plain-cache.outputs['cache-hit'] != 'true'
193
201
working-directory : ./test/perf/TestAppPlain
194
202
run : |
195
203
yarn install
196
204
cd ${{ matrix.platform }}
197
205
if [[ "${{ matrix.platform }}" == "android" ]]; then
206
+ if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then
207
+ perl -i -pe's/newArchEnabled=false/newArchEnabled=true/g' gradle.properties
208
+ fi
198
209
./gradlew assembleRelease
199
210
else
211
+ export PRODUCTION=1
212
+ if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then
213
+ export RCT_NEW_ARCH_ENABLED=1
214
+ fi
200
215
pod install
201
216
cd ../..
202
217
fastlane build_perf_test_app_plain
@@ -216,8 +231,15 @@ jobs:
216
231
yarn install
217
232
cd ${{ matrix.platform }}
218
233
if [[ "${{ matrix.platform }}" == "android" ]]; then
234
+ if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then
235
+ perl -i -pe's/newArchEnabled=false/newArchEnabled=true/g' gradle.properties
236
+ fi
219
237
./gradlew assembleRelease
220
238
else
239
+ export PRODUCTION=1
240
+ if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then
241
+ export RCT_NEW_ARCH_ENABLED=1
242
+ fi
221
243
pod install
222
244
cd ../..
223
245
fastlane build_perf_test_app_sentry
@@ -236,7 +258,7 @@ jobs:
236
258
- name : Collect apps metrics
237
259
uses : getsentry/action-app-sdk-overhead-metrics@v1
238
260
with :
239
- name : ${{ matrix.name }}
261
+ name : ${{ matrix.name }} (${{ matrix.rn-architecture }})
240
262
config : ./test/perf/metrics-${{ matrix.platform }}.yml
241
263
sauce-user : ${{ secrets.SAUCE_USERNAME }}
242
264
sauce-key : ${{ secrets.SAUCE_ACCESS_KEY }}
0 commit comments