Skip to content

Add a travis cron job for CocoaPod symbol collision testing #2154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Dec 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,15 @@ jobs:
# The travis_wait is necessary because the command takes more than 10 minutes.
- travis_wait ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseFirestore.podspec --use-libraries --allow-warnings --no-subspecs

# Daily test for symbol collisions between Firebase and CocoaPods.
- stage: test
env:
- PROJECT=SymbolCollision PLATFORM=iOS METHOD=xcodebuild
before_install:
- ./scripts/if_cron.sh ./scripts/install_prereqs.sh
script:
- ./scripts/if_cron.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD

# Alternative platforms

# Xcode 9
Expand Down
4 changes: 4 additions & 0 deletions Releases/update-versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,15 @@ def UpdatePodfiles(git_root, version):
"""
firebase_podfile = os.path.join(git_root, 'Example', 'Podfile')
firestore_podfile = os.path.join(git_root, 'Firestore', 'Example', 'Podfile')
collision_podfile = os.path.join(git_root, 'SymbolCollisionTest', 'Podfile')

sed_command = ("sed -i.bak -e \"s#\\(pod "
"'Firebase/CoreOnly',[[:space:]]*'\\).*'#\\1{}'#\" {}")
os.system(sed_command.format(version, firebase_podfile))
os.system(sed_command.format(version, firestore_podfile))
sed_command = ("sed -i.bak -e \"s#\\(pod "
"'Firebase',[[:space:]]*'\\).*'#\\1{}'#\" {}")
os.system(sed_command.format(version, collision_podfile))


def UpdateTags(version_data, firebase_version, first=False):
Expand Down
73 changes: 73 additions & 0 deletions SymbolCollisionTest/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'SymbolCollisionTest' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!

# Firebase Pods
pod 'Firebase', '5.14.0'
pod 'FirebaseAnalytics'
pod 'FirebaseAuth'
pod 'FirebaseCore'
pod 'FirebaseCrash'
pod 'FirebaseDatabase'
pod 'FirebaseDynamicLinks'
pod 'FirebaseFirestore'
pod 'FirebaseFunctions'
pod 'FirebaseInAppMessaging'
pod 'FirebaseInstanceID'
pod 'FirebaseMessaging'
pod 'FirebaseMLCommon'
pod 'FirebaseMLModelInterpreter'
pod 'FirebaseMLVision'
pod 'FirebaseMLVisionBarcodeModel'
pod 'FirebaseMLVisionFaceModel'
pod 'FirebaseMLVisionLabelModel'
pod 'FirebaseMLVisionTextModel'
pod 'FirebasePerformance'
pod 'FirebaseRemoteConfig'
pod 'FirebaseStorage'
# pod 'FirebaseUI'. - requires use_frameworks!

# Other Google Pods
# pod 'Blockly' This is a Swift Pod and requires usage of use_frameworks!
pod 'Crashlytics'
pod 'DigitsMigrationHelper'
pod 'EarlGrey'
pod 'GeoFire'
pod 'google-cast-sdk'
pod 'Google-Mobile-Ads-SDK'
pod 'GoogleAnalytics'
pod 'GoogleAppIndexing'
pod 'GoogleAppUtilities'
pod 'GoogleAuthUtilities'
pod 'GoogleConversionTracking'
pod 'GoogleIDFASupport'
pod 'GoogleInterchangeUtilities'
pod 'GoogleMaps'
pod 'GoogleMobileVision'
pod 'GoogleNetworkingUtilities'
pod 'GoogleParsingUtilities'
pod 'GooglePlacePicker'
pod 'GooglePlaces'
pod 'GooglePlusUtilities'
pod 'GoogleSignIn'
pod 'GoogleSymbolUtilities'
pod 'GoogleTagManager'
pod 'GoogleToolboxForMac'
pod 'GoogleUtilities'
pod 'GTMAppAuth'
# pod 'GTMHTTPFetcher' - conflicts with GTMSessionFetcher
pod 'GTMSessionFetcher'
pod 'GVRSDK'
pod 'leveldb-library'
# pod 'MDFTextAccessibility' - conflicts with GVRSDK
pod 'nanopb'
# pod 'NearbyMessages' # - conflicts with google-cast-sdk
pod 'Protobuf'
pod 'TensorFlow-experimental'

# Non-Google Pods

end
32 changes: 32 additions & 0 deletions SymbolCollisionTest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Symbol Collision Tests

## Introduction

This directory provides a project that is used to test a set of CocoaPods for symbol
collisions daily. It's controlled by the cron functionality in
[.travis.ml](../.travis.yml).

## Run Locally

* `git clone [email protected]:firebase/firebase-ios-sdk.git`
* `cd firebase-ios-sdk/SymbolCollisionTest`
* Optionally make any changes to the Podfile
* `pod install`
* `open SymbolCollisionTest.xcworkspace`
* Build

## Contributing

If you'd like to add a CocoaPod to the tests, add it to the
[Podfile](Podfile), test that it builds locally and then send a PR.

## Future

Currently the tests primarily test static libraries and static frameworks.
`use_frameworks!` and
[`use_module_headers!`](http://blog.cocoapods.org/CocoaPods-1.5.0/) can be
added for better dynamic library and Swift pod testing.

Currently, this is testing released CocoaPods. It could be changed to support
pre-releases by changing the Podfile to point to source pods and/or setting up
a public staging Specs repo and adding a `source` in the Podfile.
Loading