Skip to content

Commit

Permalink
Merge pull request #1147 from square/sedwards/upgrade-runner
Browse files Browse the repository at this point in the history
Use Larger Runner Group for kotlin.yml Workflow
  • Loading branch information
steve-the-edwards authored Dec 20, 2023
2 parents 1699447 + c823bc7 commit 766cfe5
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 8 deletions.
9 changes: 9 additions & 0 deletions .github/actions/gradle-tasks-with-emulator/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 12 additions & 8 deletions .github/workflows/kotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand All @@ -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 :
Expand All @@ -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

Expand Down Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down

0 comments on commit 766cfe5

Please sign in to comment.