Skip to content

Commit bca3ef8

Browse files
committed
run-vmtest: factor out install-dependencies.sh
Move dependencies setup from action.yml to a shell script. Add iproute2 and friends to the list of installed packages. Signed-off-by: Ihor Solodrai <[email protected]>
1 parent eef7124 commit bca3ef8

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

run-vmtest/action.yml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,13 @@ inputs:
3535
runs:
3636
using: "composite"
3737
steps:
38-
- name: Download vmtest
39-
shell: bash
40-
run: |
41-
VMTEST_URL="https://github.com/danobi/vmtest/releases/download/${{ inputs.vmtest-release }}/vmtest-$(uname -m)"
42-
sudo curl -L $VMTEST_URL -o /usr/bin/vmtest
43-
sudo chmod 755 /usr/bin/vmtest
44-
- name: install qemu tools and selftest dependencies
38+
39+
- name: Install dependencies
4540
shell: bash
46-
run: |
47-
source "${GITHUB_ACTION_PATH}/../helpers.sh"
48-
foldable start install_qemu "Installing QEMU tools"
49-
# need gawk to support `--field-separator`
50-
sudo apt-get update && sudo apt-get install -y cpu-checker qemu-kvm qemu-utils qemu-system-x86 qemu-system-s390x qemu-system-arm qemu-guest-agent \
51-
ethtool keyutils iptables libpcap-dev \
52-
gawk
53-
foldable end install_qemu
41+
env:
42+
VMTEST_RELEASE: ${{ inputs.vmtest-release }}
43+
run: ${GITHUB_ACTION_PATH}/install-dependencies.sh
44+
5445
- name: Configure KVM group perms
5546
shell: bash
5647
run: |
@@ -64,6 +55,7 @@ runs:
6455
sudo udevadm trigger --name-match=kvm
6556
fi
6657
foldable end config_kvm
58+
6759
- name: Run vmtest
6860
shell: bash
6961
env:

run-vmtest/install-dependencies.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
VMTEST_RELEASE=${VMTEST_RELEASE:-v0.15.0}
6+
VMTEST_URL="https://github.com/danobi/vmtest/releases/download/${VMTEST_RELEASE}/vmtest-$(uname -m)"
7+
sudo curl -L $VMTEST_URL -o /usr/bin/vmtest
8+
sudo chmod 755 /usr/bin/vmtest
9+
10+
sudo apt-get update -y
11+
sudo -E apt-get install --no-install-recommends -y \
12+
cpu-checker ethtool gawk iproute2 iptables iputils-ping keyutils libpcap-dev
13+
sudo -E apt-get install --no-install-recommends -y \
14+
qemu-guest-agent qemu-kvm qemu-system-arm qemu-system-s390x qemu-system-x86 qemu-utils

0 commit comments

Comments
 (0)