From 26638c673108a056d53d8eacfd4e04f6e8c438d3 Mon Sep 17 00:00:00 2001 From: Javier Arroyo Date: Thu, 26 Sep 2024 15:24:43 +0200 Subject: [PATCH] Task: Baseline CI - Generate Baseline Profiles using GitHub Actions --- .../workflows/baseline-profile-generator.yml | 36 +++++++++++-------- .../debugRuntimeClasspathDependencies.txt | 16 ++++----- .../releaseRuntimeClasspathDependencies.txt | 16 ++++----- gradle/libs.versions.toml | 2 +- 4 files changed, 39 insertions(+), 31 deletions(-) diff --git a/.github/workflows/baseline-profile-generator.yml b/.github/workflows/baseline-profile-generator.yml index 140ab6c2..cb097bb0 100644 --- a/.github/workflows/baseline-profile-generator.yml +++ b/.github/workflows/baseline-profile-generator.yml @@ -12,23 +12,36 @@ concurrency: jobs: generate-baseline-profile: name: Generate Baseline Profile - runs-on: macos-latest + runs-on: ubuntu-latest timeout-minutes: 120 env: TERM: dumb steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Enable KVM group perms + 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 + ls /dev/kvm + + - name: Copy CI gradle.properties + run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties - name: Setup JDK - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: distribution: 'temurin' java-version: 17.0.6 - - name: Copy CI gradle.properties - run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Setup Android SDK + uses: android-actions/setup-android@v3 - name: Validate gradle wrapper uses: gradle/wrapper-validation-action@v1 @@ -36,8 +49,8 @@ jobs: - name: Create Local Properties File run: touch local.properties - - name: Install GMD image for baseline profile generation - run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;aosp_atd;x86_64" + ## - name: Install GMD image for baseline profile generation + ## run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-33;aosp_atd;x86_64" - name: Accept Android licenses run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true @@ -55,14 +68,9 @@ jobs: - name: Generate Baseline Profile run: | ./gradlew :macrobenchmark:forlago:pixel6Api31BenchmarkAndroidTest - -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile - -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" - -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true - -Pandroid.experimental.androidTest.numManagedDeviceShards=1 - -Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1 - -Pandroid.experimental.testOptions.managedDevices.setupTimeoutMinutes=180 - --max-workers=1 --info + -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true + -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" - name: Move & Rename Baseline Profile run: mv -f macrobenchmark/build/outputs/managed_device_android_test_additional_output/pixel6Api31/BaselineProfileGenerator_startup-baseline-prof.txt apps/forlago/src/main/baselineProfiles/baseline-prof.txt diff --git a/apps/forlago/versions/dependencies/debugRuntimeClasspathDependencies.txt b/apps/forlago/versions/dependencies/debugRuntimeClasspathDependencies.txt index 5ddc456a..5c0db816 100644 --- a/apps/forlago/versions/dependencies/debugRuntimeClasspathDependencies.txt +++ b/apps/forlago/versions/dependencies/debugRuntimeClasspathDependencies.txt @@ -1084,9 +1084,6 @@ debugRuntimeClasspath - Runtime classpath of /debug. | +--- com.michael-bull.kotlin-result:kotlin-result-coroutines:2.0.0 (*) | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7 (*) | +--- com.jakewharton.timber:timber:5.0.1 (*) -| +--- project :modules:library-autobind-annotation -| | +--- com.google.dagger:hilt-core:2.52 (*) -| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 -> 2.0.0 (*) | +--- project :modules:library-android-api | | +--- com.google.android.play:app-update:2.1.0 | | | +--- com.google.android.gms:play-services-basement:18.1.0 -> 18.4.0 @@ -1128,6 +1125,9 @@ debugRuntimeClasspath - Runtime classpath of /debug. | | | \--- androidx.room:room-common:2.6.1 (c) | | +--- com.google.dagger:hilt-android:2.52 (*) | | \--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3 (*) +| +--- project :modules:library-autobind-annotation +| | +--- com.google.dagger:hilt-core:2.52 (*) +| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 -> 2.0.0 (*) | +--- project :modules:library-i18n | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 -> 2.0.0 (*) | | +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.25 (*) @@ -1575,8 +1575,8 @@ debugRuntimeClasspath - Runtime classpath of /debug. | +--- com.michael-bull.kotlin-result:kotlin-result-coroutines:2.0.0 (*) | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7 (*) | +--- com.jakewharton.timber:timber:5.0.1 (*) -| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-android-api (*) +| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-i18n (*) | +--- project :modules:library-logging-api (*) | +--- project :modules:library-ui (*) @@ -1609,8 +1609,8 @@ debugRuntimeClasspath - Runtime classpath of /debug. | +--- com.michael-bull.kotlin-result:kotlin-result-coroutines:2.0.0 (*) | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7 (*) | +--- com.jakewharton.timber:timber:5.0.1 (*) -| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-android-api (*) +| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-i18n (*) | +--- project :modules:library-logging-api (*) | +--- project :modules:library-ui (*) @@ -1660,8 +1660,8 @@ debugRuntimeClasspath - Runtime classpath of /debug. | +--- com.michael-bull.kotlin-result:kotlin-result-coroutines:2.0.0 (*) | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7 (*) | +--- com.jakewharton.timber:timber:5.0.1 (*) -| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-android-api (*) +| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-i18n (*) | +--- project :modules:library-logging-api (*) | +--- project :modules:library-ui (*) @@ -1685,8 +1685,8 @@ debugRuntimeClasspath - Runtime classpath of /debug. | +--- com.michael-bull.kotlin-result:kotlin-result-coroutines:2.0.0 (*) | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7 (*) | +--- com.jakewharton.timber:timber:5.0.1 (*) -| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-android-api (*) +| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-i18n (*) | +--- project :modules:library-logging-api (*) | +--- project :modules:library-ui (*) @@ -1764,8 +1764,8 @@ debugRuntimeClasspath - Runtime classpath of /debug. | +--- com.michael-bull.kotlin-result:kotlin-result-coroutines:2.0.0 (*) | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7 (*) | +--- com.jakewharton.timber:timber:5.0.1 (*) -| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-android-api (*) +| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-i18n (*) | +--- project :modules:library-logging-api (*) | +--- project :modules:library-ui (*) diff --git a/apps/forlago/versions/dependencies/releaseRuntimeClasspathDependencies.txt b/apps/forlago/versions/dependencies/releaseRuntimeClasspathDependencies.txt index 0f99eefc..2ce02422 100644 --- a/apps/forlago/versions/dependencies/releaseRuntimeClasspathDependencies.txt +++ b/apps/forlago/versions/dependencies/releaseRuntimeClasspathDependencies.txt @@ -956,9 +956,6 @@ releaseRuntimeClasspath - Runtime classpath of /release. | +--- com.michael-bull.kotlin-result:kotlin-result-coroutines:2.0.0 (*) | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7 (*) | +--- com.jakewharton.timber:timber:5.0.1 (*) -| +--- project :modules:library-autobind-annotation -| | +--- com.google.dagger:hilt-core:2.52 (*) -| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 -> 2.0.0 (*) | +--- project :modules:library-android-api | | +--- com.google.android.play:app-update:2.1.0 | | | +--- com.google.android.gms:play-services-basement:18.1.0 -> 18.4.0 @@ -1000,6 +997,9 @@ releaseRuntimeClasspath - Runtime classpath of /release. | | +--- com.google.dagger:hilt-android:2.52 (*) | | +--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3 (*) | | \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.25 (*) +| +--- project :modules:library-autobind-annotation +| | +--- com.google.dagger:hilt-core:2.52 (*) +| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 -> 2.0.0 (*) | +--- project :modules:library-i18n | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 -> 2.0.0 (*) | | +--- androidx.core:core-ktx:1.13.1 (*) @@ -1527,8 +1527,8 @@ releaseRuntimeClasspath - Runtime classpath of /release. | +--- com.michael-bull.kotlin-result:kotlin-result-coroutines:2.0.0 (*) | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7 (*) | +--- com.jakewharton.timber:timber:5.0.1 (*) -| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-android-api (*) +| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-i18n (*) | +--- project :modules:library-logging-api (*) | +--- project :modules:library-ui (*) @@ -1561,8 +1561,8 @@ releaseRuntimeClasspath - Runtime classpath of /release. | +--- com.michael-bull.kotlin-result:kotlin-result-coroutines:2.0.0 (*) | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7 (*) | +--- com.jakewharton.timber:timber:5.0.1 (*) -| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-android-api (*) +| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-i18n (*) | +--- project :modules:library-logging-api (*) | +--- project :modules:library-ui (*) @@ -1612,8 +1612,8 @@ releaseRuntimeClasspath - Runtime classpath of /release. | +--- com.michael-bull.kotlin-result:kotlin-result-coroutines:2.0.0 (*) | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7 (*) | +--- com.jakewharton.timber:timber:5.0.1 (*) -| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-android-api (*) +| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-i18n (*) | +--- project :modules:library-logging-api (*) | +--- project :modules:library-ui (*) @@ -1637,8 +1637,8 @@ releaseRuntimeClasspath - Runtime classpath of /release. | +--- com.michael-bull.kotlin-result:kotlin-result-coroutines:2.0.0 (*) | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7 (*) | +--- com.jakewharton.timber:timber:5.0.1 (*) -| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-android-api (*) +| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-i18n (*) | +--- project :modules:library-logging-api (*) | +--- project :modules:library-ui (*) @@ -1716,8 +1716,8 @@ releaseRuntimeClasspath - Runtime classpath of /release. | +--- com.michael-bull.kotlin-result:kotlin-result-coroutines:2.0.0 (*) | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7 (*) | +--- com.jakewharton.timber:timber:5.0.1 (*) -| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-android-api (*) +| +--- project :modules:library-autobind-annotation (*) | +--- project :modules:library-i18n (*) | +--- project :modules:library-logging-api (*) | +--- project :modules:library-ui (*) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e8597e79..8f846eb0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -42,7 +42,7 @@ accompanist-permissions = { module = "com.google.accompanist:accompanist-permiss android-mail = "com.sun.mail:android-mail:1.6.7" androidx-activity-compose = "androidx.activity:activity-compose:1.9.2" androidx-appcompat = "androidx.appcompat:appcompat:1.7.0" -androidx-benchmark-macro-junit4 = "androidx.benchmark:benchmark-macro-junit4:1.3.0" +androidx-benchmark-macro-junit4 = "androidx.benchmark:benchmark-macro-junit4:1.3.1" androidx-biometric = "androidx.biometric:biometric:1.2.0-alpha05" androidx-browser = "androidx.browser:browser:1.8.0" androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "androidx-compose" }