Skip to content

Commit 677b5ec

Browse files
committed
gh: tests: enable KVM support
This is supported on "larger Linux runners" ... https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/ ... which is now free for public GitHub repos: https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/ Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
1 parent 2553fab commit 677b5ec

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

.github/workflows/tests.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,28 @@ jobs:
6262
${{ runner.os }}_tests_${{ steps.branch.outputs.name }}-${{ matrix.mode }}-
6363
${{ runner.os }}_tests_${{ steps.branch.outputs.name }}-
6464
65+
- name: "Docker image"
66+
run: |
67+
/usr/bin/docker pull mptcp/mptcp-upstream-virtme-docker:${{ steps.branch.outputs.name == 'export' && 'latest' || 'net' }}
68+
6569
- name: "Tests"
66-
uses: multipath-tcp/mptcp-upstream-virtme-docker@latest
67-
with:
68-
ccache_maxsize: 500M ## 10GB = project limit
69-
mode: auto-${{ matrix.mode }}
70-
packetdrill_stable: ${{ steps.branch.outputs.name == 'export-net' && '1' || '0' }}
71-
extra_env: ${{ matrix.mode == 'btf' && 'INPUT_RUN_TESTS_ONLY=bpftest_all' || '' }}
72-
trace: ${{ secrets.TESTS_ACTION_DEBUG }}
70+
run: |
71+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
72+
sudo udevadm control --reload-rules
73+
sudo udevadm trigger --name-match=kvm
74+
75+
set -x
76+
/usr/bin/docker run --privileged --rm \
77+
-e "INPUT_CCACHE_MAXSIZE=500M" \
78+
-e "INPUT_PACKETDRILL_STABLE=${{ steps.branch.outputs.name == 'export-net' && '1' || '0' }}" \
79+
-e "INPUT_EXTRA_ENV=${{ matrix.mode == 'btf' && 'INPUT_RUN_TESTS_ONLY=bpftest_all' || '' }}" \
80+
-e "INPUT_TRACE=${RUNNER_DEBUG}" \
81+
-e "INPUT_CI_TIMEOUT_SEC" \
82+
-e "GITHUB_SHA" -e "GITHUB_REF_NAME" -e GITHUB_ACTIONS=true -e CI=true \
83+
--workdir /github/workspace \
84+
-v "${PWD}":"/github/workspace" \
85+
mptcp/mptcp-upstream-virtme-docker:${{ steps.branch.outputs.name == 'export' && 'latest' || 'net' }} \
86+
auto-${{ matrix.mode }}
7387
7488
- name: "Publish conclusion"
7589
if: always()

0 commit comments

Comments
 (0)