GitHub Actions and Buildozer

157 views
Skip to first unread message

Carsten Thielepape

unread,
Nov 27, 2019, 12:01:19 PM11/27/19
to Kivy users support
Hi,

as a lot a developers have problems to get a working build environment for Kivy using buildozer, I wonder if GitHub actions (https://github.com/features/actions) could a possible solution to bypass this. There are some templates to deploy code already there, but of course, nothing for kivy. But for me it looks like, that a proper shaper yaml file which includes the right versions of the build tools, could a solution for having a generic build environment , which everybody could use for free.
Has anybody spend some time github actions by now?

Greetings

Carsten

Robert Flatt

unread,
Nov 27, 2019, 11:02:16 PM11/27/19
to Kivy users support
A year ago Buildozer was almost unusable, but these days I'd say it works reasonably well.
Yes, there is a certain amount of pilot error, mostly there are people who find it doesn't run on Babbage's Difference Engine, and the like, but it is OK.

That said running Buildozer is a tool developer like task, rather than a tool user like task.
And it (p4a really) is really slow the first time a project is built.

One way to make it simpler would be to constrain the problem, say to only one NDK version and one SDK version, and ARM64
Then (I think) a tool could download pre-compiled (with p4a) ARM  binaries.
The pre-compiled binary list would include pre-compiled recipes.
Or maybe I don't understand :(

A lot of the issues go away if compile is not involved.
And if a user doesn't want the pre-compiled configuration, there is always p4a or Buildozer.

The end user would then just (in some automatic way) execute p4a to do the Cython and Gradle step. (basically p4a has to be faked out to say the C compiles are done).

So a tool that downloads binaries and uses p4a to link and add the other stuff that might go into an apk?
No need to create a new user app configuration file just use ".p4a"  (I like .p4a)

Yes I could see that. (Not volunteering, I do not have the bandwidth).

And if there are some Github tools that help, great.

ZenCODE

unread,
Nov 30, 2019, 3:10:12 PM11/30/19
to Kivy users support
Yes, we are aware of github actions, but I don't see how it's appropriate for buyildozer builds? Would you want to create whole buildozer deployment on every push? Where would that be put? How would the user get that build? Perhaps I don't understand you suggestion? Please could you explain a little more about how you would envision this working?

Thanks

Carsten Thielepape

unread,
Dec 3, 2019, 2:52:44 PM12/3/19
to Kivy users support
Hallo,

it is not about to pass a container to users. The benefit would be to pass  

* a routine to developers to reliable create a package for their applications
* have an environment to verify if the kivy applications can be build at all

Coming to the point, if it is practical to create the full environment for each built?

1) I am not sure, if this is really the case , as reading the docs, there  seems to be an option to cache files between builds
2) Even if not, it still would give one a reliable build environment

Please keep in mind, that this forum is full of user reported buildozer problems. 

My preferred solution would be a single action which archives the following

* Checkout the repository (as required by github)
* Run a pre user script to prepare the sources and copy them to a tempory folder (customizable and part of the user git repository)
* Install the build requirements
* Copy the buildozer.spec file (customizable and part of the user git repository)
* Perform the build
* Run a post user script to  (customizable and part of the user git repository)

* This single script should be tested against the showcase example from the kivy examples. Maybe a further examaple which includes gstreamer and atlas creation
* This script should build for for the main android versions (6,7,8,9,10) /apis (editable)
* This script should build for windows as well (multi platform is one of the main features of github actions)
* This script should build for OSX as well (multi platform is one of the main features of github actions)
* Not shure if it would be possible to build for IOS as well

If the script builds from specified versions (and not Master! not p4a Master) if could be a solution to reliable build kivy apps to several versions, without tweaking around without Virtual images and versions.

I know , this I a big ask with a lot of work to spent, but in my opinion worth the work

Cheers

Carsten 

Carsten Thielepape

unread,
Dec 11, 2019, 3:58:06 PM12/11/19
to Kivy users support
Hello, a short update:

I started to compile an Github action file to create Kivy Application:

Android: success with buildozer
Windows: I am stucked, as the the Github Docker doesn't support OPENGL 2.0 and pyinstaller fails for that reason
OSX: Buildozer is broken for OSX (this is known) and pyinstaller fails for the pyinstaller/OPENGL problem
Debian: Fails for the  pyinstaller/OPENGL problem
IOS: doesn't look like that there is any option for an unattended build

So: the pyinstaller/kivy/docker opengl 2.0 problem seems to be the showstopper for getting the build done for windows & OSX & Debian

Any advice welcome


Reply all
Reply to author
Forward
0 new messages