forked from lima-vm/lima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
70 lines (65 loc) · 2.3 KB
/
.cirrus.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
# We use Cirrus for most of integration tests, because macOS instances of GHA
# are too slow and flaky, and Linux instances of GHA do not support KVM.
# yamllint disable rule:line-length
common_template: &common_template
timeout_in: 30m
# We can't use macOS instances of Cirrus because of lack of support for nested VMs.
# (sysctl machdep.cpu.features lacks "VMX" flag)
container:
image: ubuntu:22.04
kvm: true
cpu: 2
memory: 8G
env:
DEBIAN_FRONTEND: noninteractive
info_script:
- uname -a
- df -T
- ls -l /dev/kvm
- cat /proc/cpuinfo
install_deps_script:
- apt-get update
- apt-get install -y --no-install-recommends ca-certificates curl git golang jq openssh-client make netcat ovmf sudo qemu-system-x86 qemu-utils
go_cache:
fingerprint_script: uname -s ; cat go.sum
folder: $GOPATH/pkg/mod
build_script: make
install_script: make install
prepare_user_script:
- groupadd -g $(stat -c '%g' /dev/kvm) kvm
- useradd -m -G kvm testuser
task:
<<: *common_template
env:
# yamllint disable rule:key-duplicates
matrix:
# We only test "Tier 1" yamls. See examples/README.md for the list of the "Tier 1" yamls.
# default.yaml and vmnet.yaml are tested on GHA macOS.
TEMPLATE: alpine.yaml
TEMPLATE: debian.yaml
TEMPLATE: fedora.yaml
TEMPLATE: archlinux.yaml
TEMPLATE: opensuse.yaml
TEMPLATE: experimental/net-user-v2.yaml
lima_cache:
fingerprint_script: uname -s ; cat examples/$TEMPLATE
folder: /home/testuser/.cache/lima
lima_cache_fix_perm_script: chown -R testuser.testuser /home/testuser
test_script: sudo -iu testuser $(pwd)/hack/test-example.sh $(pwd)/examples/$TEMPLATE
colima_task:
<<: *common_template
colima_install_deps_script:
- curl -fOSL https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce-cli_24.0.1-1~ubuntu.22.04~jammy_amd64.deb
- dpkg -i docker-ce-cli_24.0.1-1~ubuntu.22.04~jammy_amd64.deb
colima_install_script:
- git clone https://github.com/abiosoft/colima
- cd colima
- git checkout v0.5.5
- make
- make install
lima_cache:
fingerprint_script: uname -s ; colima version
folder: /home/testuser/.cache/lima
lima_cache_fix_perm_script: chown -R testuser.testuser /home/testuser
test_script: sudo -iu testuser $(pwd)/hack/test-colima.sh