Skip to content

Commit 522f012

Browse files
authored
Add a travis cron job for CocoaPod symbol collision testing (#2154)
1 parent 2c9f881 commit 522f012

File tree

17 files changed

+821
-0
lines changed

17 files changed

+821
-0
lines changed

.travis.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ jobs:
112112
# The travis_wait is necessary because the command takes more than 10 minutes.
113113
- travis_wait ./scripts/if_cron.sh ./scripts/pod_lib_lint.sh FirebaseFirestore.podspec --use-libraries --allow-warnings --no-subspecs
114114

115+
# Daily test for symbol collisions between Firebase and CocoaPods.
116+
- stage: test
117+
env:
118+
- PROJECT=SymbolCollision PLATFORM=iOS METHOD=xcodebuild
119+
before_install:
120+
- ./scripts/if_cron.sh ./scripts/install_prereqs.sh
121+
script:
122+
- ./scripts/if_cron.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD
123+
115124
# Alternative platforms
116125

117126
# Xcode 9

Releases/update-versions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,15 @@ def UpdatePodfiles(git_root, version):
158158
"""
159159
firebase_podfile = os.path.join(git_root, 'Example', 'Podfile')
160160
firestore_podfile = os.path.join(git_root, 'Firestore', 'Example', 'Podfile')
161+
collision_podfile = os.path.join(git_root, 'SymbolCollisionTest', 'Podfile')
161162

162163
sed_command = ("sed -i.bak -e \"s#\\(pod "
163164
"'Firebase/CoreOnly',[[:space:]]*'\\).*'#\\1{}'#\" {}")
164165
os.system(sed_command.format(version, firebase_podfile))
165166
os.system(sed_command.format(version, firestore_podfile))
167+
sed_command = ("sed -i.bak -e \"s#\\(pod "
168+
"'Firebase',[[:space:]]*'\\).*'#\\1{}'#\" {}")
169+
os.system(sed_command.format(version, collision_podfile))
166170

167171

168172
def UpdateTags(version_data, firebase_version, first=False):

SymbolCollisionTest/Podfile

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Uncomment the next line to define a global platform for your project
2+
# platform :ios, '9.0'
3+
4+
target 'SymbolCollisionTest' do
5+
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
6+
# use_frameworks!
7+
8+
# Firebase Pods
9+
pod 'Firebase', '5.14.0'
10+
pod 'FirebaseAnalytics'
11+
pod 'FirebaseAuth'
12+
pod 'FirebaseCore'
13+
pod 'FirebaseCrash'
14+
pod 'FirebaseDatabase'
15+
pod 'FirebaseDynamicLinks'
16+
pod 'FirebaseFirestore'
17+
pod 'FirebaseFunctions'
18+
pod 'FirebaseInAppMessaging'
19+
pod 'FirebaseInstanceID'
20+
pod 'FirebaseMessaging'
21+
pod 'FirebaseMLCommon'
22+
pod 'FirebaseMLModelInterpreter'
23+
pod 'FirebaseMLVision'
24+
pod 'FirebaseMLVisionBarcodeModel'
25+
pod 'FirebaseMLVisionFaceModel'
26+
pod 'FirebaseMLVisionLabelModel'
27+
pod 'FirebaseMLVisionTextModel'
28+
pod 'FirebasePerformance'
29+
pod 'FirebaseRemoteConfig'
30+
pod 'FirebaseStorage'
31+
# pod 'FirebaseUI'. - requires use_frameworks!
32+
33+
# Other Google Pods
34+
# pod 'Blockly' This is a Swift Pod and requires usage of use_frameworks!
35+
pod 'Crashlytics'
36+
pod 'DigitsMigrationHelper'
37+
pod 'EarlGrey'
38+
pod 'GeoFire'
39+
pod 'google-cast-sdk'
40+
pod 'Google-Mobile-Ads-SDK'
41+
pod 'GoogleAnalytics'
42+
pod 'GoogleAppIndexing'
43+
pod 'GoogleAppUtilities'
44+
pod 'GoogleAuthUtilities'
45+
pod 'GoogleConversionTracking'
46+
pod 'GoogleIDFASupport'
47+
pod 'GoogleInterchangeUtilities'
48+
pod 'GoogleMaps'
49+
pod 'GoogleMobileVision'
50+
pod 'GoogleNetworkingUtilities'
51+
pod 'GoogleParsingUtilities'
52+
pod 'GooglePlacePicker'
53+
pod 'GooglePlaces'
54+
pod 'GooglePlusUtilities'
55+
pod 'GoogleSignIn'
56+
pod 'GoogleSymbolUtilities'
57+
pod 'GoogleTagManager'
58+
pod 'GoogleToolboxForMac'
59+
pod 'GoogleUtilities'
60+
pod 'GTMAppAuth'
61+
# pod 'GTMHTTPFetcher' - conflicts with GTMSessionFetcher
62+
pod 'GTMSessionFetcher'
63+
pod 'GVRSDK'
64+
pod 'leveldb-library'
65+
# pod 'MDFTextAccessibility' - conflicts with GVRSDK
66+
pod 'nanopb'
67+
# pod 'NearbyMessages' # - conflicts with google-cast-sdk
68+
pod 'Protobuf'
69+
pod 'TensorFlow-experimental'
70+
71+
# Non-Google Pods
72+
73+
end

SymbolCollisionTest/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Symbol Collision Tests
2+
3+
## Introduction
4+
5+
This directory provides a project that is used to test a set of CocoaPods for symbol
6+
collisions daily. It's controlled by the cron functionality in
7+
[.travis.ml](../.travis.yml).
8+
9+
## Run Locally
10+
11+
* `git clone [email protected]:firebase/firebase-ios-sdk.git`
12+
* `cd firebase-ios-sdk/SymbolCollisionTest`
13+
* Optionally make any changes to the Podfile
14+
* `pod install`
15+
* `open SymbolCollisionTest.xcworkspace`
16+
* Build
17+
18+
## Contributing
19+
20+
If you'd like to add a CocoaPod to the tests, add it to the
21+
[Podfile](Podfile), test that it builds locally and then send a PR.
22+
23+
## Future
24+
25+
Currently the tests primarily test static libraries and static frameworks.
26+
`use_frameworks!` and
27+
[`use_module_headers!`](http://blog.cocoapods.org/CocoaPods-1.5.0/) can be
28+
added for better dynamic library and Swift pod testing.
29+
30+
Currently, this is testing released CocoaPods. It could be changed to support
31+
pre-releases by changing the Podfile to point to source pods and/or setting up
32+
a public staging Specs repo and adding a `source` in the Podfile.

0 commit comments

Comments
 (0)