-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add Travis CI builds for PRs? #207
Comments
I've started on this in #203 but there's a test that's failing only in Travis that I haven't had a chance to look at. If you're keen to look at that then we'd be set :D You can also fork the repo and enable Travis for your fork while you develop, which is what I did. |
@markmcd Thanks, didn't know you could enable Travis on forks. I'll see if I can take a look. |
So I think the issue is that you need to run the Google APIs emulator image on Travis to access Google Play Services. The names of these images also changed earlier this year - see my post on SO here: I just pushed an attempt to fix this in this branch: We'll see what happens... |
Well, no luck this time - the emulator startup is timing out. This should be close, though. I'll see if I can do trial-and-error a bit more... |
So I have a working version of API 21 with the Google API emulator here: I'm going to see if I can get a version of this working with API 23. |
Here's the latest branch I'm working on: This has the Google API emulator starting and the build executing - see this Travis build. However, it fails with:
Usually this means ADB timed out: The fix for this is normally to increase ADB timeout via the Travis variable However, I've bumped it up to 15 min so far and I'm still getting the same exception on Travis. Also, not sure if its related to these issues, but I did find this open AOSP issue saying that Google Play Services is broken on the Google API emulator starting with API Level 22. It's been triaged but is still open, so the same issue may exist on API Level 23 emulator. |
I'm starting to wonder if this is an emulator issue - I spun up the When I ran the tests from Android Studio, they were very slow (240s total) - I also saw this while they were running: However, given enough time, the tests did eventually pass when run from Android Studio. If it takes this long on my work machine, Travis is going to be far longer than that, so the slowness is certainly contributing to the problem. I wonder if the API Level 23 Google API emulator takes longer to boot than the past versions. There still seems to be something else going on, though - I then went back and tried to run the tests from the command line again - and again I got @markmcd @broady Do you know if anything changed with API Level 23 Google API emulator that would prevent Gradle from installing/running from the command-line with |
I'm not sure. It would be very bad if the Android team broke that. @jfschmakeit any thoughts/knowledge? |
Also, looks like |
Yeah, seems something is up with the API 23 Google API emulator image. I finally (!) got a successful Travis build (I was missing one piece - ...but I had to revert back to API 21 Google APIs emulator image. The exact same setup on API 23 Google APIs image fails (on Travis and locally) with the Here's the commit that's the difference between the two versions: Unless I'm missing something, until the issue with the API 23 Google API emulator is resolved, our only option for running tests on Travis CI would be to revert the project to using @markmcd @broady Thoughts? If that works for you I can see if I can trim down the |
As discussed in googlemaps#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.)
As discussed in googlemaps#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.)
As discussed in googlemaps#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.)
I went ahead and opened a PR here for the working Travis configuration: |
I posted an SO question here on the issues with the API Level 23 Google API emulator: |
FYI - I've opened an AOSP issue here on the API 23 Google API emulator image gradle command failures: |
For the record, looks like this hard-coded timeout value is the underlying issue of why the API 23 Google API emulator image Gradle commands are failing: |
IMHO adding Travis CI support to this project would be helpful - it would help reveal issues like #187 immediately, rather than having to track down their cause later.
@broady @markmcd Thoughts?
If you're willing to turn on Travis support for this project in the Travis CI console, I'd be willing to try configure the
.travis.yml
script. I've done this on many Android apps, but never on a library before, and its always good to learn new things :).The text was updated successfully, but these errors were encountered: