diff mbox series

cirrus.yml: Add VM-based jobs to test with NetBSD and OpenBSD

Message ID 20201005153419.94887-1-thuth@redhat.com
State New
Headers show
Series cirrus.yml: Add VM-based jobs to test with NetBSD and OpenBSD | expand

Commit Message

Thomas Huth Oct. 5, 2020, 3:34 p.m. UTC
Since Cirrus-CI provides KVM in their Linux containers, we can also run
our NetBSD and OpenBSD build jobs there. Since the installation might
take a while, we only run the "help" target on the first invocation,
and check with the major targets afterwards, once the base image has
been cached. For the the build tests, we also only use a limited set of
target CPUs since compiling in these VMs is not very fast (especially
the build on OpenBSD seems to be incredibly slow).

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 .cirrus.yml | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
diff mbox series

Patch

diff --git a/.cirrus.yml b/.cirrus.yml
index 9f7d2c0a78..f4ec2d59f4 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -105,3 +105,45 @@  windows_msys2_task:
     - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make -j$NUMBER_OF_PROCESSORS"
   test_script:
     - C:\tools\msys64\usr\bin\bash.exe -lc "cd build && make V=1 check"
+
+netbsd_task:
+  container:
+    image: fedora:32
+    cpu: 8
+    memory: 8Gb
+    kvm: true
+  qemu_vm_cache:
+    folder: $HOME/.cache/qemu-vm
+  install_script:
+    - dnf update -y
+    - dnf install -y git make openssh-clients qemu-img qemu-system-x86 wget
+  script:
+    - if [ -d $HOME/.cache/qemu-vm ]; then ls -lR $HOME/.cache/qemu-vm ; fi
+    - if [ -f $HOME/.cache/qemu-vm/images/netbsd.img ]; then
+        make vm-build-netbsd J=$(getconf _NPROCESSORS_ONLN)
+          EXTRA_CONFIGURE_OPTS="--target-list=aarch64-softmmu,ppc64-softmmu,sparc64-softmmu,sparc-softmmu,x86_64-softmmu,i386-bsd-user,sparc64-bsd-user,sparc-bsd-user,x86_64-bsd-user" ;
+      else
+        make vm-build-netbsd J=$(getconf _NPROCESSORS_ONLN) BUILD_TARGET=help
+          EXTRA_CONFIGURE_OPTS="--disable-system --disable-user" ;
+      fi
+
+openbsd_task:
+  container:
+    image: fedora:32
+    cpu: 8
+    memory: 8Gb
+    kvm: true
+  qemu_vm_cache:
+    folder: $HOME/.cache/qemu-vm
+  install_script:
+    - dnf update -y
+    - dnf install -y git make openssh-clients qemu-img qemu-system-x86 wget
+  script:
+    - if [ -d $HOME/.cache/qemu-vm ]; then ls -lR $HOME/.cache/qemu-vm ; fi
+    - if [ -f $HOME/.cache/qemu-vm/images/openbsd.img ]; then
+        make vm-build-openbsd J=$(getconf _NPROCESSORS_ONLN)
+          EXTRA_CONFIGURE_OPTS="--target-list=i386-softmmu,sparc-softmmu,i386-bsd-user,sparc-bsd-user" ;
+      else
+        make vm-build-openbsd J=$(getconf _NPROCESSORS_ONLN) BUILD_TARGET=help
+          EXTRA_CONFIGURE_OPTS="--disable-system --disable-user" ;
+      fi