Skip to content

Commit

Permalink
Task: Baseline CI - Generate Baseline Profiles using GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jarroyoesp committed Sep 26, 2024
1 parent ea8e030 commit 26638c6
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 31 deletions.
36 changes: 22 additions & 14 deletions .github/workflows/baseline-profile-generator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,45 @@ 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

- 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
Expand All @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 (*)
Expand Down Expand Up @@ -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 (*)
Expand Down Expand Up @@ -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 (*)
Expand Down Expand Up @@ -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 (*)
Expand All @@ -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 (*)
Expand Down Expand Up @@ -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 (*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 (*)
Expand Down Expand Up @@ -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 (*)
Expand Down Expand Up @@ -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 (*)
Expand Down Expand Up @@ -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 (*)
Expand All @@ -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 (*)
Expand Down Expand Up @@ -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 (*)
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" }
Expand Down

0 comments on commit 26638c6

Please sign in to comment.