commit: 6031310164f9c24668f1756becd83f88cd071061
parent 5a369dc783d83355a0f1c735777ccd9e04f74342
Author: fosslinux <fosslinux@aussies.space>
Date: Wed, 20 Jan 2021 16:24:50 +1100
Merge pull request #3 from fosslinux/ci
Add cirrus CI
Diffstat:
4 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/.cirrus.expect b/.cirrus.expect
@@ -0,0 +1,8 @@
+#!/usr/bin/expect
+
+set timeout -1
+
+spawn ./rootfs.sh qemu-system-x86_64 3500M
+expect -exact {not syncing: Attempted to kill init}
+send -- "\x01"
+send -- "x"
diff --git a/.cirrus.yml b/.cirrus.yml
@@ -0,0 +1,38 @@
+container:
+ image: potyarkin/molecule:host-kvm
+ kvm: true
+ cpu: 2
+ memory: 4G
+
+lint_task:
+ install_script:
+ - apt-get -y update
+ - apt-get -y dist-upgrade
+ - apt-get -y install shellcheck
+ - apt-get -y clean
+ check_script:
+ - shellcheck rootfs.sh
+
+run_task:
+ # Required background services
+ dbus_background_script:
+ - mkdir -p /var/run/dbus
+ - /usr/bin/dbus-daemon --system --nofork --nopidfile
+ virtlogd_background_script:
+ - /usr/sbin/virtlogd
+ libvirtd_background_script:
+ - sleep 2 && /usr/sbin/libvirtd
+ iptables_legacy_script:
+ - update-alternatives --set iptables /usr/sbin/iptables-legacy
+ deps_script:
+ - apt-get -y update
+ - apt-get -y dist-upgrade
+ - apt-get -y install sudo git cpio linux-image-4.19.0-13-amd64 expect wget
+ - apt-get -y clean
+ submodule_script:
+ - git submodule update --init --recursive
+ kernel_script:
+ - cp /boot/vmlinuz-4.19.0-13-amd64 ./kernel
+ run_script:
+ - ./.cirrus.expect | tee -a /tmp/run.log
+ - grep -q 'Bootstrapping completed.' /tmp/run.log
diff --git a/rootfs.sh b/rootfs.sh
@@ -129,7 +129,7 @@ if [ "${QEMU_CMD}" = 'chroot' ]; then
sudo PATH="/after/bin:${PATH}" chroot . /init
else
${QEMU_CMD} -enable-kvm \
- -m "${QEMU_RAM:-8G}" \
+ -m "${QEMU_RAM}" \
-nographic \
-no-reboot \
-kernel ../../kernel -initrd initramfs.igz -append console=ttyS0
diff --git a/sysa/after.kaem.run b/sysa/after.kaem.run
@@ -129,3 +129,5 @@ pkg="m4-1.4"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
+
+echo "Bootstrapping completed."