forked from lima-vm/lima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
46 lines (45 loc) · 1.56 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
---
# 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
task:
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
# 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.
EXAMPLE: alpine.yaml
EXAMPLE: debian.yaml
EXAMPLE: fedora.yaml
EXAMPLE: archlinux.yaml
EXAMPLE: opensuse.yaml
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
lima_cache:
fingerprint_script: uname -s ; cat examples/$EXAMPLE
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/$EXAMPLE