Skip to content

Commit 766cfe5

Browse files
Merge pull request #1147 from square/sedwards/upgrade-runner
Use Larger Runner Group for kotlin.yml Workflow
2 parents 1699447 + c823bc7 commit 766cfe5

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

.github/actions/gradle-tasks-with-emulator/action.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ runs :
3131
using : 'composite'
3232
steps :
3333

34+
# Setup the runner in the KVM group to enable HW Accleration for the emulator.
35+
# see https://github.blog/changelog/2023-02-23-hardware-accelerated-android-virtualization-on-actions-windows-and-linux-larger-hosted-runners/
36+
- name: Enable KVM group perms
37+
shell: bash
38+
run: |
39+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
40+
sudo udevadm control --reload-rules
41+
sudo udevadm trigger --name-match=kvm
42+
3443
# Create or fetch the artifacts used for these tests.
3544
- name : Run ${{ inputs.prepare-task }}
3645
uses : ./.github/actions/gradle-task

.github/workflows/kotlin.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ on :
44
push :
55
branches :
66
- main
7-
pull_request :
7+
# pull_request :
8+
# Use pull_request_target so we can lock the runner down to run only on the main branch.
9+
pull_request_target :
10+
branches :
11+
- main
812
merge_group :
913

1014
env:
@@ -19,7 +23,7 @@ jobs :
1923

2024
build-all :
2125
name : Build all
22-
runs-on : macos-latest
26+
runs-on : workflow-kotlin-test-runner-ubuntu-4core
2327
steps :
2428
- uses : actions/checkout@v3
2529

@@ -30,7 +34,7 @@ jobs :
3034
write-cache-key : main-build-artifacts
3135

3236
dokka :
33-
name : Assemble & Dokka
37+
name : Dokka
3438
runs-on : ubuntu-latest
3539
needs : build-all
3640
steps :
@@ -44,7 +48,7 @@ jobs :
4448

4549
shards-and-version :
4650
name : Shard Matrix Yaml
47-
runs-on : ubuntu-latest
51+
runs-on : workflow-kotlin-test-runner-ubuntu-4core
4852
steps :
4953
- uses : actions/checkout@v3
5054

@@ -269,7 +273,7 @@ jobs :
269273

270274
performance-tests :
271275
name : Performance tests
272-
runs-on : macos-latest
276+
runs-on : workflow-kotlin-test-runner-ubuntu-4core
273277
timeout-minutes : 45
274278
strategy :
275279
# Allow tests to continue on other devices if they fail on one device.
@@ -290,7 +294,7 @@ jobs :
290294

291295
instrumentation-tests :
292296
name : Instrumentation tests
293-
runs-on : macos-latest
297+
runs-on : workflow-kotlin-test-runner-ubuntu-4core
294298
timeout-minutes : 60
295299
strategy :
296300
# Allow tests to continue on other devices if they fail on one device.
@@ -314,8 +318,8 @@ jobs :
314318
restore-cache-key : main-build-artifacts
315319

316320
runtime-instrumentation-tests :
317-
name : Conflate Stale Renderings Instrumentation tests
318-
runs-on : macos-latest
321+
name : Alternate Runtime Instrumentation tests
322+
runs-on : workflow-kotlin-test-runner-ubuntu-4core
319323
timeout-minutes : 60
320324
strategy :
321325
# Allow tests to continue on other devices if they fail on one device.

0 commit comments

Comments
 (0)