-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3088 from AkihiroSuda/cirrus
Use Cirrus CI for Vagrant tests
- Loading branch information
Showing
2 changed files
with
68 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
# We use Cirrus for Vagrant tests, because macOS instances of GHA | ||
# are too slow and flaky, and Linux instances of GHA do not support KVM. | ||
|
||
# NOTE Cirrus execution environments lack a terminal, needed for | ||
# some integration tests. So we use `ssh -tt` command to fake a terminal. | ||
|
||
compute_engine_instance: | ||
image_project: cirrus-images | ||
image: family/docker-kvm | ||
platform: linux | ||
nested_virtualization: true | ||
# CPU limit: `16 / NTASK`: see https://cirrus-ci.org/faq/#are-there-any-limits | ||
cpu: 8 | ||
# Memory limit: `4GB * NCPU` | ||
memory: 32G | ||
|
||
vagrant_task: | ||
timeout_in: 30m | ||
env: | ||
DEBIAN_FRONTEND: noninteractive | ||
HOME: /root | ||
# yamllint disable rule:key-duplicates | ||
matrix: | ||
DISTRO: fedora34 | ||
DISTRO: centos7 | ||
host_info_script: | | ||
uname -a | ||
echo "-----" | ||
cat /etc/os-release | ||
echo "-----" | ||
cat /proc/cpuinfo | ||
echo "-----" | ||
df -T | ||
install_libvirt_vagrant_script: | | ||
apt-get update | ||
apt-get install -y libvirt-daemon libvirt-daemon-system vagrant vagrant-libvirt | ||
systemctl enable --now libvirtd | ||
vagrant_cache: | ||
fingerprint_script: uname -s ; cat Vagrantfile.$DISTRO | ||
folder: /root/.vagrant.d | ||
vagrant_up_script: | | ||
ln -sf Vagrantfile.$DISTRO Vagrantfile | ||
# Retry if it fails (download.fedoraproject.org returns 404 sometimes) | ||
vagrant up || vagrant up | ||
mkdir -p -m 0700 /root/.ssh | ||
vagrant ssh-config >> /root/.ssh/config | ||
guest_info_script: | | ||
ssh default 'sh -exc "uname -a && systemctl --version && df -T && cat /etc/os-release"' | ||
unit_tests_script: | | ||
ssh default 'sudo -i make -C /vagrant localunittest' | ||
integration_systemd_script: | | ||
ssh -tt default "sudo -i make -C /vagrant localintegration RUNC_USE_SYSTEMD=yes" | ||
integration_fs_script: | | ||
ssh -tt default "sudo -i make -C /vagrant localintegration" | ||
integration_systemd_rootless_script: | | ||
if [ $DISTRO == centos7 ]; then | ||
echo "SKIP: integration_systemd_rootless_script requires cgroup v2" | ||
else | ||
ssh -tt default "sudo -i make -C /vagrant localrootlessintegration RUNC_USE_SYSTEMD=yes" | ||
fi | ||
integration_fs_rootless_script: | | ||
if [ $DISTRO == centos7 ]; then | ||
echo "SKIP: FIXME: integration_fs_rootless_script is skipped because of EPERM on writing cgroup.procs" | ||
else | ||
ssh -tt default "sudo -i make -C /vagrant localrootlessintegration" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters