Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 5 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,10 +315,8 @@ jobs:
- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ovmf qemu-system-x86 qemu-utils w3m
sudo modprobe kvm
# `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
sudo chown $(whoami) /dev/kvm
sudo ./hack/install-qemu.sh
sudo apt-get install -y --no-install-recommends w3m
- name: Install ansible-playbook
run: |
sudo apt-get install -y --no-install-recommends ansible
Expand Down Expand Up @@ -360,10 +358,7 @@ jobs:
- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ovmf qemu-system-x86 qemu-utils
sudo modprobe kvm
# `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
sudo chown $(whoami) /dev/kvm
sudo ./hack/install-qemu.sh
- name: Cache image used by templates/default.yaml
uses: ./.github/actions/setup_cache_for_template
with:
Expand Down Expand Up @@ -407,10 +402,7 @@ jobs:
- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ovmf qemu-system-x86 qemu-utils
sudo modprobe kvm
# `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
sudo chown $(whoami) /dev/kvm
sudo ./hack/install-qemu.sh
- name: "Show cache"
run: ./hack/debug-cache.sh
- name: "Test"
Expand Down Expand Up @@ -615,10 +607,6 @@ jobs:
- name: Install test dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends ovmf qemu-system-x86 qemu-utils
qemu-system-x86_64 --version
sudo modprobe kvm
# `sudo usermod -aG kvm $(whoami)` does not take an effect on GHA
sudo chown $(whoami) /dev/kvm
sudo ./hack/install-qemu.sh
- name: Smoke test
run: limactl start --tty=false
16 changes: 16 additions & 0 deletions hack/install-qemu.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

# SPDX-FileCopyrightText: Copyright The Lima Authors
# SPDX-License-Identifier: Apache-2.0

# Install qemu on GitHub Actions runner.
# Not expected to be used outside GitHub Actions.

set -eux

# apt-get update has to be run beforehand
apt-get install -y --no-install-recommends ovmf qemu-system-x86 qemu-utils
modprobe kvm
# `usermod -aG kvm ${SUDO_USER}` does not take an effect on GHA
chown "${SUDO_USER}" /dev/kvm
qemu-system-x86_64 --version