Continuous Integration for f-droid/data
One of the projects in which I am active (Navit) recently introduced Continuous Integration. I believe F-Droid could benefit from such a solution as well.
A short overview of how Navit does it:
- The main repo is on Github, and they use CircleCI for CI. Whenever a new commit is pushed to the main repo, or when a merge request is opened, that code is built for a number of platforms and tests are run.
- After the tests complete, I can examine the results and, if the tests failed, examine console output to see where it failed.
- Contributors who maintain their own fork on Github can sign up their repo for CircleCI as well, so CircleCI will also run tests after every push to the forked repo.
- Artifacts (including Android APKs) are collected after each tests and made available for download.
- After a push to the active development branch (which Navit calls
trunk
, a leftover from SVN) and successful completion of tests, that branch is automatically merged into the stable branch (calledmaster
in Navit), gets a release tag and the APK is automatically updated on Google Play. (Not yet on F-Droid, but that's a different story...)
Since CI provides a standardized build environment, I could – in the most extreme case – just clone the source code to any machine with no build toolchain installed, make changes with a regular text editor, push them, wait for CI to build my APK and install it to my phone.
Benefits for F-Droid:
Since setting up a F-Droid build server is tricky (I recently tried that and did not succeed), I have no way to test my build recipes. So I skip the testing, hope that it will work, and open a merge request. If something goes wrong, I won't find out until after it's been merged. Then I can edit my build recipe, file another merge request and start over again. Each step is time-consuming because I have to wait for an admin to process my merge request – with CI my recipe would build instantly, I would get a result within a few minutes and could fix any errors immediately. I could get my app on F-Droid a lot faster and save you admins a lot of work fixing broken recipes.
It would take some time to draw up a solution that works for F-Droid and set it up. However, it would make it easier for app devs (or other tech-savvy people) to submit a build recipe for a new app, with no admin input required, thus it would save you guys time on the long run and help increase the choice of apps available on F-Droid.