Skip to content

Commit dbdd973

Browse files
cipolleschikelset
authored andcommitted
Add CircleCI tests for use frameworks (#35497)
Summary: Pull Request resolved: #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
1 parent c8ef846 commit dbdd973

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.circleci/config.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,11 @@ jobs:
831831
description: Whether Flipper is enabled. Must be one of "WithFlipper", "WithoutFlipper".
832832
type: enum
833833
enum: ["WithFlipper", "WithoutFlipper"]
834+
use_frameworks:
835+
default: "StaticLibraries"
836+
description: Which kind of option we want to use for `use_frameworks!`
837+
type: enum
838+
enum: ["StaticLibraries", "StaticFrameworks"] #TODO: Add "DynamicFrameworks"
834839
environment:
835840
- PROJECT_NAME: "iOSTemplateProject"
836841
- HERMES_WS_DIR: *hermes_workspace_root
@@ -845,6 +850,24 @@ jobs:
845850
steps:
846851
- run:
847852
command: circleci-agent step halt # this interrupts the job successfully.
853+
# use_frameworks! does not works with Flipper enabled
854+
- when:
855+
condition:
856+
and:
857+
- equal: [ << parameters.use_frameworks >>, "StaticFrameworks"]
858+
- equal: [ << parameters.flipper >>, "WithFlipper" ]
859+
steps:
860+
- run:
861+
command: circleci-agent step halt # this interrupts the job successfully.
862+
# use_frameworks! does not works with the New Architecture enabled
863+
- when:
864+
condition:
865+
and:
866+
- equal: [ << parameters.use_frameworks >>, "StaticFrameworks"]
867+
- equal: [ << parameters.architecture >>, "NewArch" ]
868+
steps:
869+
- run:
870+
command: circleci-agent step halt # this interrupts the job successfully.
848871
# Valid configuration, we can continue
849872
- checkout_code_with_cache
850873
- run_yarn
@@ -894,6 +917,10 @@ jobs:
894917
export NO_FLIPPER=1
895918
fi
896919
920+
if [[ << parameters.use_frameworks >> == "StaticFrameworks" ]]; then
921+
export USE_FRAMEWORKS=static
922+
fi
923+
897924
bundle exec pod install
898925
- run:
899926
name: Build template project
@@ -1581,6 +1608,7 @@ workflows:
15811608
flavor: ["Debug", "Release"]
15821609
jsengine: ["Hermes", "JSC"]
15831610
flipper: ["WithFlipper", "WithoutFlipper"]
1611+
use_frameworks: [ "StaticLibraries", "StaticFrameworks" ] #TODO: make it works with DynamicFrameworks
15841612
- test_ios_rntester:
15851613
requires:
15861614
- build_hermes_macos

template/ios/Podfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ prepare_react_native_project!
66

77
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
88

9+
linkage = ENV['USE_FRAMEWORKS']
10+
if linkage != nil
11+
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
12+
use_frameworks! :linkage => linkage.to_sym
13+
end
14+
915
target 'HelloWorld' do
1016
config = use_native_modules!
1117

0 commit comments

Comments
 (0)