mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-24 18:29:06 +08:00
ci: move /dev/kvm permissions setup from to actions/vmtest.yml
The vmtest action is used by several workflows: test, pahole, ondemand. At the same time, vmtest action requires valid access rights to /dev/kvm and is the only action that uses it. This commit moves /dev/kvm permissions setup from test workflow to vmtest action, in order to make sure that setup logic is shared by all workflows that run vmtest. Should fix CI failures like [1]. [1] https://github.com/libbpf/libbpf/actions/runs/7104762048/job/19340484589 Signed-off-by: Eduard Zingerman <eddyz87@gmail.com>
This commit is contained in:
committed by
Andrii Nakryiko
parent
1b2ae67c1d
commit
1baa3e2355
16
.github/workflows/test.yml
vendored
16
.github/workflows/test.yml
vendored
@@ -31,22 +31,6 @@ jobs:
|
||||
runs_on: s390x
|
||||
arch: 's390x'
|
||||
steps:
|
||||
# Allow CI user to access /dev/kvm (via qemu) w/o group change/relogin
|
||||
# by changing permissions set by udev.
|
||||
- name: Set /dev/kvm permissions
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -e /dev/kvm ]; then
|
||||
echo "/dev/kvm exists"
|
||||
if [ $(id -u) != 0 ]; then
|
||||
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
|
||||
| sudo tee /etc/udev/rules.d/99-kvm4all.rules > /dev/null
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger --name-match=kvm
|
||||
fi
|
||||
else
|
||||
echo "/dev/kvm does not exist"
|
||||
fi
|
||||
- uses: actions/checkout@v3
|
||||
name: Checkout
|
||||
- uses: ./.github/actions/setup
|
||||
|
||||
Reference in New Issue
Block a user