Skip to content

Commit

Permalink
Introduce CI tests to test dynamic frameworks in check (#37272)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #37272

This change enables some tests on RNTester and on the Template to verify that we won't be breaking `use_frameworks!` again in the future.

## Changelog:
[iOS][Added] - Add tests to check use frameworks with dynamic linking.

Reviewed By: cortinico

Differential Revision: D45605977

fbshipit-source-id: 06f05aba427e78a7bb1d8dc835fa83d8550586db
  • Loading branch information
cipolleschi authored and facebook-github-bot committed May 15, 2023
1 parent ce116b6 commit 81e2974
Showing 1 changed file with 16 additions and 37 deletions.
53 changes: 16 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -588,9 +588,6 @@ jobs:
test_ios:
executor: reactnativeios
parameters:
use_frameworks:
type: boolean
default: false
run_unit_tests:
description: Specifies whether unit tests should run.
type: boolean
Expand Down Expand Up @@ -647,13 +644,6 @@ jobs:
name: Configure Watchman
command: echo "{}" > .watchmanconfig

- when:
condition: << parameters.use_frameworks >>
steps:
- run:
name: Set USE_FRAMEWORKS=1
command: echo "export USE_FRAMEWORKS=1" >> $BASH_ENV

- run:
name: Setup the CocoaPods environment
command: |
Expand Down Expand Up @@ -931,6 +921,11 @@ jobs:
description: Which React Native architecture to use. Must be one of "OldArch", "NewArch".
type: enum
enum: ["NewArch", "OldArch"]
use_frameworks:
default: "StaticLibraries"
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "StaticFrameworks", "DynamicFrameworks"
type: enum
enum: ["StaticLibraries", "StaticFrameworks", "DynamicFrameworks"]
ruby_version:
default: "2.6.10"
description: The version of ruby that must be used
Expand Down Expand Up @@ -965,6 +960,16 @@ jobs:
export USE_HERMES=0
fi
if [[ << parameters.use_frameworks >> == "StaticFrameworks" ]]; then
export NO_FLIPPER=1
export USE_FRAMEWORKS=static
fi
if [[ << parameters.use_frameworks >> == "DynamicFrameworks" ]]; then
export NO_FLIPPER=1
export USE_FRAMEWORKS=dynamic
fi
cd packages/rn-tester
bundle install
Expand Down Expand Up @@ -1646,11 +1651,6 @@ workflows:
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Release"
jsengine: "Hermes"
flipper: "WithoutFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Release"
jsengine: "JSC"
Expand All @@ -1666,11 +1666,6 @@ workflows:
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Release"
jsengine: "JSC"
flipper: "WithoutFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "OldArch"
flavor: "Release"
jsengine: "Hermes"
Expand Down Expand Up @@ -1726,21 +1721,11 @@ workflows:
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Debug"
jsengine: "Hermes"
flipper: "WithoutFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Debug"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Debug"
jsengine: "JSC"
flipper: "WithoutFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "OldArch"
flavor: "Debug"
jsengine: "Hermes"
Expand Down Expand Up @@ -1770,6 +1755,7 @@ workflows:
parameters:
architecture: ["NewArch", "OldArch"]
jsengine: ["Hermes", "JSC"]
use_frameworks: ["StaticLibraries", "StaticFrameworks", "DynamicFrameworks"]
- test_ios:
name: "Test iOS with Ruby 2.7.7"
run_unit_tests: true
Expand All @@ -1789,13 +1775,6 @@ workflows:
matrix:
parameters:
jsengine: ["Hermes", "JSC"]
# DISABLED: USE_FRAMEWORKS=1 not supported by Flipper
# - test_ios:
# name: test_ios_frameworks
# use_frameworks: true
# run_unit_tests: true
# requires:
# - build_ios_frameworks
- test_js:
name: test_js_prev_lts
executor: nodeprevlts
Expand Down

0 comments on commit 81e2974

Please sign in to comment.