diff --git a/.github/actions/gradle-tasks-with-emulator/action.yml b/.github/actions/gradle-tasks-with-emulator/action.yml index b0032eed5..c7ff99fbe 100644 --- a/.github/actions/gradle-tasks-with-emulator/action.yml +++ b/.github/actions/gradle-tasks-with-emulator/action.yml @@ -31,6 +31,15 @@ runs : using : 'composite' steps : + # Setup the runner in the KVM group to enable HW Accleration for the emulator. + # see https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/ + - name: Enable KVM group perms + shell: bash + 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 + # Create or fetch the artifacts used for these tests. - name : Run ${{ inputs.prepare-task }} uses : ./.github/actions/gradle-task diff --git a/.github/workflows/kotlin.yml b/.github/workflows/kotlin.yml index e1e04f72a..2a783d5ff 100644 --- a/.github/workflows/kotlin.yml +++ b/.github/workflows/kotlin.yml @@ -4,7 +4,11 @@ on : push : branches : - main - pull_request : + # pull_request : + # Use pull_request_target so we can lock the runner down to run only on the main branch. + pull_request_target : + branches : + - main merge_group : env: @@ -19,7 +23,7 @@ jobs : build-all : name : Build all - runs-on : macos-latest + runs-on : workflow-kotlin-test-runner-ubuntu-4core steps : - uses : actions/checkout@v3 @@ -30,7 +34,7 @@ jobs : write-cache-key : main-build-artifacts dokka : - name : Assemble & Dokka + name : Dokka runs-on : ubuntu-latest needs : build-all steps : @@ -44,7 +48,7 @@ jobs : shards-and-version : name : Shard Matrix Yaml - runs-on : ubuntu-latest + runs-on : workflow-kotlin-test-runner-ubuntu-4core steps : - uses : actions/checkout@v3 @@ -269,7 +273,7 @@ jobs : performance-tests : name : Performance tests - runs-on : macos-latest + runs-on : workflow-kotlin-test-runner-ubuntu-4core timeout-minutes : 45 strategy : # Allow tests to continue on other devices if they fail on one device. @@ -290,7 +294,7 @@ jobs : instrumentation-tests : name : Instrumentation tests - runs-on : macos-latest + runs-on : workflow-kotlin-test-runner-ubuntu-4core timeout-minutes : 60 strategy : # Allow tests to continue on other devices if they fail on one device. @@ -314,8 +318,8 @@ jobs : restore-cache-key : main-build-artifacts runtime-instrumentation-tests : - name : Conflate Stale Renderings Instrumentation tests - runs-on : macos-latest + name : Alternate Runtime Instrumentation tests + runs-on : workflow-kotlin-test-runner-ubuntu-4core timeout-minutes : 60 strategy : # Allow tests to continue on other devices if they fail on one device.