From 48b1b9b105e5bfa4a4a302da88a2321dbc46400c Mon Sep 17 00:00:00 2001 From: pandeymangg Date: Mon, 9 Nov 2026 17:39:47 +0530 Subject: [PATCH 1/2] ci: replace the Setup KVM step so SonarCloud runs on Ubuntu 26.04 qemu-kvm has no install candidate on 26.04, so the apt step fails before any analysis runs. Hosted runners already expose /dev/kvm; the emulator only needs permission to use it, so use the udev rule from the android-emulator-runner README instead. runs-on is ubuntu-26.04 in this commit on purpose, to test the step on the image that broke. The next commit returns it to ubuntu-latest. --- .github/workflows/sonarcloud.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 862360d..81df045 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -14,9 +14,7 @@ permissions: jobs: sonarcloud: name: SonarCloud - # Pinned: ubuntu-latest is now 26.04, where `qemu-kvm` has no install candidate and the - # "Setup KVM" step fails. Move to a newer image only after reworking that step. - runs-on: ubuntu-24.04 + runs-on: ubuntu-26.04 steps: - name: Harden Runner @@ -44,14 +42,13 @@ jobs: # installed again by "Install SDK components" below, so this loses nothing. packages: platform-tools - # Setup KVM for hardware acceleration - - name: Setup KVM + # Hosted runners already expose /dev/kvm; the emulator only needs permission to use it. + # Installing qemu-kvm is not needed, and it has no install candidate on Ubuntu 26.04. + - name: Enable KVM run: | - sudo apt-get update - sudo apt-get install -y qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils - sudo adduser $USER kvm - sudo chown $USER /dev/kvm - sudo chmod 777 /dev/kvm + 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 # Accept Android SDK licenses - name: Accept Android SDK licenses From 044689b699be264a4affe4c977e8da522e504178 Mon Sep 17 00:00:00 2001 From: pandeymangg Date: Mon, 9 Nov 2026 17:52:32 +0530 Subject: [PATCH 2/2] ci: go back to ubuntu-latest for the SonarCloud job The 26.04 run of the new Enable KVM step passed end to end, so the job no longer needs a pinned image. --- .github/workflows/sonarcloud.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 81df045..475ca44 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -14,7 +14,7 @@ permissions: jobs: sonarcloud: name: SonarCloud - runs-on: ubuntu-26.04 + runs-on: ubuntu-latest steps: - name: Harden Runner