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 7 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
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ jobs:
script:
- ./scripts/if_changed.sh ./scripts/build.sh $PROJECT $PLATFORM $METHOD

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

# pod lib lint to check build and warnings for dynamic framework build (use_frameworks!)
- stage: test
env:
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