Add CircleCI tests for use frameworks (#35497)

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

In 0.71.0-RC.2, we had a regression in `use_frameworks!`.

This adds some CircleCI jobs to make sure we do not regress on those. It also updates the template to support these tests.

## Changelog
[iOS][Added] - CircleCI jobs to keep the use_framework! setup in check for the Old Arch

Reviewed By: cortinico

Differential Revision: D41551288

fbshipit-source-id: 531fabb1a7b6aceab2926bb83cf2887129df1776
This commit is contained in:
Riccardo Cipolleschi 2022-11-29 08:53:50 -08:00 коммит произвёл Facebook GitHub Bot
Родитель 3d7b53d456
Коммит 4e8526c829
2 изменённых файлов: 34 добавлений и 0 удалений

Просмотреть файл

@ -817,6 +817,11 @@ jobs:
description: Whether Flipper is enabled. Must be one of "WithFlipper", "WithoutFlipper".
type: enum
enum: ["WithFlipper", "WithoutFlipper"]
use_frameworks:
default: "StaticLibraries"
description: Which kind of option we want to use for `use_frameworks!`
type: enum
enum: ["StaticLibraries", "StaticFrameworks"] #TODO: Add "DynamicFrameworks"
environment:
- PROJECT_NAME: "iOSTemplateProject"
- HERMES_WS_DIR: *hermes_workspace_root
@ -831,6 +836,24 @@ jobs:
steps:
- run:
command: circleci-agent step halt # this interrupts the job successfully.
# use_frameworks! does not works with Flipper enabled
- when:
condition:
and:
- equal: [ << parameters.use_frameworks >>, "StaticFrameworks"]
- equal: [ << parameters.flipper >>, "WithFlipper" ]
steps:
- run:
command: circleci-agent step halt # this interrupts the job successfully.
# use_frameworks! does not works with the New Architecture enabled
- when:
condition:
and:
- equal: [ << parameters.use_frameworks >>, "StaticFrameworks"]
- equal: [ << parameters.architecture >>, "NewArch" ]
steps:
- run:
command: circleci-agent step halt # this interrupts the job successfully.
# Valid configuration, we can continue
- checkout_code_with_cache
- run_yarn
@ -878,6 +901,10 @@ jobs:
export NO_FLIPPER=1
fi
if [[ << parameters.use_frameworks >> == "StaticFrameworks" ]]; then
export USE_FRAMEWORKS=static
fi
bundle exec pod install
- run:
name: Build template project
@ -1565,6 +1592,7 @@ workflows:
flavor: ["Debug", "Release"]
jsengine: ["Hermes", "JSC"]
flipper: ["WithFlipper", "WithoutFlipper"]
use_frameworks: [ "StaticLibraries", "StaticFrameworks" ] #TODO: make it works with DynamicFrameworks
- test_ios_rntester:
requires:
- build_hermes_macos

Просмотреть файл

@ -6,6 +6,12 @@ prepare_react_native_project!
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
linkage = ENV['USE_FRAMEWORKS']
if linkage != nil
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
use_frameworks! :linkage => linkage.to_sym
end
target 'HelloWorld' do
config = use_native_modules!