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

Thomas Huth posted 1 patch 5 years, 1 month ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch failed
Test FreeBSD failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201005153419.94887-1-thuth@redhat.com
Maintainers: Brad Smith <brad@comstyle.com>, Li-Wen Hsu <lwhsu@freebsd.org>, Kamil Rytarowski <kamil@netbsd.org>, Ed Maste <emaste@freebsd.org>
.cirrus.yml | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
[PATCH] cirrus.yml: Add VM-based jobs to test with NetBSD and OpenBSD
Posted by Thomas Huth 5 years, 1 month ago
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 --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
-- 
2.18.2