2222 access_token : ${{ github.token }}
2323
2424 metrics :
25- runs-on : macos-latest
25+ runs-on : ${{ matrix.runs-on }}
2626 strategy :
2727 # we want that the matrix keeps running, default is to cancel them if it fails.
2828 fail-fast : false
3131 platform : ["ios", "android"]
3232 include :
3333 - platform : ios
34+ runs-on : macos-latest
3435 name : iOS
3536 appPlain : test/perf/test-app-plain.ipa
3637 - platform : android
38+ runs-on : ubuntu-latest
3739 name : Android
3840 appPlain : test/perf/TestAppPlain/android/app/build/outputs/apk/release/app-release.apk
3941 steps :
4547 with :
4648 java-version : ' 17'
4749 distribution : " adopt"
50+ - name : Gradle cache
51+ uses : gradle/gradle-build-action@v2
4852 - name : Install Global Dependencies
4953 run : yarn global add react-native-cli @sentry/cli yalc
5054 - uses : actions/cache@v3
@@ -141,7 +145,7 @@ jobs:
141145
142146 react-native-build :
143147 name : Build RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.engine }} ${{ matrix.platform }} ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks }}
144- runs-on : macos-latest
148+ runs-on : ${{ matrix.runs-on }}
145149 env :
146150 RN_SENTRY_POD_NAME : RNSentry
147151 RN_DIFF_REPOSITORY : https://github.com/react-native-community/rn-diff-purge.git
@@ -151,16 +155,19 @@ jobs:
151155 rn-version : ['0.65.3', '0.73.2']
152156 rn-architecture : ['legacy', 'new']
153157 platform : ['android', 'ios']
154- build-type : ['dev', ' production']
158+ build-type : ['production']
155159 ios-use-frameworks : ['no', 'static', 'dynamic']
156160 engine : ['hermes', 'jsc']
157161 include :
158162 - platform : ios
163+ runs-on : macos-latest
159164 runtime : ' latest'
160165 device : ' iPhone 14'
166+ - platform : android
167+ runs-on : ubuntu-latest
161168 exclude :
162169 # exclude JSC for new RN versions (keeping the matrix manageable)
163- - rn-version : ' 0.72.4 '
170+ - rn-version : ' 0.73.2 '
164171 engine : ' jsc'
165172 # exclude all rn versions lower than 0.70.0 for new architecture
166173 - rn-version : ' 0.65.3'
@@ -215,10 +222,16 @@ jobs:
215222 java-version : ' 17'
216223 distribution : ' adopt'
217224
225+ - name : Gradle cache
226+ uses : gradle/gradle-build-action@v2
227+
218228 - name : Setup Global Tools
219229 run : |
220230 yarn global add yalc semver
221- brew install xcbeautify
231+
232+ - name : Setup Global Xcode Tools
233+ if : ${{ matrix.platform == 'ios' }}
234+ run : brew install xcbeautify
222235
223236 - name : NPM cache SDK
224237 uses : actions/cache@v3
@@ -387,7 +400,7 @@ jobs:
387400 react-native-test :
388401 name : Test RN ${{ matrix.rn-version }} ${{ matrix.rn-architecture }} ${{ matrix.engine }} ${{ matrix.platform }} ${{ matrix.build-type }} ${{ matrix.ios-use-frameworks }}
389402 needs : react-native-build
390- runs-on : macos-latest
403+ runs-on : ${{ matrix.runs-on }}
391404 strategy :
392405 fail-fast : false # keeps matrix running if one fails
393406 matrix :
@@ -399,24 +412,32 @@ jobs:
399412 engine : ['hermes', 'jsc']
400413 include :
401414 - platform : ios
415+ runs-on : macos-latest
402416 runtime : ' latest'
403417 device : ' iPhone 14'
418+ - platform : android
419+ runs-on : ubuntu-latest
404420 exclude :
405421 # exclude all rn versions lower than 0.70.0 for new architecture
406422 - rn-version : ' 0.65.3'
407423 rn-architecture : ' new'
408424 # e2e test only the default combinations
409425 - rn-version : ' 0.65.3'
410426 engine : ' hermes'
411- - rn-version : ' 0.72.4 '
427+ - rn-version : ' 0.73.2 '
412428 engine : ' jsc'
429+ # E2E timeout due to a race condition https://github.com/facebook/react-native/issues/42123#issuecomment-1881203719
430+ - rn-version : ' 0.73.2'
431+ platform : ' ios'
432+ rn-architecture : ' new'
413433 env :
414434 PLATFORM : ${{ matrix.platform }}
415435 DEVICE : ${{ matrix.device }}
416436 steps :
417437 - uses : actions/checkout@v4
418438
419- - name : Setup Global Tools
439+ - name : Setup Global Xcode Tools
440+ if : ${{ matrix.platform == 'ios' }}
420441 run : brew install xcbeautify
421442
422443 - name : Download App Package
@@ -445,6 +466,21 @@ jobs:
445466 java-version : ' 17'
446467 distribution : ' adopt'
447468
469+ - name : Gradle cache
470+ uses : gradle/gradle-build-action@v2
471+
472+ - name : Setup KVM
473+ if : ${{ matrix.platform == 'android' }}
474+ shell : bash
475+ run : |
476+ # check if virtualization is supported...
477+ sudo apt install -y --no-install-recommends cpu-checker coreutils && echo "CPUs=$(nproc --all)" && kvm-ok
478+ # allow access to KVM to run the emulator
479+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
480+ | sudo tee /etc/udev/rules.d/99-kvm4all.rules
481+ sudo udevadm control --reload-rules
482+ sudo udevadm trigger --name-match=kvm
483+
448484 - name : NPM cache E2E Tests Library
449485 uses : actions/cache@v3
450486 id : deps-cache-e2e-library
@@ -494,10 +530,15 @@ jobs:
494530 uses : reactivecircus/android-emulator-runner@50986b1464923454c95e261820bc626f38490ec0 # pin@v2
495531 with :
496532 working-directory : test/e2e
497- api-level : 29
533+ api-level : 30
534+ force-avd-creation : false
535+ disable-animations : true
536+ disable-spellchecker : true
537+ target : ' aosp_atd'
538+ channel : canary # Necessary for ATDs
498539 emulator-options : >
499- -accel on
500- -no-snapshot
540+ -no-window
541+ -no-snapshot-save
501542 -gpu swiftshader_indirect
502543 -noaudio
503544 -no-boot-anim
0 commit comments