DEV Community

David Cantrell
David Cantrell

Posted on • Edited on

Automatic cross-platform testing: part 5: OpenBSD

Previously on this channel

Testing on OpenBSD

It's been a while since I wrote the first few parts of this series. Part 1 where I talk about automatic testing on Linux is now obsolete. Travis CI is no longer free for open source projects, so I switched to using Github Actions. Github also support Mac OS and Windows, but I've not migrated my testing on those platforms, because I am lazy.

And I'm now experimenting with Github Actions for OpenBSD testing too. This despite it not being a platform they support. After a bit of faffing about it seems to Just Work, so I'll roll this out to all my projects soon.

How it works is a terribly cunning hack that has been packaged up into an action that anyone can incorporate into their workflows. Github's Mac OS runners run in virtual machines on real Macs; Apple's hypervisor supports nested virtualization; so my OpenBSD tests run in an OpenBSD VM inside a Mac VM.

As such there are some limitations. I can't use any other Github actions inside the OpenBSD VM, because Github don't know about it and it doesn't know about Github. However, it does open up the possibility of supporting other OSes too. FreeBSD is already supported, and I can see that there is a repository under active development for NetBSD. Perhaps once that's stable I'll badger the author into supporting Solaris.

Next

The next part of this series will show you how to automatically test on strange variations on the theme of Linux, such as 32 bit and weird distributions.

Top comments (0)