From e147ae61a454118670194c7d15fbdbf11c94f647 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Sat, 23 Nov 2024 02:36:21 +0200 Subject: [PATCH 1/3] ci: Use lima from brew Since we are testing the latest commit there is no reason to build lima from source. This saves about 5 minutes and removes the go dependency. Signed-off-by: Nir Soffer --- .github/workflows/test.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8de60a..4d03b99 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -66,16 +66,9 @@ jobs: - name: Test (shared mode) run: ./test/test.sh /var/run/socket_vmnet # Bridged mode cannot be tested on GHA - - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 - with: - go-version: 1.23.x - name: Install Lima run: | - git clone https://github.com/lima-vm/lima - cd lima - git checkout v0.23.2 - make - sudo make install + brew install lima limactl sudoers >etc_sudoers.d_lima sudo install -o root etc_sudoers.d_lima "/private/etc/sudoers.d/lima" - name: Install the dependencies for the Lima integration test From 08866c443b9bd6c02c67151de4aec5a7e3a7b758 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Sat, 23 Nov 2024 01:14:30 +0200 Subject: [PATCH 2/3] ci: Add apt-get update before install This is standard practice and seems to resolve this this failure: Run limactl shell vm1 sudo DEBIAN_FRONTEND=noninteractive apt-get install -y iperf3 Reading package lists... Building dependency tree... Reading state information... E: Unable to locate package iperf3 Signed-off-by: Nir Soffer --- .github/workflows/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4d03b99..51c3d26 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -79,7 +79,9 @@ jobs: limactl shell vm1 ip a - name: "Lima: vm1: set up iperf3" run: | - limactl shell vm1 sudo DEBIAN_FRONTEND=noninteractive apt-get install -y iperf3 + export DEBIAN_FRONTEND=noninteractive + limactl shell vm1 sudo apt-get update + limactl shell vm1 sudo apt-get install -y iperf3 limactl shell vm1 sudo systemctl start iperf3.service - name: "Lima: vm1: get the IP" run: | @@ -96,7 +98,9 @@ jobs: limactl shell vm2 ip a - name: "Lima: vm2: set up iperf3" run: | - limactl shell vm2 sudo DEBIAN_FRONTEND=noninteractive apt-get install -y iperf3 + export DEBIAN_FRONTEND=noninteractive + limactl shell vm2 sudo apt-get update + limactl shell vm2 sudo apt-get install -y iperf3 - name: "Lima: vm2: iperf3 (vm2 -> vm1)" run: | limactl shell vm2 iperf3 -c "$(cat /tmp/vm1_ip)" From 1905a91c2ce5594e001882f9e53cc99c52c15230 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Sat, 23 Nov 2024 00:31:06 +0200 Subject: [PATCH 3/3] ci: Use plain mode We test on very old and slow machines that tends to fail randomly a lot. Lets minimize the test by using the simplest possible vm without any feature. When we have more powerful and stable runners, we can try to test more interesting vms. Signed-off-by: Nir Soffer --- test/vmnet.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/vmnet.yaml b/test/vmnet.yaml index b6ce748..c2c8e66 100644 --- a/test/vmnet.yaml +++ b/test/vmnet.yaml @@ -13,11 +13,7 @@ images: initrd: location: https://cloud-images.ubuntu.com/releases/24.04/release-20240821/unpacked/ubuntu-24.04-server-cloudimg-amd64-initrd-generic digest: sha256:c44215c42d97abd9ada4a961de0ab7305d74c39860776cf2d7a0260ac9d0637e - -mounts: -- location: "~" -- location: "/tmp/lima" - writable: true +plain: true memory: "1g" cpus: 1 networks: