Docker image and Github Actions to automatically compile Godot C++ GDNative libraries.
Github Actions:
Exported HMTL5 build is deployed here.
Gitlab Runners:
Heavily inspired and based on both the CI/CD provided by godot-ci and the automated workflow of Godot itself.
https://hub.docker.com/r/ponders/godot-cpp-ci/
This repository is mirrored to Gitlab here.
.gitlab-ci.yml
and .github/workflows/*.yml
are included in this project as reference. In most cases, just copying them to your own repository does the job.
For android compilation purposes, a special Android.mk
-file as well as a jni/Application.mk
-file are included in the gdnative_cpp_example
-folder.
Again, those files need to be copied and modified for your own repository purposes.
Github | Gitlab | |
---|---|---|
windows | โ๏ธ | โ๏ธ |
x11 | โ๏ธ | โ๏ธ |
osx | โ๏ธ | โ |
ios | โ๏ธ | โ |
android | โ๏ธ | โ |
html5 | โ๏ธ | โ |
Exporting to the debug
-target gives potential dependency problems, especially on Windows, that might break your plugin for users that don't have any dev environment set up on their device.
In those cases, Godot will fail to load the library and print an error of following form (or similar):
Can't open dynamic library: bin/win64/libgdexample.dll, error: Error 126: The specified module could not be found.
.
modules/gdnative/gdnative.cpp:501 - No valid library handle, can't get symbol from GDNative object
modules/gdnative/nativescript/nativescript.cpp:1506 - No nativescript_init in "res://bin/win64/libgdexample.dll" found
These kind of errors might not be apparent on your development machine, so it's always a good idea to check for this kind of issues on a non-development machine!
Handy tool for checking for missing dependencies of any *.dll
can be found here.
Later versions of Emscripten don't create binaries that are compatible with the Godot API due to version mismatch between engine and binary.
The currently used version for Godot engine compilation can be verified in the main Godot repository, as found here.