Skip to content

Commit

Permalink
Update sample app for Firebase 7 and add build test to CI (#6949)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulb777 authored Nov 11, 2020
1 parent 6de9131 commit 5dac2bf
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 9 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/segmentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,19 @@ jobs:
run: |
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSegmentation.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
scripts/third_party/travis/retry.sh scripts/pod_lib_lint.rb FirebaseSegmentation.podspec --platforms=${{ matrix.target }} ${{ matrix.flags }}
segmentation-sample-build-test:
# Don't run on private repo unless it is a PR.
if: (github.repository == 'Firebase/firebase-ios-sdk' && github.event_name == 'schedule') || github.event_name == 'pull_request'
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Setup Bundler
run: scripts/setup_bundler.sh
- name: Install Secret GoogleService-Info.plist
# Just copy a dummy plist for a build-only test
run: cp FirebaseCore/Tests/Unit/Resources/GoogleService-Info.plist FirebaseSegmentation/Tests/Sample/
- name: Prereqs
run: scripts/install_prereqs.sh SegmentationSample iOS
- name: Build
run: scripts/build.sh SegmentationSample iOS
5 changes: 4 additions & 1 deletion FirebaseSegmentation/Tests/Sample/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,13 @@ target 'SegmentationSampleApp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
inherit! :search_paths
platform :ios, '8.0'
platform :ios, '10.0'

# Pods for SegmentationSampleApp
pod 'FirebaseCore', :path => '../../../'
pod 'FirebaseInstallations', :path => '../../../'
pod 'FirebaseSegmentation', :path => '../../../'
pod 'GoogleDataTransport', :path => '../../../'
pod 'GoogleUtilities', :path => '../../../'

end
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@
5B4DE0B022F8D7B300B55A7B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
5B4DE0B222F8D7B300B55A7B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
5B4DE0B322F8D7B300B55A7B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
5B4DE0BA22F8DA1200B55A7B /* SecondApp-GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SecondApp-GoogleService-Info.plist"; sourceTree = "<group>"; };
5B4DE0BB22F8DA1300B55A7B /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
5B4DE0BF22F8E07200B55A7B /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "GoogleService-Info.plist"; path = "../../../../../../configdaily googservice/GoogleService-Info.plist"; sourceTree = "<group>"; };
5B4DE0C222F8E09900B55A7B /* SecondApp-GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SecondApp-GoogleService-Info.plist"; sourceTree = "<group>"; };
5B4DE0C322F8E09900B55A7B /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -72,9 +69,6 @@
isa = PBXGroup;
children = (
5B4DE0BB22F8DA1300B55A7B /* GoogleService-Info.plist */,
5B4DE0C322F8E09900B55A7B /* GoogleService-Info.plist */,
5B4DE0BA22F8DA1200B55A7B /* SecondApp-GoogleService-Info.plist */,
5B4DE0C222F8E09900B55A7B /* SecondApp-GoogleService-Info.plist */,
5B4DE0A322F8D7B100B55A7B /* SegmentationSampleApp */,
5B4DE0A222F8D7B100B55A7B /* Products */,
1DAAA9CDE17A7AD3D4D58BFA /* Pods */,
Expand Down Expand Up @@ -373,7 +367,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.config.testapp.dev;
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.paul.hackweek.nov2020;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "Firebase Remote Config TestApp Dev";
TARGETED_DEVICE_FAMILY = "1,2";
Expand All @@ -392,7 +386,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.config.testapp.dev;
PRODUCT_BUNDLE_IDENTIFIER = com.google.firebase.paul.hackweek.nov2020;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "Firebase Remote Config TestApp Dev";
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down
8 changes: 8 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,14 @@ case "$product-$platform-$method" in
fi
;;

SegmentationSample-*-*)
RunXcodebuild \
-workspace 'FirebaseSegmentation/Tests/Sample/SegmentationSampleApp.xcworkspace' \
-scheme "SegmentationSampleApp" \
"${xcb_flags[@]}" \
build
;;

Database-*-unit)
pod_gen FirebaseDatabase.podspec --platforms="${gen_platform}"
RunXcodebuild \
Expand Down
5 changes: 5 additions & 0 deletions scripts/install_prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,11 @@ case "$project-$platform-$method" in
bundle exec pod install --project-directory=FirebaseRemoteConfig/Tests/Sample --repo-update
;;

SegmentationSample-*)
install_xcpretty
bundle exec pod install --project-directory=FirebaseSegmentation/Tests/Sample --repo-update
;;

GoogleDataTransport-watchOS-xcodebuild)
install_xcpretty
bundle exec pod install --project-directory=GoogleDataTransport/GDTWatchOSTestApp/ --repo-update
Expand Down

0 comments on commit 5dac2bf

Please sign in to comment.