Skip to content

Commit

Permalink
gh: tests: enable KVM support
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
matttbe committed Mar 8, 2024
1 parent 2553fab commit 677b5ec
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,28 @@ jobs:
${{ runner.os }}_tests_${{ steps.branch.outputs.name }}-${{ matrix.mode }}-
${{ runner.os }}_tests_${{ steps.branch.outputs.name }}-
- name: "Docker image"
run: |
/usr/bin/docker pull mptcp/mptcp-upstream-virtme-docker:${{ steps.branch.outputs.name == 'export' && 'latest' || 'net' }}
- name: "Tests"
uses: multipath-tcp/mptcp-upstream-virtme-docker@latest
with:
ccache_maxsize: 500M ## 10GB = project limit
mode: auto-${{ matrix.mode }}
packetdrill_stable: ${{ steps.branch.outputs.name == 'export-net' && '1' || '0' }}
extra_env: ${{ matrix.mode == 'btf' && 'INPUT_RUN_TESTS_ONLY=bpftest_all' || '' }}
trace: ${{ secrets.TESTS_ACTION_DEBUG }}
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
set -x
/usr/bin/docker run --privileged --rm \
-e "INPUT_CCACHE_MAXSIZE=500M" \
-e "INPUT_PACKETDRILL_STABLE=${{ steps.branch.outputs.name == 'export-net' && '1' || '0' }}" \
-e "INPUT_EXTRA_ENV=${{ matrix.mode == 'btf' && 'INPUT_RUN_TESTS_ONLY=bpftest_all' || '' }}" \
-e "INPUT_TRACE=${RUNNER_DEBUG}" \
-e "INPUT_CI_TIMEOUT_SEC" \
-e "GITHUB_SHA" -e "GITHUB_REF_NAME" -e GITHUB_ACTIONS=true -e CI=true \
--workdir /github/workspace \
-v "${PWD}":"/github/workspace" \
mptcp/mptcp-upstream-virtme-docker:${{ steps.branch.outputs.name == 'export' && 'latest' || 'net' }} \
auto-${{ matrix.mode }}
- name: "Publish conclusion"
if: always()
Expand Down

0 comments on commit 677b5ec

Please sign in to comment.