Add cirrus CI

This commit is contained in:
fosslinux 2021-01-09 08:58:34 +11:00
parent 5a369dc783
commit 97fd39feb2
4 changed files with 49 additions and 1 deletions

8
.cirrus.expect Executable file
View File

@ -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"

38
.cirrus.yml Normal file
View File

@ -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

View File

@ -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

View File

@ -129,3 +129,5 @@ pkg="m4-1.4"
cd ${pkg}
kaem --file ${pkg}.kaem
cd ..
echo "Bootstrapping completed."