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

Setup Travis continuous integration. #686

Merged
merged 1 commit into from Sep 18, 2015

Conversation

schildbach
Copy link
Contributor

To enable it, all the mapsforge account owner needs to do it log in on https://travis-ci.org and flip the enable switch for the mapsforge repository.

In a future update, we could add other forms of notifications. Currently, it notifies via GitHub (very convenient!) and I think email.

A preview can be seen on my account: https://travis-ci.org/schildbach/mapsforge
If you want to try out how pull requests work, just open a PR against my GitHub repo and you'll see the Travis integration.

@devemux86
Copy link
Collaborator

We'd like to see if we need to include another CI system (besides Jenkins) in our list.

Examining the Travis file, does it manage that Mapsforge is a multi-language project (Android, Java) with branches based on different Android SDK versions (22, 23) ?

@schildbach
Copy link
Contributor Author

I didn't even know Jenkins exists, because it didn't amend the GitHub pull requests. Anyway, as you can see Travis is extremely easy to set up and in my experience works much more reliable than Jenkins. The downside (or upside, depending on your priorities) is it's mainly a hosted service.

If a branch uses a different Android SDK you need to change the "- android-22" line on that branch as well.
If you need both SDKs on the same branch then you can also include a second line "- android-23", so you would have both available.

@applantation
Copy link
Collaborator

Yes, why should we do this? What is the advantage over jenkins?

I hate to say this, but I do not even have the time to look at travis.

I am not principally opposed, but just no time....

On 17 September 2015 at 20:12, Emux notifications@github.com wrote:

We'd like to see if we need to include another CI system (besides Jenkins)
in our list.

Examining the Travis file, does it manage that Mapsforge is a
multi-language project (Android, Java) with branches based on different
Android SDK versions (22, 23) ?


Reply to this email directly or view it on GitHub
#686 (comment).

@devemux86
Copy link
Collaborator

Travis is a hosted CI attached to GitHub and can help on PR test quality.
We can examine it, but in time and via testing it.

So I'd propose to skip the PR for now.
We need to check it accordingly first, probably putting our own settings in the process.

@schildbach
Copy link
Contributor Author

This PR is agnostic of the specific GitHub repository, as long as it's a fork of mapsforge. It works as is on my repo, as it would on any of yours, including the official one. So you can try it on a personal GitHub repo if you want. Just flip the switch on Travis.

mapsforge added a commit that referenced this pull request Sep 18, 2015
Setup Travis continuous integration.
@mapsforge mapsforge merged commit f61a413 into mapsforge:dev Sep 18, 2015
@schildbach
Copy link
Contributor Author

Thanks for merging. I'm sure it will make developer live easier.

@devemux86
Copy link
Collaborator

👍

@schildbach schildbach deleted the setup-travis branch September 18, 2015 10:56
@ludwigb
Copy link
Collaborator

ludwigb commented Sep 18, 2015

Just playing with it, setup was easy enough.

Does this give us downloadable libraries somewhere like we have on
ci.mapsforge.org for all our builds and releases?

On 18 September 2015 at 18:53, Emux notifications@github.com wrote:

[image: 👍]


Reply to this email directly or view it on GitHub
#686 (comment).

@devemux86
Copy link
Collaborator

I think we should add also oraclejdk7.

@schildbach
Copy link
Contributor Author

@ludwigb I believe yes, but it needs to be configured. I can have a look at it if you want. E.g. for tags I'd try this setup: http://docs.travis-ci.com/user/deployment/releases/

@devemux86
Copy link
Collaborator

Also in language put also java.
And set android-23 as dev is based on that.

@schildbach
Copy link
Contributor Author

You can only have one language. "android" is a superset of" java".

@schildbach schildbach restored the setup-travis branch September 18, 2015 11:05
@schildbach
Copy link
Contributor Author

The sample app has android:targetSdkVersion="22" in its AndroidManifest.xml.

@devemux86
Copy link
Collaborator

Target was set that way to avoid the new permissions model.
Compile version for dev is 23 and master 22.

@schildbach
Copy link
Contributor Author

I believe we can add oraclejdk7, then it will build on both JDKs.

@schildbach
Copy link
Contributor Author

According to Google, you can't avoid the new permission system like that. But anyway, I'll update travis.

@devemux86
Copy link
Collaborator

According to Google, you can't avoid the new permission system like that.

Can you post a link?
We thought differently: "Only apps designed to work with the Android M SDK (API level 23) will use the new permission system. App developers can stick to the old system, as long as they target API level 22 (Android 5.1) or earlier."

We just postpone the Samples modification to check permissions in code.
(conversation here)

@devemux86 devemux86 added this to the 0.5.3 milestone Sep 18, 2015
@schildbach
Copy link
Contributor Author

I could not find the reference to Marshmallow. I believe the project.properties files are not used any more for gradle builds. In fact, if the build would reference Marshmellow it should fail, but it doesn't.

(It's still good to have the project.properties files for Eclipse though.)

@schildbach
Copy link
Contributor Author

@devemux86 Link: http://de.droidcon.com/session/whats-new-android
(I hope I get it right. It's what I remember from the talk.)

@devemux86
Copy link
Collaborator

..yes not all like AS with Gradle..
So we need to support both IDE / build environments.

@schildbach thanks!
BTW I found also the reference link.

@devemux86 devemux86 removed this from the 0.5.3 milestone Sep 18, 2015
@schildbach
Copy link
Contributor Author

Yes, I think I was remembering this: "But what happens to older apps, designed for Android pre-M? This video from Google I/O explains that users will still be able to revoke permissions of these apps in Android M. In this case, apps will be fed blank data, which means they won’t break, and instead they will just show empty objects…"

@ludwigb
Copy link
Collaborator

ludwigb commented Sep 18, 2015

If this is how it works I personally cannot wait for Android M. Sick and
tired of apps that hoover down everything they can find on my phone.

On 18 September 2015 at 19:38, Andreas Schildbach notifications@github.com
wrote:

Yes, I think I was remembering this: "But what happens to older apps,
designed for Android pre-M? This video from Google I/O explains that users
will still be able to revoke permissions of these apps in Android M. In
this case, apps will be fed blank data, which means they won’t break, and
instead they will just show empty objects…"


Reply to this email directly or view it on GitHub
#686 (comment).

@devemux86
Copy link
Collaborator

😄
Only concern is to not fill the code with continuous checks that hit performance (which I think are asynchronous too)..
Imagine Mapsforge having to check all the time if write permissions to cache have been revoked with the app paused/resumed.

@schildbach
Copy link
Contributor Author

Luckily you don't need permission to use your external cache directory from Android 4.4 onwards…

@schildbach schildbach deleted the setup-travis branch September 20, 2015 07:46
@devemux86 devemux86 added this to the 0.5.3 milestone Sep 20, 2015
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.

None yet

5 participants