ci: add FreeBSD

In order to merge FreeBSD support patches, we want to have a working
CI, to make sure we don't regress FreeBSD. Several options were
considered to add FreeBSD CI.

The first one is to use an external CI service, such as builds.sr.ht.
However, a GitLab bug [1] prevents third-party CI services from
properly integrating with merge requests. Additionally, we'd prefer not
to depend on a third-party service.

The second one is to use a cross-build file [2], ie. build FreeBSD
executables and libraries from a Linux host. However, it's impossible to
run tests with this setup. Additionally, the cross-build logic needs to
be maintained and is a different environment from a real FreeBSD system.

The third one, and the approach used here, is to run the build and tests
in a FreeBSD VM under qemu. While this is a little bit slower, KVM should
allow us to get reasonable performance, and FreeBSD can be a first-class
citizen. FreeBSD provides an official pre-configured image for CI, so the
maintenance burden isn't too high. SSH is used to provide a reliable way
to interact with the guest.

The container-prep step downloads the image, extracts it, converts it into
the compressed QCOW2 format to save disk space, then fires up the VM and
installs the packages required by Wayland in the VM.

The new build-freebsd step copies the Wayland source to the VM via scp,
then builds Wayland and run tests in the VM.

[1]: https://gitlab.com/gitlab-org/gitlab/-/issues/16491
[2]: https://hub.docker.com/r/myfreeweb/freebsd-cross/

Signed-off-by: Simon Ser <contact@emersion.fr>
References: wayland/wayland#72
4 jobs for freebsd-ci in 3 minutes and 24 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Review
passed #10519166
check-commit

00:00:19

 
  Prep
passed #10519167
kvm
debian:buster@container-prep

00:00:21

 
  Build
failed #10519169
kvm allowed to fail
build-freebsd

00:02:43

passed #10519168
build-native

00:01:36

 
Name Stage Failure
failed
build-freebsd Build
A full log can be found at /root/wayland/build/meson-logs/meson-log.txt
+ cleanup
+ [ -e /tmp/qemu.pid ]
+ cat /tmp/qemu.pid
+ kill 10
+ rm -f /tmp/qemu.pid
qemu-system-x86_64: terminating on signal 15 from pid 9 (sh)
Cleaning up file based variables
ERROR: Job failed: exit code 1