Skip to content

Commit

Permalink
[WIP] evaluate Cirrus CI
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Jul 8, 2021
1 parent 0af586e commit f93c03f
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 40 deletions.
53 changes: 53 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# We use Vagrant to prepare cgroup v2 env.

compute_engine_instance:
image_project: cirrus-images
image: family/docker-kvm
platform: linux
nested_virtualization: true
cpu: 4
memory: 16G

task_template: &TASK_TEMPLATE
timeout_in: 60m
env:
DEBIAN_FRONTEND: noninteractive
HOME: /root
DOCKER_BUILDKIT: 1
info_script:
- uname -a
- cat /proc/cpuinfo
- docker info
build_script:
- make
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
folder: /root/.vagrant.d
vagrant_up_script:
- vagrant up
- vagrant ssh-config > /tmp/vagrant-ssh-config

cri_task:
<< : *TASK_TEMPLATE
env:
# yamllint disable rule:key-duplicates
matrix:
CRI: containerd
CRI: crio
test_script:
- ssh -F /tmp/vagrant-ssh-config default /vagrant/hack/smoketest-binaries.sh --cri=$CRI

compose_task:
<< : *TASK_TEMPLATE
install_docker_script:
- ssh -F /tmp/vagrant-ssh-config default sudo dnf install -y moby-engine docker-compose
- ssh -F /tmp/vagrant-ssh-config default sudo usermod -aG docker vagrant
- ssh -F /tmp/vagrant-ssh-config default sudo systemctl enable --now docker
load_image_script:
- docker save ghcr.io/rootless-containers/usernetes:latest | ssh -F /tmp/vagrant-ssh-config default docker load
test_script:
- ssh -F /tmp/vagrant-ssh-config default /vagrant/hack/smoketest-docker-compose.sh
40 changes: 0 additions & 40 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,43 +28,3 @@ jobs:
run: ./hack/smoketest-docker.sh u7s-test-crio ghcr.io/rootless-containers/usernetes --cri=crio
- name: "Smoke test (multi-node cluster with Flannel)"
run: ./hack/smoketest-docker-compose.sh
fedora:
name: "Fedora (for cgroup v2)"
needs: main
# nested virtualization is only available on macOS hosts
runs-on: macos-10.15
timeout-minutes: 40
steps:
- name: "Download usernetes-x86_64.tbz"
uses: actions/download-artifact@v2
with:
name: usernetes-x86_64.tbz
- name: "Extract usernetes-x86_64.tbz"
run: tar xjvf usernetes-x86_64.tbz
- name: "Boot VM"
working-directory: usernetes
run: |
vagrant up
# <FIXME>
# Enabling cgroup delegation seems to need rebooting since Fedora 34: https://github.com/rootless-containers/rootlesscontaine.rs/issues/32
# We shouldn't need this reboot.
vagrant halt
vagrant up
# </FIXME>
vagrant ssh-config > ~/vagrant-ssh-config
- name: "Smoke test (containerd, w/ systemd-delegated cgroupfs)"
run: ssh -F ~/vagrant-ssh-config default /vagrant/hack/smoketest-binaries.sh --cri=containerd
- name: "Boot VM"
working-directory: usernetes
run: |
vagrant destroy -f
vagrant up
# <FIXME>
# Enabling cgroup delegation seems to need rebooting since Fedora 34: https://github.com/rootless-containers/rootlesscontaine.rs/issues/32
# We shouldn't need this reboot.
vagrant halt
vagrant up
# </FIXME>
vagrant ssh-config > ~/vagrant-ssh-config
- name: "Smoke test (CRI-O, w/ systemd-delegated cgroupfs)"
run: ssh -F ~/vagrant-ssh-config default /vagrant/hack/smoketest-binaries.sh --cri=crio

0 comments on commit f93c03f

Please sign in to comment.