diff --git a/.travis.yml b/.travis.yml index 59f45341dfc..0f9c4943287 100644 --- a/.travis.yml +++ b/.travis.yml @@ -60,7 +60,6 @@ jobs: before_install: - ./scripts/if_changed.sh ./scripts/install_prereqs.sh script: - - ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh GoogleDataLogger.podspec - ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh GoogleUtilities.podspec - ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseCore.podspec - ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseAnalyticsInterop.podspec @@ -114,6 +113,16 @@ 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 + # GoogleDataLogger unit tests and pod linting using the default Xcode version. + - stage: test + env: + - PROJECT=GoogleDataLogger PLATFORM=iOS METHOD=xcodebuild + before_install: + - ./scripts/if_changed.sh ./scripts/install_prereqs.sh + script: + - ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM + - ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh GoogleDataLogger.podspec + # Daily test for symbol collisions between Firebase and CocoaPods. - stage: test env: @@ -180,7 +189,6 @@ jobs: before_install: - ./scripts/if_changed.sh ./scripts/install_prereqs.sh script: - - ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh GoogleDataLogger.podspec - ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh GoogleUtilities.podspec - ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseCore.podspec - ./scripts/if_changed.sh ./scripts/pod_lib_lint.sh FirebaseAnalyticsInterop.podspec diff --git a/Gemfile b/Gemfile index 14b043aabba..2b2cda9cb9e 100644 --- a/Gemfile +++ b/Gemfile @@ -3,4 +3,5 @@ source 'https://rubygems.org' gem 'cocoapods', :git => 'https://github.com/CocoaPods/CocoaPods.git' gem 'cocoapods-core', :git => 'https://github.com/CocoaPods/Core.git' +gem 'cocoapods-generate', :git => 'https://github.com/square/cocoapods-generate' gem 'xcodeproj', :git => 'https://github.com/CocoaPods/Xcodeproj.git' diff --git a/Gemfile.lock b/Gemfile.lock index 4a6b22f88d3..ae82215b945 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -42,6 +42,12 @@ GIT colored2 (~> 3.1) nanaimo (~> 0.2.5) +GIT + remote: https://github.com/square/cocoapods-generate + revision: 46c337129ad97e52049f673e801fe56361660aa9 + specs: + cocoapods-generate (1.3.1) + GEM remote: https://rubygems.org/ specs: @@ -87,7 +93,8 @@ PLATFORMS DEPENDENCIES cocoapods! cocoapods-core! + cocoapods-generate! xcodeproj! BUNDLED WITH - 1.16.1 + 1.17.2 diff --git a/scripts/build.sh b/scripts/build.sh index 3597bf6ede3..e6942221ac3 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -326,6 +326,15 @@ case "$product-$method-$platform" in build ;; + GoogleDataLogger-xcodebuild-iOS) + RunXcodebuild \ + -workspace 'GoogleDataLogger/gen/GoogleDataLogger/GoogleDataLogger.xcworkspace' \ + -scheme "GoogleDataLogger-Unit-Tests" \ + "${xcb_flags[@]}" \ + build \ + test + ;; + *) echo "Don't know how to build this product-platform-method combination" 1>&2 echo " product=$product" 1>&2 diff --git a/scripts/if_changed.sh b/scripts/if_changed.sh index 283bdb3e676..0f86e1373fc 100755 --- a/scripts/if_changed.sh +++ b/scripts/if_changed.sh @@ -66,6 +66,10 @@ else check_changes '^(Firestore/(core|third_party)|cmake)' ;; + GoogleDataLogger-*) + check_changes '^(GoogleDataLogger|GoogleDataLogger.podspec)' + ;; + *) echo "Unknown project-method combo" 1>&2 echo " PROJECT=$PROJECT" 1>&2 diff --git a/scripts/install_prereqs.sh b/scripts/install_prereqs.sh index a0dc1b96c2f..24b6e73f8e6 100755 --- a/scripts/install_prereqs.sh +++ b/scripts/install_prereqs.sh @@ -72,6 +72,10 @@ case "$PROJECT-$PLATFORM-$METHOD" in bundle exec pod install --project-directory=SymbolCollisionTest --repo-update ;; + GoogleDataLogger-iOS-xcodebuild) + gem install xcpretty + bundle exec pod gen GoogleDataLogger.podspec --gen-directory=GoogleDataLogger/gen + ;; *) echo "Unknown project-platform-method combo" 1>&2 echo " PROJECT=$PROJECT" 1>&2