Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub workflow setup #19

Merged
merged 4 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/profile_generation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Generate Baseline Profile

on:
pull_request:
branches-ignore:
- release

jobs:
build-benchmark-apks:
name: Generate baseline profile
runs-on: macos-latest
timeout-minutes: 20

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v1

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17

- name: Generate profile
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 31
arch: x86_64
script: ./gradlew :sample:generateBaselineProfile
20 changes: 1 addition & 19 deletions baseline-profile/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ plugins {

android {
namespace = "io.github.sagar.baseline_profile"
compileSdk = 33
compileSdk = 34

defaultConfig {
minSdk = 24
Expand All @@ -41,18 +41,6 @@ android {

targetProjectPath = ":sample"

testOptions {
managedDevices {
devices {
create ("pixel6Api31", ManagedVirtualDevice::class) {
device = "Pixel 6"
apiLevel = 31
systemImageSource = "aosp"
}
}
}
}

compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
Expand All @@ -68,9 +56,3 @@ dependencies {
implementation("androidx.test.uiautomator:uiautomator:2.2.0")
implementation("androidx.benchmark:benchmark-macro-junit4:1.2.0")
}


baselineProfile {
managedDevices += "pixel6Api31"
useConnectedDevices = false
}
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
*/

plugins {
id("com.android.application") version "8.2.0" apply false
id("com.android.application") version "8.2.0-beta05" apply false
id("org.jetbrains.kotlin.android") version "1.8.10" apply false
id("com.android.test") version "8.2.0" apply false
id("com.android.test") version "8.2.0-beta05" apply false
id("androidx.baselineprofile") version "1.2.0-alpha16" apply false
}

Expand Down
Loading