Closed 2shady4u closed 4 years ago
We are currently working on #17, android builds are going to be the next supported target
Seems like some android CI exports already exist, such as: https://github.com/dbrova15/godot-ci-android-bakz
It seems relatively easy to just merge these with the already existing Dockerfile? Or are there any complications that I am not seeing?
@2shady4u Just saw the repo you shared, it looks great :+1:
I would prefer to create a new image with android support instead of merging, similar to what we did for mono. That way we do not bloat the image unnecessarily for people who don't need android support.
We'll even make a fourth mono + android image to be safe :)
For now I would like to test the image myself on one of my android projects, and we can also invite @dbrova15 to open a PR if he'd like to help maintain this.
ok, sounds great!
Just a question though: it is possible for gitlab CI to derive from multiple docker images, cause i have a case where i want to build for windows, web and android at the same time. Meaning that I would need to use both the default docker image (for windows and web) and the android image.
How would this be done?
@2shady4u It's possible but that might make the CI slower if you don't optimize it, so I'd suggest to just use the android image for all of them. That's what I'd do.
You can optimize your gitlab-ci.yml afterwards if you know what you're doing.
To be clear, the android image supports non-android exports, and the mono image supports non-mono exports. The reason they're separate images instead of having them in one big image is because it adds more CI time to load the bigger images.
Hello, @asheraryam. It would be great to make one image for all platforms. At the moment, my image only works with the base Godot build. If you enable custom assembly, an error occurs.
I talked about this here: https://github.com/godotengine/godot/issues/29385#issuecomment-653023749
Hello, @asheraryam. It would be great to make one image for all platforms. At the moment, my image only works with the base Godot build. If you enable custom assembly, an error occurs.
I talked about this here: https://github.com/godotengine/godot/issues/29385#issuecomment-653023749
@dbrova15 I was able to use the other image and it worked (myood/godot-ci-android-export:godot-3.2.2-beta4
) but I had an error using your docker image (bakz151/godot-ci-android-bakz:latest
).
It seems it cannot find the jarsigner, which is weird since the docker images are very similar.
$ ls -l /usr/lib/jvm/java-8-openjdk-amd64/bin/jarsigner
ls: /usr/lib/jvm/java-8-openjdk-amd64/bin/jarsigner: No such file or directory
ERROR: Job failed: exit code 1
This is mentioned in https://github.com/godotengine/godot/issues/29385 and it seems to be due to editor settings.
And regarding the custom build, it seems we'll need to look into the engine code and see why this might be failing.
@2shady4u You should be able to use the docker image I mentioned to setup CI for android using the myood image.
Below is the ci config I'm using in case you have any trouble, you can copy the extra sed operations I added.
Note that my game is not in the root of the git repo, it is inside a subfolder called "godot", so it's better to use the yaml from the dbrova repo and adjust it where necessary (such as to use the image myood/godot-ci-android-export:godot-3.2.2-beta4
).
@asheraryam This is really strange since I took dockerfile myood/godot-ci-android-export as the basis. I wanted to modify it to fix the custom build.
Yeah it's definitely very weird, since I used the yaml config from your repo, so if anything I would have expected it to not work with the myood image.
I'll try my own build of the docker file in the weekend and see why it could be causing this error.
@dbrova15 @myood I just noticed that there has been an update on one of the CI repos that could help with the custom builds, see this diff https://github.com/myood/godot-ci-android-export/commit/6a374b3a69dac4d7ac457de7d22fea993c5895ae
Seems we should try the latest image from myood to see if it solves the issue.
I added this line as soon as I noticed that this setting is not. So this does not solve the problem. But in any case, I will try this image. Maybe the same magic works here as with jarsigner :)
I updated my images master/godot-3.2.2 and can export to android with custom build successfully. I'm using godot-3.2.2-stable with godot-firebase plugin and export succeeds. My yaml differs much from the sample in the github repo, but I updated the sample and it should work now.
Here's what changed: https://github.com/myood/godot-ci-android-export/commit/70655999a3576fabfc1d8c21dccd5a2346f5349b
[edit] Actually I should elaborate a little. In godot 3.2.2 android export was refactored, so there are a lot of changes that break backward compatibility. If you know exactly what you're doing, you should be able to update your existing builds. Or you can create exports from scratch. Either way looking up the godot 3.2.2 docks is highly recommended. It took me a while to adapt all things, and abviously there were some quirks (like gradle missing executable permissions). AFAIR changes were needed to editor settings, export settings, my local repo, I hade to redownload build templates, and... maybe that's it. Comparing godot-3.2.2 and godot-3.1.2 branches from my repo may be helpful also.
Good luck, because it's a hassle. :-)
Just polling how hard it would be to add a way to export to Android? Would it be a lot of work or is it just a single text line away?