Skip to content

Commit

Permalink
CI: fix starting qemu
Browse files Browse the repository at this point in the history
Signed-off-by: Akihiro Suda <[email protected]>
  • Loading branch information
AkihiroSuda committed Aug 3, 2023
1 parent fefb3d9 commit 9eb24b4
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
uname -a
sw_vers
ifconfig
- name: Workaround for macos-13
if: matrix.platform == 'macos-13'
run: |
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add /usr/libexec/bootpd
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblock /usr/libexec/bootpd
- name: Make Install (x86_64)
run: |
# compile for x86_64
Expand All @@ -47,27 +52,45 @@ jobs:
# Bridged mode cannot be tested on GHA
- uses: actions/setup-go@v3
with:
go-version: 1.19.x
go-version: 1.20.x
- name: Install Lima
run: |
git clone https://github.com/lima-vm/lima
cd lima
git checkout v0.14.2
git checkout v0.16.0
make
sudo make install
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
run: brew install iperf3 jq
- name: "Lima: iperf3 (host -> vm1)"
- name: "Lima: vm1: prepare"
run: |
limactl start --name=vm1 --set '.cpus=1 | .memory = "1GiB"' --tty=false template://vmnet
limactl shell vm1 ip a
- name: "Lima: vm1: set up iperf3"
run: |
limactl start --name=vm1 --tty=false template://vmnet
limactl shell vm1 sudo DEBIAN_FRONTEND=noninteractive apt-get install -y iperf3
limactl shell vm1 systemd-run --user --unit=iperf3 iperf3 -s
- name: "Lima: vm1: get the IP"
run: |
limactl shell vm1 ip -4 -json addr show dev lima0 | jq -r .[0].addr_info[0].local | tee /tmp/vm1_iP
- name: "Lima: vm1: iperf3 (host -> vm1)"
run: |
iperf3 -c "$(cat /tmp/vm1_ip)"
- name: "Lima: iperf3 (vm2 -> vm1)"
- name: "Lima: vm1: debug"
if: failure()
run: tail -n500 ~/.lima/vm1/*.log
- name: "Lima: vm2: prepare"
run: |
limactl start --name=vm2 --set '.cpus=1 | .memory = "1GiB"' --tty=false template://vmnet
limactl shell vm2 ip a
- name: "Lima: vm2: set up iperf3"
run: |
limactl start --name=vm2 --tty=false template://vmnet
limactl shell vm2 sudo DEBIAN_FRONTEND=noninteractive apt-get install -y iperf3
- name: "Lima: vm2: iperf3 (vm2 -> vm1)"
run: |
limactl shell vm2 iperf3 -c "$(cat /tmp/vm1_ip)"
- name: "Lima: vm2: debug"
if: failure()
run: tail -n500 ~/.lima/vm2/*.log

0 comments on commit 9eb24b4

Please sign in to comment.