Skip to content

Commit 5dac2bf

Browse files
authored
Update sample app for Firebase 7 and add build test to CI (#6949)
1 parent 6de9131 commit 5dac2bf

File tree

5 files changed

+35
-9
lines changed

5 files changed

+35
-9
lines changed

.github/workflows/segmentation.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,19 @@ jobs:
6161
run: |
6262
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSegmentation.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
6363
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSegmentation.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
64+
65+
segmentation-sample-build-test:
66+
# Don't run on private repo unless it is a PR.
67+
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
68+
runs-on: macos-latest
69+
steps:
70+
- uses: actions/checkout@v2
71+
- name: Setup Bundler
72+
run: scripts/setup_bundler.sh
73+
- name: Install Secret GoogleService-Info.plist
74+
# Just copy a dummy plist for a build-only test
75+
run: cp FirebaseCore/Tests/Unit/Resources/GoogleService-Info.plist FirebaseSegmentation/Tests/Sample/
76+
- name: Prereqs
77+
run: scripts/install_prereqs.sh SegmentationSample iOS
78+
- name: Build
79+
run: scripts/build.sh SegmentationSample iOS

FirebaseSegmentation/Tests/Sample/Podfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ target 'SegmentationSampleApp' do
66
# Comment the next line if you don't want to use dynamic frameworks
77
use_frameworks!
88
inherit! :search_paths
9-
platform :ios, '8.0'
9+
platform :ios, '10.0'
1010

1111
# Pods for SegmentationSampleApp
1212
pod 'FirebaseCore', :path => '../../../'
13+
pod 'FirebaseInstallations', :path => '../../../'
1314
pod 'FirebaseSegmentation', :path => '../../../'
15+
pod 'GoogleDataTransport', :path => '../../../'
16+
pod 'GoogleUtilities', :path => '../../../'
1417

1518
end

FirebaseSegmentation/Tests/Sample/SegmentationSampleApp.xcodeproj/project.pbxproj

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@
3131
5B4DE0B022F8D7B300B55A7B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
3232
5B4DE0B222F8D7B300B55A7B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3333
5B4DE0B322F8D7B300B55A7B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
34-
5B4DE0BA22F8DA1200B55A7B /* SecondApp-GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SecondApp-GoogleService-Info.plist"; sourceTree = "<group>"; };
3534
5B4DE0BB22F8DA1300B55A7B /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
3635
5B4DE0BF22F8E07200B55A7B /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../../../configdaily googservice/GoogleService-Info.plist"; sourceTree = "<group>"; };
37-
5B4DE0C222F8E09900B55A7B /* SecondApp-GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SecondApp-GoogleService-Info.plist"; sourceTree = "<group>"; };
38-
5B4DE0C322F8E09900B55A7B /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
3936
/* End PBXFileReference section */
4037

4138
/* Begin PBXFrameworksBuildPhase section */
@@ -72,9 +69,6 @@
7269
isa = PBXGroup;
7370
children = (
7471
5B4DE0BB22F8DA1300B55A7B /* GoogleService-Info.plist */,
75-
5B4DE0C322F8E09900B55A7B /* GoogleService-Info.plist */,
76-
5B4DE0BA22F8DA1200B55A7B /* SecondApp-GoogleService-Info.plist */,
77-
5B4DE0C222F8E09900B55A7B /* SecondApp-GoogleService-Info.plist */,
7872
5B4DE0A322F8D7B100B55A7B /* SegmentationSampleApp */,
7973
5B4DE0A222F8D7B100B55A7B /* Products */,
8074
1DAAA9CDE17A7AD3D4D58BFA /* Pods */,
@@ -373,7 +367,7 @@
373367
"$(inherited)",
374368
"@executable_path/Frameworks",
375369
);
376-
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.config.testapp.dev;
370+
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.paul.hackweek.nov2020;
377371
PRODUCT_NAME = "$(TARGET_NAME)";
378372
PROVISIONING_PROFILE_SPECIFIER = "Firebase Remote Config TestApp Dev";
379373
TARGETED_DEVICE_FAMILY = "1,2";
@@ -392,7 +386,7 @@
392386
"$(inherited)",
393387
"@executable_path/Frameworks",
394388
);
395-
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.config.testapp.dev;
389+
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.paul.hackweek.nov2020;
396390
PRODUCT_NAME = "$(TARGET_NAME)";
397391
PROVISIONING_PROFILE_SPECIFIER = "Firebase Remote Config TestApp Dev";
398392
TARGETED_DEVICE_FAMILY = "1,2";

scripts/build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,14 @@ case "$product-$platform-$method" in
394394
fi
395395
;;
396396

397+
SegmentationSample-*-*)
398+
RunXcodebuild \
399+
-workspace 'FirebaseSegmentation/Tests/Sample/SegmentationSampleApp.xcworkspace' \
400+
-scheme "SegmentationSampleApp" \
401+
"${xcb_flags[@]}" \
402+
build
403+
;;
404+
397405
Database-*-unit)
398406
pod_gen FirebaseDatabase.podspec --platforms="${gen_platform}"
399407
RunXcodebuild \

scripts/install_prereqs.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ case "$project-$platform-$method" in
144144
bundle exec pod install --project-directory=FirebaseRemoteConfig/Tests/Sample --repo-update
145145
;;
146146

147+
SegmentationSample-*)
148+
install_xcpretty
149+
bundle exec pod install --project-directory=FirebaseSegmentation/Tests/Sample --repo-update
150+
;;
151+
147152
GoogleDataTransport-watchOS-xcodebuild)
148153
install_xcpretty
149154
bundle exec pod install --project-directory=GoogleDataTransport/GDTWatchOSTestApp/ --repo-update

0 commit comments

Comments
 (0)