mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Avoid installing Flipper in CI (#33899)
Summary: This PR speeds up the build in CircleCI by avoiding adding Flipper dependency when running in CI. The savings are: * ~ 13/15% for `test_ios` * ~ 30/40% for `test_rntester` * ~50% for `test_ios_template`~ **Edit after review**: We do actually want to have Flipper in the `test_ios_template` to check that it builds correctly. ## Changelog [iOS] [Changed] - Do not add Flipper when running in CI. Pull Request resolved: https://github.com/facebook/react-native/pull/33899 Test Plan: CircleCI passing with these stats: | BEFORE | AFTER | | ---- | ---- | | <img width="663" alt="FlipperCI-Before" src="https://user-images.githubusercontent.com/11162307/170006493-2651b000-0421-47c3-90e9-153474c15a95.png"> | <img width="652" alt="FlipperCI-After" src="https://user-images.githubusercontent.com/11162307/170006557-34e53601-66b4-4054-a156-0e2349f48dc2.png"> | Reviewed By: cortinico Differential Revision: D36625117 Pulled By: cipolleschi fbshipit-source-id: 9de9db27552a7637551cd5bb623b10cb4aebb1eb
This commit is contained in:
committed by
Facebook GitHub Bot
parent
debc32b075
commit
ad76eb368e
@@ -9,6 +9,8 @@ platform :ios, '12.4'
|
||||
install! 'cocoapods', :deterministic_uuids => false
|
||||
|
||||
USE_FRAMEWORKS = ENV['USE_FRAMEWORKS'] == '1'
|
||||
IN_CI = ENV['CI'] == 'true'
|
||||
|
||||
@prefix_path = "../.."
|
||||
|
||||
if USE_FRAMEWORKS
|
||||
@@ -16,7 +18,7 @@ if USE_FRAMEWORKS
|
||||
use_frameworks!
|
||||
end
|
||||
|
||||
def pods(options = {})
|
||||
def pods(options = {}, use_flipper: false)
|
||||
project 'RNTesterPods.xcodeproj'
|
||||
|
||||
fabric_enabled = true
|
||||
@@ -27,12 +29,12 @@ def pods(options = {})
|
||||
# Custom fabric component is only supported when using codegen discovery.
|
||||
pod 'MyNativeView', :path => "NativeComponentExample"
|
||||
end
|
||||
|
||||
|
||||
use_react_native!(
|
||||
path: @prefix_path,
|
||||
fabric_enabled: fabric_enabled,
|
||||
hermes_enabled: hermes_enabled,
|
||||
flipper_configuration: USE_FRAMEWORKS ? FlipperConfiguration.disabled : FlipperConfiguration.enabled,
|
||||
flipper_configuration: use_flipper ? FlipperConfiguration.enabled : FlipperConfiguration.disabled,
|
||||
app_path: "#{Dir.pwd}",
|
||||
config_file_dir: "#{Dir.pwd}/node_modules",
|
||||
production: !ENV['PRODUCTION'].nil?
|
||||
@@ -49,7 +51,7 @@ def pods(options = {})
|
||||
end
|
||||
|
||||
target 'RNTester' do
|
||||
pods()
|
||||
pods({}, :use_flipper => !IN_CI && !USE_FRAMEWORKS)
|
||||
end
|
||||
|
||||
target 'RNTesterUnitTests' do
|
||||
|
||||
Reference in New Issue
Block a user