@@ -528,6 +528,85 @@ jobs:
528528 ${{github.workspace}}/report/*.xml
529529 ${{github.workspace}}/report/*.log
530530
531+ integration-vagrant :
532+ name : Vagrant integration
533+ runs-on : ubuntu-22.04
534+ timeout-minutes : 60
535+ needs : [project, linters, protos, man]
536+
537+ strategy :
538+ fail-fast : false
539+ matrix :
540+ box :
541+ - fedora/39-cloud-base
542+ # We have to keep EL8 to test old glibc, cgroup, kernel, etc.
543+ # The image was changed from rockylinux/8 to almalinux/8,
544+ # as the former one no longer works:
545+ # https://github.com/containerd/containerd/pull/10297
546+ - almalinux/8
547+ 548+ env :
549+ BOX : ${{ matrix.box }}
550+
551+ steps :
552+ - name : Show the host info
553+ run : |
554+ set -x
555+ uname -a
556+ cat /etc/os-release
557+ cat /proc/cpuinfo
558+ free -mt
559+ - uses : actions/checkout@v4
560+ - uses : actions/cache@v4
561+ with :
562+ path : /root/.vagrant.d
563+ key : vagrant-${{ matrix.box }}
564+ - name : Set up vagrant
565+ run : |
566+ # Canonical's Vagrant 2.2.19 dpkg cannot download Fedora 38 image: https://bugs.launchpad.net/vagrant/+bug/2017828
567+ # So we have to install Vagrant >= 2.3.1 from the upstream: https://github.com/opencontainers/runc/blob/v1.1.8/.cirrus.yml#L41-L49
568+ curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
569+ echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
570+ sudo sed -i 's/^# deb-src/deb-src/' /etc/apt/sources.list
571+ sudo apt-get update
572+ sudo apt-get install -y libvirt-daemon libvirt-daemon-system vagrant
573+ sudo systemctl enable --now libvirtd
574+ sudo apt-get build-dep -y vagrant ruby-libvirt
575+ sudo apt-get install -y --no-install-recommends libxslt-dev libxml2-dev libvirt-dev ruby-bundler ruby-dev zlib1g-dev
576+ sudo vagrant plugin install vagrant-libvirt
577+ - name : Boot VM
578+ run : sudo BOX=$BOX vagrant up --no-tty
579+ - name : test-integration
580+ run : sudo BOX=$BOX vagrant up --provision-with=selinux,install-runc,install-gotestsum,test-integration
581+ - name : test-cri-integration
582+ run : sudo BOX=$BOX vagrant up --provision-with=selinux,install-runc,install-gotestsum,test-cri-integration
583+ - name : test-cri
584+ run : sudo BOX=$BOX vagrant up --provision-with=selinux,install-runc,install-gotestsum,test-cri
585+
586+ tests-cri-in-userns :
587+ name : " CRI-in-UserNS"
588+
589+ runs-on : ubuntu-22.04
590+ timeout-minutes : 40
591+ needs : [project, linters, protos, man]
592+
593+ steps :
594+ - uses : actions/checkout@v4
595+ - name : Set up cgroup v2 delegation
596+ run : |
597+ sudo mkdir -p /etc/systemd/system/[email protected] 598+ cat <<EOF | sudo tee /etc/systemd/system/[email protected] /delegate.conf 599+ [Service]
600+ Delegate=cpu cpuset io memory pids
601+ EOF
602+ sudo systemctl daemon-reload
603+ - name : Build cri-in-userns image
604+ run : podman build --target cri-in-userns -t cri-in-userns -f ./contrib/Dockerfile.test .
605+ - name : Run cri-in-userns image
606+ # Rootless Podman is used for testing CRI-in-UserNS
607+ # (We could use rootless Docker or rootless nerdctl, but we are using Podman here because it is preinstalled)
608+ run : podman run --rm --privileged cri-in-userns
609+
531610 tests-mac-os :
532611 name : MacOS unit tests
533612 runs-on : macos-12
0 commit comments