From 7afd54e7bd99120fc29969f4785af1c6d8146388 Mon Sep 17 00:00:00 2001 From: Goooler Date: Sat, 20 Jan 2024 11:22:47 +0800 Subject: [PATCH] Enable KVM on base Linux image Refs https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners. --- .github/workflows/build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f0fbd3859..43ac049492 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: run: ./gradlew build android: - runs-on: macos-latest + runs-on: ubuntu-latest strategy: fail-fast: false @@ -34,6 +34,13 @@ jobs: - 29 steps: + - name: Enable KVM group perms + 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 + ls /dev/kvm + - uses: actions/checkout@v4 - uses: actions/setup-java@v4