Skip to content

Commit bb2e7f3

Browse files
Repo metrics new arch (#2637)
1 parent adf4db3 commit bb2e7f3

File tree

4 files changed

+35
-3
lines changed

4 files changed

+35
-3
lines changed

.github/workflows/e2e.yml

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
branches: [main]
66
pull_request:
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
812
env:
913
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
1014

@@ -147,6 +151,7 @@ jobs:
147151
# we want that the matrix keeps running, default is to cancel them if it fails.
148152
fail-fast: false
149153
matrix:
154+
rn-architecture: ['legacy', 'new']
150155
platform: ["ios", "android"]
151156
include:
152157
- platform: ios
@@ -187,16 +192,26 @@ jobs:
187192
id: app-plain-cache
188193
with:
189194
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') }}
191199
- name: Build app plain
192200
if: steps.app-plain-cache.outputs['cache-hit'] != 'true'
193201
working-directory: ./test/perf/TestAppPlain
194202
run: |
195203
yarn install
196204
cd ${{ matrix.platform }}
197205
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
198209
./gradlew assembleRelease
199210
else
211+
export PRODUCTION=1
212+
if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then
213+
export RCT_NEW_ARCH_ENABLED=1
214+
fi
200215
pod install
201216
cd ../..
202217
fastlane build_perf_test_app_plain
@@ -216,8 +231,15 @@ jobs:
216231
yarn install
217232
cd ${{ matrix.platform }}
218233
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
219237
./gradlew assembleRelease
220238
else
239+
export PRODUCTION=1
240+
if [[ ${{ matrix.rn-architecture }} == 'new' ]]; then
241+
export RCT_NEW_ARCH_ENABLED=1
242+
fi
221243
pod install
222244
cd ../..
223245
fastlane build_perf_test_app_sentry
@@ -236,7 +258,7 @@ jobs:
236258
- name: Collect apps metrics
237259
uses: getsentry/action-app-sdk-overhead-metrics@v1
238260
with:
239-
name: ${{ matrix.name }}
261+
name: ${{ matrix.name }} (${{ matrix.rn-architecture }})
240262
config: ./test/perf/metrics-${{ matrix.platform }}.yml
241263
sauce-user: ${{ secrets.SAUCE_USERNAME }}
242264
sauce-key: ${{ secrets.SAUCE_ACCESS_KEY }}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cmake_minimum_required(VERSION 3.13)
2+
# Define the library name here.
3+
project(testappplain_appmodules)
4+
# This file includes all the necessary to let you build your application with the New Architecture.
5+
include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
cmake_minimum_required(VERSION 3.13)
2+
# Define the library name here.
3+
project(testappsentry_appmodules)
4+
# This file includes all the necessary to let you build your application with the New Architecture.
5+
include(${REACT_ANDROID_DIR}/cmake-utils/ReactNative-application.cmake)

test/perf/metrics-android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ startupTimeTest:
1212
diffMax: 150
1313

1414
binarySizeTest:
15-
diffMin: 1.9 MiB
15+
diffMin: 0.5 MiB
1616
diffMax: 2.5 MiB

0 commit comments

Comments
 (0)