Continuous Integration for Addons and other openFrameworks

Hello all,

I’m in the process of adding adding continuous integration (CI) support for my addons to auto generate documentation, check for compilation errors, etc.

I’m roughly basing my solution on the CI support for the openFrameworks master repository, but the system is pretty complex (as one would expect for so many platforms).

I’d like to run have my addons’ “stable” branch build against the latest stable release of oF, and my develop branch build against the latest nightly build.

I suppose I could basically copy the complete openFrameworks CI system and add a single script to run my tests / and compile my examples, but that seems a bit excessive, but perhaps that’s necessary?

@arturo do you have any thoughts on a more streamlined way to set up a cross-platform CI system for addons?

Seems like a simple system for testing all desktop platforms would be pretty straight-forward, but it would be nice to test across all platforms, as we have that working with the main openFrameworks already.

Anyway, thoughts?

1 Like

i’ve been thinking about this for a while and it’s not so straight forward, not even for desktop platforms. the main problems are:

  • you need to download an compile all of OF to test each addon
  • most addons change less often than OF itself so they usually break because OF changes not because of changes on the addon but travis doesn’t allow to test a repository when another changes or with a certain frequency only when that repository has new commits or PRs
  • it’s pretty complex to setup and would require everyone to add the config to their addons

another possibility would be to have our own server constantly download every addon listed in ofxaddons, compile OF and then compile all addons examples one after another and publish any potential errors through a web page or even open an issue in the corresponding addon github page through the github api


i’ve just pushed a travis config file to ofxAddonTemplate that should work with any addon, it needs to clone and compile all of OF but with the libraries gone from the repo cloning is pretty fast now. the config file tests the addon with both stable and release branches of OF but could be easily separated for people who keep 2 branches to track the corresponding in the OF repo.

to use it just copy .travis.yml from the template to any addon, create a travis account and enable the addon in your travis to be tested.

perhaps we can have a script that make a PR to addons repositories everytime there’s a new OF release so addons get tested automatically against the newest release


Just one other note – while it would be nice to have a “hook” for repos to run builds when oF master / stable is updated, it might be useful to set up a “cron” job on addon repos …

It’s not a perfect system, but we’re getting there!

1 Like

Hey guys, I’m trying to decipher what to do for this to work for my ridiculous addon collection too; I got it working for some simple addons, but it seems to ignore each example’s config.make (which I need for addons that depend on other addons, or addons that require some macros defined).

Looking through the travis logs, I think I found the issue, but not really sure where to solve.

For example, I am trying to compile the example of this addon with a pre-processor macro defined in config.make; as seen here

But it seems the definition is ignored. Looking at the logs, I see this entry

cat: obj/linux64/Debug/.compiler_flags: No such file or directory

Complete Log Here

and looking through the makefile related scripts in OF, it seems the “.compiler_flags” are saved to disk into a file with that name at some point. Might me a simple case of the filed being saved in the wrong dir; but I really can’t keep up with the working dir changes all over the nested scripts… But of course, if the file is not there, the compiler flags are lost.

Also, I wonder if the OF scripts in “OF/scripts/ci/addons” should look at “” and clone automatically any dependencies (although where to clone them from is a bit of a long shot, I could see some sort of scapper of files to build an index addon urls by name); or maybe forcing the to add a URL for each addon dependency… Or maybe based on “addons.make” for each example; there seem to be quite a few places where this can be defined and its a bit confusing to read which one does what (I know some are for PG, but maybe they could be consolidated)

I like what bakercp has done in his addon/scripts/ci/ script and it should maybe be added in the ofxAddonTemplate bc the instructions in the .travis.yml file are quite vague travis.yml. Maybe there can be a that is a user-driven script, and some other plain text file like “addons.make” where you just input repo URLs for other addons?

Another thing that I am seeing is that the OSX ci tests seem to hang forever; but they don’t even start. Are you also seeing those?

Sorry for this messy post, and thanks for working on this guys!

Regarding dependencies, I’m working on that and have it mostly working (for my own dependencies and core dependencies … after several days of work).

Check out my growing collection here:

One point of note, I made a few modifications to the core scripts which can be found in my openFrameworks CI-TESTS branch. Here’s an example:

Note the dependencies install script (which defaults to the matching branch and my username for the moment)

Here are travis results so far (check any of them for their .travis file and CI scripts)

And here are the corresponding appveyor apps:

e.g. etc (not sure how to list all of them …).

There is only a minor change to the oF core here:

I’ll make a PR on that soon.

On the addon front, I haven’t made an update to the addon template, but check out any of my current addons and they all have identical CI scripts and .travis / .appveyor updates.

Things that we need I believe …

We need to be able to install dependencies automagically. I do this in my addon’s file currently, but it is limited to choosing them by name from my personal repositories.

Ideally, we would be able to label dependencies more in the / addons.make file with greater precision – see this discussion: (most recent comments).



Also, on other note – the reason for a lot of my updates were motivated by my desire to write a single bash script that would work on all Appveyor MSYS2+VS32/64. The same script installs the dependencies for all platforms on all systems currently.

In the core files that I modified, they were primarily changes to make the appveyor and travis config files as similar as possible because they were both installing in different places and doing things a bit differently. Currently config files and sequence are now almost identical, which should make it easier for new users to understand.