Skip to content

Enable travis for GoogleDataLogger using cocoapods-generate #2185

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 8 commits into from
Dec 14, 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
12 changes: 10 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
9 changes: 8 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -87,7 +93,8 @@ PLATFORMS
DEPENDENCIES
cocoapods!
cocoapods-core!
cocoapods-generate!
xcodeproj!

BUNDLED WITH
1.16.1
1.17.2
9 changes: 9 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions scripts/if_changed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions scripts/install_prereqs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down