Skip to content

Commit

Permalink
Test RNTesterPods on CI with use_frameworks! enabled (#25818)
Browse files Browse the repository at this point in the history
Summary:
This adds a `test_ios_frameworks` job to CircleCI to test the `RNTesterPods` project with `use_frameworks!` enabled. It will ensure the issue in #25349 is not reintroduced as suggested in #25619 (comment).

## Changelog

[iOS] [Internal] - Added CircleCI job for testing `RNTesterPods` with `use_frameworks!` enabled.
Pull Request resolved: #25818

Test Plan: Tests seem to be failing on `master` at the moment but you can see that the new job builds successfully [here](https://circleci.com/gh/facebook/react-native/103929?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link). You can confirm it installs the pods with `use_frameworks!` by seeing that `Installing pods with use_frameworks!` is at the start of the log for the `Generate RNTesterPods Workspace` step.

Reviewed By: hramos

Differential Revision: D16495016

Pulled By: fkgozali

fbshipit-source-id: 8ef607cc3a152f599d226f9f45d990fba50a65d4
  • Loading branch information
jtreanor authored and facebook-github-bot committed Jul 25, 2019
1 parent ca9e108 commit bbde55e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
26 changes: 23 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,19 @@ commands:
steps:
type: steps
steps:
- run:
name: Setup CocoaPods cache
# Copy RNTester/Podfile.lock since it can be changed by pod install
command: cp RNTester/Podfile.lock RNTester/Podfile.lock.bak
- restore_cache:
keys:
- v1-pods-{{ checksum "RNTester/Podfile.lock" }}
- v1-pods-
- v1-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "RNTester/Podfile.lock.bak" }}
- v1-pods-{{ .Environment.CIRCLE_JOB }}-
- steps: << parameters.steps >>
- save_cache:
paths:
- RNTester/Pods
key: v1-pods-{{ checksum "RNTester/Podfile.lock" }}
key: v1-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "RNTester/Podfile.lock.bak" }}

download_gradle_dependencies:
steps:
Expand Down Expand Up @@ -301,6 +305,10 @@ jobs:
# Runs unit tests on iOS devices
test_ios:
executor: reactnativeios
parameters:
use_frameworks:
type: boolean
default: false
environment:
- REPORTS_DIR: "./reports"
steps:
Expand All @@ -321,6 +329,13 @@ jobs:
command: |
curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
- when:
condition: << parameters.use_frameworks >>
steps:
- run:
name: Set USE_FRAMEWORKS=1
command: echo "export USE_FRAMEWORKS=1" >> $BASH_ENV

- with_pods_cache_span:
steps:
- run:
Expand Down Expand Up @@ -609,6 +624,11 @@ workflows:
- test_ios:
requires:
- setup_ios
- test_ios:
name: test_ios_frameworks
use_frameworks: true
requires:
- setup_ios
- test_ios_e2e:
requires:
- setup_ios
Expand Down
8 changes: 5 additions & 3 deletions RNTester/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ platform :ios, '9.0'

require_relative '../scripts/autolink-ios'

def pods()
# Uncomment for Swift
# use_frameworks!
if ENV['USE_FRAMEWORKS'] == '1'
puts "Installing pods with use_frameworks!"
use_frameworks!
end

def pods()
project 'RNTesterPods.xcodeproj'

# Enable TurboModule
Expand Down
2 changes: 1 addition & 1 deletion RNTester/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,6 @@ SPEC CHECKSUMS:
ReactCommon: 63d1a6355d5810a21a61efda9ac93804571a1b8b
yoga: b72aa5b3708cc93c5897f8297122d6eba1331e07

PODFILE CHECKSUM: f866eab42001b1d59349bce6b20d00912cdc700c
PODFILE CHECKSUM: 060903e270072f1e192b064848e6c34528af1c87

COCOAPODS: 1.7.1

0 comments on commit bbde55e

Please sign in to comment.