Skip to content

Commit

Permalink
Used 'ubuntu-latest' runner for android emulator
Browse files Browse the repository at this point in the history
  • Loading branch information
siarhei-luskanau committed Feb 28, 2024
1 parent 3a12e85 commit da60fac
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/actionsBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,21 +127,30 @@ jobs:

Emulator:
needs: jobEmulatorMatrixSetup
runs-on: macos-latest
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.jobEmulatorMatrixSetup.outputs.emulator_jobs_matrix) }}
steps:

- uses: actions/checkout@v4

- name: Enable KVM group perms
if: ${{ matrix.os != 'self-hosted' }}
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
- uses: actions/setup-java@v4
if: ${{ matrix.os != 'self-hosted' }}
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}

- uses: android-actions/setup-android@v3
- uses: gradle/gradle-build-action@v3
with:
arguments: ciSdkManagerLicenses --stacktrace

- uses: gradle/gradle-build-action@v3
with:
Expand Down
4 changes: 1 addition & 3 deletions buildSrc/src/main/kotlin/EmulatorJobsMatrix.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,13 @@ class EmulatorJobsMatrix {
EMULATOR_VERSIONS.mapNotNull { version ->
when {
":app" == subProject.path -> listOf(
"ciSdkManagerLicenses",
"${subProject.path}:managedVirtualDevice${version}DiDaggerDebugAndroidTest",
"${subProject.path}:managedVirtualDevice${version}DiKodeinDebugAndroidTest",
"${subProject.path}:managedVirtualDevice${version}DiKoinDebugAndroidTest",
"${subProject.path}:managedVirtualDevice${version}DiManualDebugAndroidTest",
)

File(subProject.projectDir, "src${File.separator}androidInstrumentedTest").exists() -> listOf(
"ciSdkManagerLicenses",
"${subProject.path}:managedVirtualDevice${version}DebugAndroidTest"
)

Expand All @@ -46,7 +44,7 @@ class EmulatorJobsMatrix {
it.add("-Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect")
it.add("-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true")
}.also {
if (!true.toString().equals(other = System.getProperty("CI"), ignoreCase = true)) {
if (!true.toString().equals(other = System.getenv("CI"), ignoreCase = true)) {
it.add("--enable-display")
}
}.joinToString(separator = " ")
Expand Down
3 changes: 0 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
org.gradle.jvmargs=-Xmx3072m
org.gradle.daemon=false
kotlin.code.style=official
#kotlin.experimental.tryK2=true
android.nonTransitiveRClass=true
android.useAndroidX=true
#android.lint.useK2Uast=true
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ build-javaVersion = "VERSION_17"
build-jvmTarget = "17"
coil = "2.6.0"
compose-bom = "2024.02.01"
compose-compiler = "1.5.9"
compose-compiler = "1.5.10"
dagger = "2.50"
detekt = "1.23.5"
gitlive-firebase = "1.11.1"
Expand Down

0 comments on commit da60fac

Please sign in to comment.