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

Feature/#1058 #1068

Merged
merged 7 commits into from Jun 30, 2018

Conversation

Projects
None yet
3 participants
@cbalster
Contributor

cbalster commented Jun 24, 2018

closes #1058, closes #1061

Sorry for the rather broad PR.
Basically this is a big overhaul of the travis buildscript + some minor fixes for existing tests.
Key points: Build times down to ~15 mins and working newer test targets (10, 19, 21). Others can be enabled when a couple of issues are worked out (see comments behind configs in travis.yml and issues #1065 and #1066 ).
I had to drop the API8 test target though, since it is no longer available on google servers.

For details see the individual commit messages.

cbalster added some commits Jun 11, 2018

Overhaul travis build
- rework the way build environments are configured
- only download required components and emulator images when they are
  required (on a per worker basis). This significantly improves build
  times. As a side effect this requires to switch to google's repos for
  most of the downloads.
- spin up the emulator before starting the build to use the time to let
  it boot. Tests are run afterwards. Slightly improves build time.
- general cleanup
- switch to openjdk8
Work around SSLExceptions on some emulator images
Some emulator images do not update their time/date correctly and stay
on 0 unix time. This causes SSLExceptions due to the validity of the
certificates. This works around this issues by using http.
Fix test_getMapTile_found()
Test fails on some emulators due to:
"java.io.IOException: open failed: EROFS (Read-only file system)"
getFilesDir() should always be writable.
Remove unneeded travis configurations
Since osmdroid-third-party and GoogleWrapperSample are deactivated,
addons and several test targets can be removed. Keeps API23 google api
since there is no default image.
@spyhunter99

This comment has been minimized.

Collaborator

spyhunter99 commented Jun 29, 2018

great work, i added two comments. I'm not against them just curious

@cbalster

This comment has been minimized.

Contributor

cbalster commented Jun 30, 2018

Sure thing, unfortunately I can't see you comments.

@spyhunter99

This comment has been minimized.

Collaborator

spyhunter99 commented Jun 30, 2018

image

@cbalster

This comment has been minimized.

Contributor

cbalster commented Jun 30, 2018

Ah, you didn't submit the review yet.
1.) GetFilesDir() returns the app's files directory which is on the internal storage. This is guaranteed to exist and be writable under any circumstances. On some emulators the emulated/sdcard storage was read only for some reason. (See 59a1feb)
2.) I changed the test to create the MapView programmatically and place it in a container view instead of creating and inflating it via the layout file. I did this so the TileSource can be set before MapView creation since otherwise it will use the default first.

// create a bitmap, draw something on it, write it to a file and put it in the cache
String path = Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator + "osmdroid" + File.separator;
String path = getContext().getFilesDir().getAbsolutePath() + File.separator + "osmdroid" + File.separator;

This comment has been minimized.

@spyhunter99

spyhunter99 Jun 30, 2018

Collaborator

any context for this change?

@@ -4,10 +4,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent" >
<org.osmdroid.views.MapView
<LinearLayout

This comment has been minimized.

@spyhunter99

spyhunter99 Jun 30, 2018

Collaborator

any context for this change?

@spyhunter99

This comment has been minimized.

Collaborator

spyhunter99 commented Jun 30, 2018

ok sounds reasonable. getting writable storage has been a progressively larger pain

@spyhunter99 spyhunter99 merged commit ad27030 into osmdroid:master Jun 30, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@cbalster cbalster deleted the cbalster:feature/#1058 branch Jun 30, 2018

@monsieurtanuki monsieurtanuki referenced this pull request Jul 3, 2018

Closed

Android Studio / Compilation is not supported #1075

2 of 2 tasks complete
@monsieurtanuki

This comment has been minimized.

Collaborator

monsieurtanuki commented Jul 5, 2018

Thanks @cbalster, that travis part is much faster!

@monsieurtanuki

This comment has been minimized.

Collaborator

monsieurtanuki commented Jul 5, 2018

But I must say that your org.osmdroid.views.MapView / LinearLayout swap was not 100% adequate, as it's what causes #1076. About to fix it...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment