ci: Add build tests for RNTester (#33033)

Summary:
Add 4 new jobs to CI in order to test RNTester builds on both Android and iOS using Hermes and JSC

Closes https://github.com/facebook/react-native/issues/32676

## Changelog

[General] [Added] - Add build tests for RNTester to CircleCI

Pull Request resolved: https://github.com/facebook/react-native/pull/33033

Test Plan: Make sure builds are working as expected and CI is green

Reviewed By: lunaleaps

Differential Revision: D33982864

Pulled By: philIip

fbshipit-source-id: 00b2116be1b6484324e8162cc691b1d0863d282d
This commit is contained in:
Gabriel Donadel Dall'Agnol
2022-02-03 11:08:56 -08:00
committed by Facebook GitHub Bot
parent 5e933fdd2a
commit 70062c1322
+87
View File
@@ -588,6 +588,37 @@ jobs:
name: Build the template application
command: cd template/android/ && ./gradlew assembleDebug
# -------------------------
# JOBS: Test Android RNTester
# -------------------------
test_android_rntester:
executor: reactnativeandroid
parameters:
use_hermes:
type: boolean
default: false
steps:
- checkout
- run_yarn
- run:
name: Generate artifacts for Maven
command: ./gradlew :ReactAndroid:installArchives
- when:
condition: << parameters.use_hermes >>
steps:
- run:
name: Build RNTester with Hermes
command: ./gradlew :packages:rn-tester:android:app:assembleHermesDebug
- when:
condition:
not: << parameters.use_hermes >>
steps:
- run:
name: Build RNTester with JSC
command: ./gradlew :packages:rn-tester:android:app:assembleJscDebug
# -------------------------
# JOBS: Test iOS Template
# -------------------------
@@ -621,6 +652,40 @@ jobs:
-scheme $PROJECT_NAME \
-sdk iphonesimulator
# -------------------------
# JOBS: Test iOS RNTester
# -------------------------
test_ios_rntester:
executor: reactnativeios
parameters:
use_hermes:
type: boolean
default: false
steps:
- checkout
- run_yarn
- when:
condition: << parameters.use_hermes >>
steps:
- run:
name: Set USE_HERMES=1
command: echo "export USE_HERMES=1" >> $BASH_ENV
- run:
name: Install CocoaPods dependencies
command: |
rm -rf packages/rn-tester/Pods
cd packages/rn-tester && bundle exec pod install
- run:
name: Build RNTester
command: |
xcodebuild build \
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
-scheme RNTester \
-sdk iphonesimulator
# -------------------------
# JOBS: Windows
# -------------------------
@@ -885,12 +950,34 @@ workflows:
filters:
branches:
ignore: gh-pages
- test_android_rntester:
name: test_android_rntester_hermes
use_hermes: true
filters:
branches:
ignore: gh-pages
- test_android_rntester:
name: test_android_rntester_jsc
filters:
branches:
ignore: gh-pages
- test_ios_template:
requires:
- build_npm_package
filters:
branches:
ignore: gh-pages
- test_ios_rntester:
name: test_ios_rntester_hermes
use_hermes: true
filters:
branches:
ignore: gh-pages
- test_ios_rntester:
name: test_ios_rntester_jsc
filters:
branches:
ignore: gh-pages
- test_ios:
name: test_ios_unit_jsc
run_unit_tests: true