Skip to content

Commit

Permalink
feat: add matrix for Debug/Release and New/Legacy architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
Riccardo Cipolleschi committed Aug 28, 2022
1 parent ed21a3e commit 959b662
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 45 deletions.
58 changes: 50 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,16 @@ jobs:
# -------------------------
test_ios_template:
executor: reactnativeios
parameters:
flavor:
type: string
default: "Debug"
newarchitecture:
type: string
default: "OldArch"
hermes:
type: string
default: "Hermes"
environment:
- PROJECT_NAME: "iOSTemplateProject"
- HERMES_WS_DIR: *hermes_workspace_root
Expand All @@ -689,25 +699,52 @@ jobs:
- attach_workspace:
at: .
- *attach_hermes_workspace
- run:
name: Set USE_HERMES=1
command: echo "export USE_HERMES=1" >> $BASH_ENV
- run:
name: Set HERMES_ENGINE_TARBALL_PATH
command: |
echo "export HERMES_ENGINE_TARBALL_PATH=$(ls -AU $HERMES_WS_DIR/hermes-runtime-darwin/hermes-runtime-darwin-*.tar.gz | head -1)" >> $BASH_ENV
- when:
condition:
equal: ["Hermes", << parameters.hermes >>]
steps:
- run:
name: Set HERMES_ENGINE_TARBALL_PATH
command: |
echo "export HERMES_ENGINE_TARBALL_PATH=$(ls -AU $HERMES_WS_DIR/hermes-runtime-darwin/hermes-runtime-darwin-*.tar.gz | head -1)" >> $BASH_ENV
- run:
name: Create iOS template project
command: |
REPO_ROOT=$(pwd)
PACKAGE=$(cat build/react-native-package-version)
PATH_TO_PACKAGE="$REPO_ROOT/build/$PACKAGE"
node ./scripts/set-rn-template-version.js "file:$PATH_TO_PACKAGE"
node cli.js init $PROJECT_NAME --directory "/tmp/$PROJECT_NAME" --template $REPO_ROOT --verbose
node cli.js init $PROJECT_NAME --directory "/tmp/$PROJECT_NAME" --template $REPO_ROOT --verbose --skip-install
- run:
name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.newarchitecture >>
command: |
cd /tmp/$PROJECT_NAME
yarn install
cd ios
bundle install
if [[ << parameters.flavor >> == "Release" ]]; then
echo "Production Build"
export PRODUCTION=1
fi
if [[ << parameters.newarchitecture >> == "NewArch" ]]; then
echo "With New Architecture"
export RCT_NEW_ARCH_ENABLED=1
fi
if [[ << parameters.hermes >> == "NoHermes" ]]; then
echo "Without Hermes"
export USE_HERMES=0
fi
bundle exec pod install
- run:
name: Build template project
command: |
xcodebuild build \
-configuration << parameters.flavor >> \
-workspace /tmp/$PROJECT_NAME/ios/$PROJECT_NAME.xcworkspace \
-scheme $PROJECT_NAME \
-sdk iphonesimulator
Expand Down Expand Up @@ -1308,6 +1345,11 @@ workflows:
- test_ios_template:
requires:
- build_npm_package
matrix:
parameters:
newarchitecture: ["NewArch", "OldArch"]
flavor: ["Debug", "Release"]
hermes: ["Hermes", "NoHermes"]
- test_ios_rntester:
requires:
- build_hermes_macos
Expand Down
85 changes: 49 additions & 36 deletions packages/rn-tester/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ PODS:
- fmt (6.2.1)
- glog (0.3.5)
- libevent (2.1.12)
- MyNativeView (0.0.1):
- RCTRequired
- RCTTypeSafety
- React
- React-Codegen
- React-RCTFabric
- ReactCommon/turbomodule/core
- OpenSSL-Universal (1.1.1100)
- RCT-Folly (2021.07.22.00):
- boost
Expand Down Expand Up @@ -631,6 +638,8 @@ PODS:
- RCTRequired
- RCTTypeSafety
- React-Core
- React-graphics
- React-RCTFabric
- ReactCommon/turbomodule/core
- React-RCTBlob (1000.0.0):
- RCT-Folly (= 2021.07.22.00)
Expand Down Expand Up @@ -753,6 +762,7 @@ DEPENDENCIES:
- FlipperKit/FlipperKitUserDefaultsPlugin (= 0.125.0)
- FlipperKit/SKIOSNetworkPlugin (= 0.125.0)
- glog (from `../../third-party-podspecs/glog.podspec`)
- MyNativeView (from `NativeComponentExample`)
- OpenSSL-Universal (= 1.1.1100)
- RCT-Folly (from `../../third-party-podspecs/RCT-Folly.podspec`)
- RCT-Folly/Fabric (from `../../third-party-podspecs/RCT-Folly.podspec`)
Expand Down Expand Up @@ -824,6 +834,8 @@ EXTERNAL SOURCES:
:path: "../../React/FBReactNativeSpec"
glog:
:podspec: "../../third-party-podspecs/glog.podspec"
MyNativeView:
:path: NativeComponentExample
RCT-Folly:
:podspec: "../../third-party-podspecs/RCT-Folly.podspec"
RCTRequired:
Expand Down Expand Up @@ -899,8 +911,8 @@ SPEC CHECKSUMS:
boost: a7c83b31436843459a1961bfd74b96033dc77234
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54
FBLazyVector: 19e408e76fa9258dd32191a50d60c41444f52d29
FBReactNativeSpec: a9bf67b4be55c0819bc88e1721820286c1340710
FBLazyVector: 7330792e02a4318be066d0a38b3bf124d0fe7c10
FBReactNativeSpec: 5a23d6cac3588bae935d32158f28cd173e73a267
Flipper: 26fc4b7382499f1281eb8cb921e5c3ad6de91fe0
Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c
Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30
Expand All @@ -913,43 +925,44 @@ SPEC CHECKSUMS:
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
MyNativeView: 412ff641161c6577d85641afa32d5f4f8014a816
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda
RCTRequired: 1c8808cf84569265784a6c33984bbb506ada8c6e
RCTTypeSafety: b6dcb5036a808864ee8cad66ca15f263c24661cc
React: 8d809d414723bb5763093ddec7658066a21ccabc
React-bridging: c8806159f8ef90f27443857eed1efdb8c85940e1
React-callinvoker: 5f16202ad4e45f0607b1fae0f6955a8f7c87eef1
React-Codegen: 5adf19af97eb37a7d441c040521191e446255086
React-Core: ce4282fb714ffbe444b84d296d1728eaee4d0e9f
React-CoreModules: 675170bccf156da3a3348e04e2036ce401b2010d
React-cxxreact: 7276467c246302fedf598cc40d7003896ddb20ba
React-Fabric: b49c8e76c926b5b6b708802759b27dd6e02bb4bc
React-graphics: 5ccc9cc0d91794fd42bc1c693e9aea207554bbef
React-jsi: a042596cb558abea721ab5e23cb175647610a73d
React-jsiexecutor: f7fbac5dff7e7ff110a66edf2626b4f4f4600ef5
React-jsinspector: 7733dd522d044aef87caa39f3eda77593358a7eb
React-logger: c7960346b021767ed90971aff592a44e3d69f8bb
React-perflogger: c4fdd48988c2d3047186fc1bc1772d634cfca2ea
React-RCTActionSheet: 166fd1df85ac10219466b45d12a5884d3eaceac1
React-RCTAnimation: d6127046c6bb44bd3e67b7503c4ad7f91131b58e
React-RCTAppDelegate: 475ca9b80e26c1c4aed93ce04363092fa78cf788
React-RCTBlob: 68675c89ebe6edf310dddd0774ba07b685f090a9
React-RCTFabric: a98a6effece6719669b8c6b4d2c33fb0edddc613
React-RCTImage: 6de9f0f4402af859849e97cc73a56a52f400f4c9
React-RCTLinking: 21bb4675c3ec8fe704672ea511e817aeb3bf8370
React-RCTNetwork: a865deadacbf6b3d863f0496e7d2c2e81c269317
React-RCTPushNotification: 7f678a88147254ede5d21a1e1e71e8a964dd0051
React-RCTSettings: 23ce1aa52ddf5db44c973bb5cc93713e871e09b6
React-RCTTest: 06c388632dc7b30df17af01c8f9e89e641b4d31c
React-RCTText: a861fbf2835299d3cc4189697cddd8bd8602afb9
React-RCTVibration: 0386f50996a153b3f39cecbe7d139763ac9a9fdf
React-rncore: 2a6ad37560e94cf7ff32e3f2ae1e708491b4c1f3
React-runtimeexecutor: 97dca9247f4d3cfe0733384b189c6930fbd402b7
ReactCommon: 8e39c4b24da570ea2b631accbf779b5891befe0c
ScreenshotManager: 71d047abd38a77310985b87f8136b620c5c61e88
RCTRequired: 27524333f4630a2e1bdc447ffdb92823e3e98389
RCTTypeSafety: fc5321c448db57839227ee4eac41dbfe64ba5246
React: 3be305978f3183eb5cdaff30860ba9f5fd4b118e
React-bridging: 2946ffa7fd2816a130c12c93a42a31de81ad2506
React-callinvoker: 24a035e69bdf4dcbf923f27951df7dbaaa6b500b
React-Codegen: 146630f64f2a33223b383486ed36544d83b279f4
React-Core: e239e5e410c80046c317335afbf74a5e3ced38e8
React-CoreModules: d82576d6eeca6cbdf785471a4b7f08c590377686
React-cxxreact: 78adcc46ea7b84921ea55c8f851a4362f8da89d2
React-Fabric: 0ca14ed5137185b7a74103a6a2fcb34cc5870f8c
React-graphics: c4f7b7eeb8f5ce3ad4a4cf8bae5c93dca0ace455
React-jsi: 71ce877e7b91c8666b2f5524d44f62a89efcf6eb
React-jsiexecutor: 0db6d7bdf9b0d2658c1138e8d1d4da49f477f163
React-jsinspector: 653c60733329c1b867b5ae48e6b0a48cdbcb1bf5
React-logger: 020338b2e8f6f6b3d4fe70883c297fcfa1450ad3
React-perflogger: e11dcfc5a4544dbf7d1fd747a2bc825987afc477
React-RCTActionSheet: 8128cb9a215dd1ada1a771aa7559f7a487b22ec6
React-RCTAnimation: d21a9f023b8250bdb644328622fb822b9bb248db
React-RCTAppDelegate: 8421d8d30f1c39be236cd142f0fbba3245c0b0bc
React-RCTBlob: 4eff9924c2876b820440fe432db2fb3d65e36cc5
React-RCTFabric: 4ce6e571c90e4f98d0f6d2ba5bb640fa618d772e
React-RCTImage: 3b629a80c6a60cb9394a70572a31558081c5d43e
React-RCTLinking: ed1a7fa419690cd74cc13ecc520f81c6272fbae2
React-RCTNetwork: 61f316ed005996ce028ee0162eb68e07f74d55b9
React-RCTPushNotification: a59a2bba5f2ee319f6ee80243a5c06e6601f6800
React-RCTSettings: 2673f94b52af2564489cc384335911cc34d371de
React-RCTTest: 9d940c3930293ace7fbcbeac7475432d686ae157
React-RCTText: 7fd1d7b21179b9c3a433390b2a5c9c138de9147d
React-RCTVibration: ac0584712033cbcff5a77d45145c12bada229e68
React-rncore: 382ce6ec8bba19b5281cbb1b7e69e7dd3822eeba
React-runtimeexecutor: 44a8305e3c5f185ccd20345cfeecef29a539f7b7
ReactCommon: 18f52e6da1cdbef6a4951d3ae845d255c80428e6
ScreenshotManager: 5fe3d8792945f28a66baebf199c45c19dc59035b
SocketRocket: fccef3f9c5cedea1353a9ef6ada904fde10d6608
Yoga: 1b1a12ff3d86a10565ea7cbe057d42f5e5fb2a07
Yoga: 98bb9e97562e4ddebe62c532840d70ec9a84b306
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: c3d82494e47e0adce02921f2ed9dba2427f0a9ff
Expand Down
4 changes: 3 additions & 1 deletion scripts/react_native_pods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ def use_react_native! (
fabric_enabled: false,
new_arch_enabled: ENV['RCT_NEW_ARCH_ENABLED'] == '1',
production: ENV['PRODUCTION'] == '1',
hermes_enabled: true,
hermes_enabled: ENV['USE_HERMES'] && ENV['USE_HERMES'] == '0' ? false : true,
flipper_configuration: FlipperConfiguration.disabled,
app_path: '..',
config_file_dir: '')

Pod::UI.puts "USE_HERMES value is: #{ENV['USE_HERMES']}".yellow
Pod::UI.puts "Hermes is enabled: #{hermes_enabled ? "YES" : "NO"}".yellow
CodegenUtils.clean_up_build_folder(app_path, $CODEGEN_OUTPUT_DIR)

fabric_enabled = fabric_enabled || new_arch_enabled
Expand Down

0 comments on commit 959b662

Please sign in to comment.