Skip to content

Commit 19ee35b

Browse files
committed
CI: test vmnet
Signed-off-by: Akihiro Suda <[email protected]>
1 parent b6f7467 commit 19ee35b

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

.github/workflows/test.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ jobs:
7070
run: make
7171
- name: Install
7272
run: sudo make install
73-
- name: Validate examples
74-
run: limactl validate ./examples/*.yaml
73+
- name: Validate examples (except vmnet.yaml)
74+
run: find examples -name '*.yaml' | grep -v 'vmnet.yaml' | xargs limactl validate
7575
- name: Uninstall
7676
run: sudo make uninstall
7777

@@ -81,9 +81,9 @@ jobs:
8181
timeout-minutes: 40
8282
strategy:
8383
matrix:
84-
# GHA macOS is slow and flaky, so we only test "default.yaml" here.
84+
# GHA macOS is slow and flaky, so we only test a few YAMLS here.
8585
# Other yamls are tested on Linux instances of Cirrus.
86-
example: [default.yaml]
86+
example: [default.yaml, vmnet.yaml]
8787
steps:
8888
- uses: actions/setup-go@v2
8989
with:
@@ -100,6 +100,16 @@ jobs:
100100
# bash: required by test-example.sh (OS version of bash is too old)
101101
# coreutils: required by test-example.sh for the "timeout" command
102102
run: brew install qemu bash coreutils
103+
- name: Install vde_vmnet
104+
if: matrix.example == 'vmnet.yaml'
105+
env:
106+
VDE_VMNET_VERSION: v0.4.0
107+
run: |
108+
git clone https://github.com/lima-vm/vde_vmnet
109+
cd vde_vmnet
110+
git checkout $VDE_VMNET_VERSION
111+
make
112+
sudo make install
103113
- name: Prepare ssh
104114
run: |
105115
if [ -e ~/.ssh/id_rsa ]; then

examples/vmnet.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
images:
2+
# Hint: run `limactl prune` to invalidate the "current" cache
3+
- location: "https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-amd64.img"
4+
arch: "x86_64"
5+
- location: "https://cloud-images.ubuntu.com/hirsute/current/hirsute-server-cloudimg-arm64.img"
6+
arch: "aarch64"
7+
mounts:
8+
- location: "~"
9+
writable: false
10+
- location: "/tmp/lima"
11+
writable: true
12+
ssh:
13+
# localPort is changed from 60022 to avoid conflicting with the default.
14+
# (TODO: assign localPort automatically)
15+
localPort: 60105
16+
17+
network:
18+
# The instance can get routable IP addresses from the vmnet framework using
19+
# https://github.com/lima-vm/vde_vmnet. Both vde_switch and vde_vmnet
20+
# daemons must be running before the instance is started. The interface type
21+
# (host, shared, or bridged) is configured in vde_vmnet and not lima.
22+
vde:
23+
- url: "/var/run/vde.ctl"

0 commit comments

Comments
 (0)