Skip to content
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

Fix #207 - Add Travis CI support #209

Merged
merged 1 commit into from
Oct 7, 2015
Merged

Conversation

barbeau
Copy link
Collaborator

@barbeau barbeau commented Oct 5, 2015

As discussed in #207 (comment), requires changing to compileSdkVersion "Google Inc.:Google APIs:21", because:
a) Google API emulator image is needed to run tests that require Google Play Services (see https://developers.google.com/android/guides/setup)
b) the Google API Level 23 emulator seems to have a bug that doesn't allow installing/running tests from the command line

This patch also adds a command-line option to disable pre-dexing, which is used on Travis to decrease build times (see http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance.)

See below comment for revised PR contents, based on comments on the initial commit.

@@ -18,7 +18,7 @@ dependencies {
}

android {
compileSdkVersion 23
compileSdkVersion "Google Inc.:Google APIs:21"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I'd prefer to keep this on the latest API level. Can you set it to '23' here and override these when it's run through Travis?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that's possible, although I've never configured that setup before. Are you able to see if anyone on the Android team can explain why the API 23 Google API emulator isn't working with gradle commands?

http://stackoverflow.com/questions/32952413/gradle-commands-fail-on-api-23-google-api-emulator-image-armeabi-v7a

If the emulator issue isn't something that's going to be fixed anytime soon I can look into running on API 21 only on Travis.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I figured out a way to get this to run on API 21 emulator via the travis script itself. I'll force-push a new commit into this PR that keeps the project compileSdkVersion 23 while running on the API Level 21 Google API emulator.

* This patch keeps the project at `compileSdkVersion 23` while running on the API Level 21 Google API emulator on Travis, because:
 a) Google API emulator image is needed to run tests that require Google Play Services (see https://developers.google.com/android/guides/setup, googlemaps#203 (comment))
 b) API Level 23 Google API emulator seems to have a bug preventing use on Travis - see googlemaps#207 (comment)
* When the issue with the API Level 23 Google API emulator is resolved, the `EMULATOR_API_LEVEL` variable in .travis.yml can be bumped to 23 as well.
* This patch also adds a command-line option to disable pre-dexing, which is used on Travis to decrease build times (see http://tools.android.com/tech-docs/new-build-system/tips#TOC-Improving-Build-Server-performance.)
@barbeau
Copy link
Collaborator Author

barbeau commented Oct 6, 2015

@markmcd Ok, I just force-pushed a new commit into this PR to replace the old one. Here is the new PR/commit description:

This is a much better solution, as it doesn't alter the project build config at all, but still allows it to run on Travis.

@barbeau
Copy link
Collaborator Author

barbeau commented Oct 6, 2015

Well, hold that thought...For some reason this is failing now, even though what should be the exact same config passed earlier. Will update again shortly...

@barbeau
Copy link
Collaborator Author

barbeau commented Oct 6, 2015

I think this should be ok to merge. Seems Travis had an existential crisis in the middle of the initial build of this branch. It initially failed, and when I tried to restart, it seems like its hanging indefinitely in the "created" state but refuses to start. I created a new branch from the exact same commit, and this passes on Travis.

So, this should be ready for review/merge.

@markmcd
Copy link
Contributor

markmcd commented Oct 7, 2015

LGTM

markmcd added a commit that referenced this pull request Oct 7, 2015
@markmcd markmcd merged commit e24a136 into googlemaps:master Oct 7, 2015
@markmcd
Copy link
Contributor

markmcd commented Oct 7, 2015

Oh - and thanks again for doing this! It's huge 👍

@barbeau
Copy link
Collaborator Author

barbeau commented Oct 8, 2015

No prob! :) Thanks for the review/merge.

@barbeau barbeau deleted the travis-rebase branch October 15, 2015 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants