Recent changes in OPENRNDR/ORX infrastructure

Just want to write down what my recent tinkering with Gradle and Github Actions has amounted to, as I think some of it may be really useful to others.

Mesa / SWR

I have made a custom built of Mesa with Intel’s SWR rasterizer. SWR is a software implementation of OpenGL, it currently supports most if not all of OpenGL 3.3 core features. On Github Actions you use this library in combination with xvfb-run to run OpenGL programs in a virtual graphical environment.

This work I compiled into a reusable action that is available on the Github Marketplace for everyone to use. The action is called openrndr/setup-gl

To be clear, this allows one to run OPENRNDR applications (but also other OpenGL progams) inside a Github Action.

ORX demos

Some time ago I added a demo sourceset to ORX, that allows developers to supply demos of their extras. Demos are not packaged into the release artifacts, and demo sourcesets have their own set of dependencies which makes it possible to add dependencies for demo purposes only. The demos can be executed directly from the source tree, in IntelliJ this works like executing any OPENRNDR program.

Now that the demo source sets work, and there is a collection of demos, I figured it would be nice to write a Gradle task that discovers all demos and runs them to collect screenshots. I also wrote some tooling to append links to the demos and screenshots to the corresponding README.md files. The original idea was to store the generated media in the git repo along with the sources. However, this would bloat the repository over them, especially if at some point videos are added to the generated media. Instead we store the generated media in an orphan media branch on the the ORX repository.

Conclusion

Combined with the work that enables OpenGL on Github Actions it is now possible to generate up-to-date screenshots and updated README.md documentation on commit. It is fully automated! ORX documentation is now both much richer and easier to author. This work opens up ways to improve the process for the OPENRNDR guide

Example README.md with screenshots

Encore

I replaced the Bintray task in the ORX gradle build with a simple zip on /.m2/repository/org/openrndr/extra/:version/* and curl bash script. Uploading a single zip to Bintray improves things in two ways: 1) it is faster (total time spent on the publication went down from 20 minutes to 7 minutes). 2) it is atomic, which solves a problem where we ended up with incomplete but public artifacts on Bintray.

4 Likes