-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Build Android Natives (OpenAL, Vorbis, TextureLoading) on Travis #1171
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
Build Android Natives (OpenAL, Vorbis, TextureLoading) on Travis #1171
Conversation
…ild of jme3-android. This works because jme3-android-native already depends on jme3-android. Due to technical reasons, the headers share the same location and thus the include directives have been adjusted slightly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for your contribution. Some of the changes seem unnecessary:
- In
.travis.yml, the added commented code (from googles NDK example) is more confusing than helpful. - In
.travis.yml, changing thesudosetting is a good idea, but unless it's necessary for building Android natives, it should be a separate PR. - the changes to
jme3-android-native/build.gradlelook unnecessary to me.
Also, could you do a similar PR for building the jme3-bullet-native-android library?
|
|
Re 2: Please make a separate PR so the change can be a separate commit to the repo. Among other things, separate commits for separate issues simplify cherrypicking. Re 4: It's good to keep |
|
3: Couldn't solve that entirely because I had a whiteline at the end and now git refuses to commit because the file only has a whitespace change.
|
|
so 4 will be a separate pull request later, because it affects jme3-bullet(-native), as it looks like bullet-native-android doesn't contain any native code at all but seems to copy it from jme3-bullet. |
|
Thanks for the merge, just one thing: The deployment still has to be thought of. Currently it would try to deploy but I guess it depends on which OS has compiled first. It will work fine until the first tagged commit. That means excluding the tasks from the other build matrices. Then deployment works. The second step would be to modify the upload script from bullet to also upload the android natives though, because otherwise while the artifacts are updated, everyone building the engine manually would be left of with the ancient files in this repository (prebuilt libraries) |
|
I'm not sure I understand. The way I see it, deployment should happen in 2 stages, as it has for
Unless commits come close together, or a tagged commit changes a native library, there should be no race between these processes. The main downside I see to this approach is that the repo grows rapidly. |
|
Exactly. Even when a tagged commit changes a native library there isn't much of a problem because the .jar will contain the new libraries. Repo Size Growth can't be avoided without changing this completely, that's true as well. What has to be done:
|
|
Are you working on this? |
|
I wasn't so far but yeah I should do these changes |
…o they don't conflict with the android build matrix (#1171)
|
I am done. The problem is: we can only see if it works on the next tagged release and/or as soon as some natives change. Unless 21d0854 already commits something because things have changed. Edit: Alternatively we could update openAL for android, but we dont have people testing if this brings in more bugs than before, so... |
|
Luckily I have some native change planned, along with a tagged release! |
|
I just committed 30d1eca which should trigger recompilation of all the Bullet natives. |
|
Hmm. The OSX/Windows native libraries got updated, but so far I haven't seen any evidence that the Android/Linux ones did. Please check. |
|
The Android build failed to commit the native libs because they weren't staged. |
|
I see two oddities there. https://travis-ci.org/jMonkeyEngine/jmonkeyengine/jobs/586240198#L2291 Android Natives seem to have changed as well, why didn't they do that before? Or did I just not look closely enough? The second one, you are right, is not staging them, however there is https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/private/upload_native.sh#L31 Also given that android-natives changed as well, I was expecting to see that output twice. Since you are more experienced with the git command line: Do you spot some issues there? |
|
Actually, since I use GUI tools for most of my gitwork, I'm unfortunately very ignorant of the git command line. Yesterday I looked carefully at At this point, my inclination would be to add a bunch of If we're both stuck, perhaps we should get others involved in the debugging. |
|
I'm about to add some debugging commands to |
|
I just noticed this failure in the Linux build: https://travis-ci.org/jMonkeyEngine/jmonkeyengine/jobs/586791631#L386 As for the Android build, it looks like the Also, I may have figured out why the Android build is trying to commit jme3-bullet-native libraries: a race condition. |
|
I've confirmed that |
|
Using |
|
Android side is working. Looking at the Linux bulletjme error. |
|
Resembles #915 |
|
I foolishly tested a .travis.yml change in the main repo. Should've done that in my own fork. Now the build is broken, but hopefully that'll be temporary. |
So I looked into building android natives and made them work on travis despite the jdk-11 changes which broke them.
I added another build to the matrix, which is android. That way the Android NDK is just easily available.
The header generation has been moved into jme3-android, which generates headers during the compilation which happens anyway (though now headers are generated if noone wants to build natives).
OpenJDK 10 is critical here, because the JDK Version 11 does not support Java EE Modules (XML) anymore, which are required by Android Tools.
What is left is the integration, there are two options:
Personally I am in for a hybrid approach: 1 + 2, usually 2 is relevant for most users but we need number 1 to allow users to build the engine (including the jme3-android) module without any issues.