Building an application with Github actions

Do you like to promote your wxWidgets based application or component!? Post it here and let's see what the critics have to say. Also, if you found that ONE wx component the world needs to know about, put it here for future reference.
Post Reply
In need of some credit
In need of some credit
Posts: 1
Joined: Thu Jul 28, 2022 8:16 pm

Building an application with Github actions

Post by mike_gz »

I've had some success building a statically-linked, single-executable (no-install) wxWidgets application in Github actions for Windows and Linux. I'd like to share it with fellow developers here as it may help someone, or anyone may have comments. It's MIT licensed so feel free to use any or all of it in your own projects. The specific application is a GUI tool that works with files for a musical instrument that I own.

Project page is here:

The YAML script is here: ... sbuild.yml

Some of the features of the build system:
  • Zipped executable binaries 2-3MB in size
  • Runs on all Windows from Vista onwards. Building for XP also shouldn't be too difficult, I just haven't tried doing that yet.
  • Statically linked to the wxWidgets libraries, so that it can be distributed as a single executable file
  • Also statically linked to C++ libraries (Windows build only). I found that was necessary to stop the ".DLL Missing" popups in Vista/Win7. The executable size doesn't increase a whole lot doing this so I think is worth it.
  • Has both 32-bit and 64-bit builds for Windows. The 32-bit one runs fine on 64-bit systems (but probably not vice versa) so if you want a single executable for Windows I guess 32-bit is the one to go for.
  • Similarly for Linux, has both GTK2 and GTK3 builds. The GTK2 one was mostly just because of some issues with wxSpinCtrl I had that seem to have been fixed in the latest version of wxWidgets, so again GTK3 is probably sufficient for all users.
  • Makes use of Github's "Cache" facility to cache the wxWidgets libraries once they've been built once. Subsequent build operation are then much quicker.
  • Also makes use of Github's automatic release generation. If the build is run on a named tag, then a release is generated with the same name as the tag. That means the binaries are released directly from Github's runner VM with no additional steps in between, so the chance of any malware getting on them is hugely reduced.
A couple of remaining issues that I haven't quite cracked:
  • Certificate signing of the Windows binaries. Certificates are not especially expensive but I still haven't found a completely cost-free way of doing this.
  • Building for MacOS. Basically, I just don't have access to a Mac for testing the results on, so letting this one go for the time being.
Any comments/suggestions/questions on this are very welcome. :)
User avatar
Posts: 17452
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Building an application with Github actions

Post by doublemax »

This is very interesting and will definitely be useful for some people. Thanks for sharing.

Maybe you should post this on the wx-users group, too:
Use the source, Luke!
Rohit Agarwal
Earned some good credits
Earned some good credits
Posts: 106
Joined: Wed May 19, 2021 11:17 pm

Re: Building an application with Github actions

Post by Rohit Agarwal »

This is a useful how-to resource for deploying an app built using wxWidgets.
I wonder if it makes sense to add a section to the programming forums
for "app packaging and deployment" since that's not really covered by any of the existing sections.
If there were such a section, this post would belong there.
Also, CMake related questions/how-tos could go into such a section.
Post Reply