yeslayla / build-godot-action

GitHub action that builds a Godot project for multiple platforms
https://github.com/josephbmanley/build-godot-action
MIT License
116 stars 24 forks source link

Support Additional Godot Versions #5

Open yeslayla opened 4 years ago

yeslayla commented 4 years ago

Currently, the action only supports Godot 3.2.

It would be better if the action had a parameter that determined which version of Godot is used to build the project.

yeslayla commented 4 years ago

NOTE: Could be opportunity to support custom builds as well

yeslayla commented 4 years ago

NOTE: An export template in the export preset can be used without needing as custom build of godot

remi-san commented 3 years ago

Have you found a way to do that? as I'd love to use your action which makes it a lot easier, but I mainly use the mono version.

The only solution I've come up with would be to base all versions on a mono docker, and download / install everything Godot related (in the parameterised wanted version : standard / mono / custom) at runtime before building, but that would be a VERY long build repeated for each value of the matrix... (if I am not mistaken)

So, I guess creating a standard and mono tag for each godot release would be a better solution, but keeping multiple branches can be a hard work. And that wouldn't allow custom builds.

Anyway, I'd be happy to help as I won't create a new action when we can make this one even better :)

yeslayla commented 3 years ago

Hey @remi-san 👋

Yeah, definitely high up on the to-do atm.

My first thought is using build args. Where the action's docker image would take in an argument for the image to use as it's initial version. It doesn't look GitHub Actions supports this out of the box, so it's likely it'll have to wrapped in JavaScript calls to build the docker image be. I've used dockerode on other projects to achieve a similar thing. So it'd pull the base image, add the runtime script, and then pass in inputs.

I noticed your repo setup-godot-action which give me the idea that potentially another action, such as yours, could optionally download and configure Godot, then that can be mounted to the build image. This could end up being a bit messy though, so it'd be nice to avoid if possible.

remi-san commented 3 years ago

setup-godot-action is not production ready at all, I'm pretty new to github actions and it was made as an attempt to use another method that doesn't use any docker image (because the image is very big and takes a long time to pull at each call). But downloading Godot (and the templates) on the ubuntu machine takes ages... so not the best solution either (+I must have missed some deps to install as it doesn't work at all).

But I guess my script allowing to download the correct version of the files does the job though.

Aboult building a new image with args, aren't you afraid it'll be a very long build too? especially if we have to build it at every run (knowing that the downloading part of the templates is the real issue here).

yeslayla commented 3 years ago

Aboult building a new image with args, aren't you afraid it'll be a very long build too? especially if we have to build it at every run (knowing that the downloading part of the templates is the real issue here).

So GitHub actions already does this for Docker Actions. You'll notice the extra step. It shouldn't have to pull the entire . The build args would change the base image to pull (which should have Godot already configured, like godot-ci containers)

My idea is wrapping the build process in JavaScript so we can inject the build args for the image name and tag. That should allow the use of other version of Godot and have around the same total run time.