Skip to content

Commit

Permalink
Automate iOS release (facebook#445)
Browse files Browse the repository at this point in the history
Summary:
This PR sets up Circle CI to publish pods when github release is made. This PR also updates the Flipper-Folly pod as it didn't build on 32 bit architecture, because `thread_local` was not supported.

Automated publish of cocoapods through Circle CI.
Pull Request resolved: facebook#445

Reviewed By: danielbuechele

Differential Revision: D15333975

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 7db68efeeebbe344213917f10f9f3ce4132e8cbc
  • Loading branch information
priteshrnandgaonkar authored and facebook-github-bot committed May 14, 2019
1 parent 3086a72 commit 07f327f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
25 changes: 24 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
command: |
yes | sdkmanager "platforms;android-27" || true
./gradlew :android:assembleRelease && scripts/publish-android-snapshot.sh
release:
executor: default-executor
docker:
Expand All @@ -32,6 +31,24 @@ jobs:
command: |
yes | sdkmanager "platforms;android-27" || true
./gradlew :android:assembleRelease && scripts/publish-android-release.sh
publish-pods:
macos:
xcode: "10.2.1"
steps:
- checkout
- run: curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
- run:
name: "Pod version"
command: |
pod --version
- run:
name: "Push Flipper Pod"
command: |
pod trunk push ./Flipper.podspec --use-libraries --allow-warnings --verbose --skip-import-validation
- run:
name: "Push FlipperKit Pod"
command: |
pod trunk push ./FlipperKit.podspec --use-libraries --allow-warnings --verbose --skip-import-validation --swift-version=4.2
workflows:
version: 2
Expand All @@ -47,3 +64,9 @@ workflows:
only: /^v.*/
branches:
ignore: /.*/
- publish-pods:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
3 changes: 2 additions & 1 deletion Flipper.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ Pod::Spec.new do |spec|
spec.public_header_files = 'xplat/Flipper/*.h','xplat/utils/*.h'
spec.source_files = 'xplat/Flipper/*.{h,cpp,m,mm}','xplat/Flipper/utils/*.{h,cpp,m,mm}'
spec.libraries = "stdc++"
spec.dependency 'Flipper-Folly', '1.3.0'
spec.dependency 'Flipper-Folly', '~> 1.3'
spec.dependency 'Flipper-RSocket', '0.10.4'
spec.compiler_flags = '-DFLIPPER_OSS=1 -DFB_SONARKIT_ENABLED=1 -DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DFOLLY_HAVE_LIBGFLAGS=0 -DFOLLY_HAVE_LIBJEMALLOC=0 -DFOLLY_HAVE_PREADV=0 -DFOLLY_HAVE_PWRITEV=0 -DFOLLY_HAVE_TFO=0 -DFOLLY_USE_SYMBOLIZER=0 -Wall
-std=c++14
-Wno-global-constructors'
spec.platforms = { :ios => "8.0" }
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
"ARCHS" => "${ARCHS_STANDARD_64_BIT}",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Flipper-RSocket\" \"$(PODS_ROOT)/DoubleConversion\"" }
end
2 changes: 1 addition & 1 deletion FlipperKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Pod::Spec.new do |spec|
spec.subspec 'FBCxxUtils' do |ss|
ss.header_dir = 'FBCxxUtils'
ss.compiler_flags = folly_compiler_flags
ss.dependency 'Flipper-Folly', '1.3.0'
ss.dependency 'Flipper-Folly', '~> 1.3'
ss.source_files = 'iOS/FlipperKit/FBCxxUtils/**/*.{h,mm}'
# We set these files as private headers since they only need to be accessed
# by other FlipperKit source files
Expand Down
10 changes: 5 additions & 5 deletions iOS/Podspecs/Flipper-Folly.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'Flipper-Folly'
spec.version = '1.3.0'
spec.version = '1.3.4'
spec.license = { :type => 'Apache License, Version 2.0' }
spec.homepage = 'https://github.com/facebook/folly'
spec.summary = 'An open-source C++ library developed and used at Facebook.'
Expand Down Expand Up @@ -152,10 +152,10 @@ Pod::Spec.new do |spec|
"folly/futures/*.h",
"folly/futures/detail/*.h"

spec.pod_target_xcconfig = { "USE_HEADERMAP": "NO",
"ONLY_ACTIVE_ARCH": "YES",
"CLANG_CXX_LANGUAGE_STANDARD": "c++11",
"HEADER_SEARCH_PATHS": "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\""
spec.pod_target_xcconfig = { "USE_HEADERMAP" => "NO",
"ARCHS" => "${ARCHS_STANDARD_64_BIT}",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++11",
"HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\""
}
# Pinning to the same version as React.podspec.
spec.platforms = { :ios => "8.0"}
Expand Down

0 comments on commit 07f327f

Please sign in to comment.