From 10fe248c26f047f8b530da10648baa479cb7b1f5 Mon Sep 17 00:00:00 2001 From: Tomohisa Tanaka Date: Sat, 20 Jan 2024 15:55:42 +0900 Subject: [PATCH] Enable KVM on the Linux platform --- .github/workflows/android.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 6e4f5fe..c9d2647 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -64,6 +64,17 @@ jobs: runs-on: ${{matrix.os}} steps: + # https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/ + # https://github.blog/2024-01-17-github-hosted-runners-double-the-power-for-open-source/ + - name: Enable KVM group perms + id: enable_kvm + if: runner.os == 'Linux' + continue-on-error: true + 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 - uses: actions/checkout@v3 with: submodules: true