mirror of
https://github.com/yogeshpaliyal/KeyPass.git
synced 2026-01-05 16:36:31 -06:00
* feat: add baseline profile * feat: minor changes * Update generate-baseline-profile.yml * Update generate-baseline-profile.yml * Cleanup and generate baseline profile * feat(build): Add workflow to generate baseline profile * Install GMD image for baseline profile generation * Accept Android licenses * Generate baseline profile for free release variant * Upload generated baseline profiles as artifact * Fix gmd source * feat: Disable 64-bit requirement for Pixel 6 API 34 The 64-bit requirement has been disabled for the "pixel6Api34" managed virtual device. * feat: Configure and run baseline profile generation * Cleared the default managed devices in `baselineprofile/build.gradle.kts` and explicitly added "pixel6Api34". * Configured the GitHub Actions workflow `generate-baseline-profile.yml` to setup the managed device pixel6Api34. * Configured the workflow to build all build type and flavor permutations. * Added the option to show kernel logging and use "swiftshader_indirect" for GPU in the tests. * Refactor: Update baseline profile setup task * Changed the Gradle task from `:benchmarks:pixel6Api34Setup` to `:baselineprofile:pixel6Api34Setup` in the GitHub Actions workflow for setting up the baseline profile generation. * CI: Comment out GMD image installation in baseline profile generation workflow The GMD image installation step in the `generate-baseline-profile.yml` workflow has been commented out. * feat: Add Baseline Profile generation * The Baseline Profile generation is added in the project * Update baselineprofile module to use connected devices for test execution. * Create a new shell script `generateBaselineProfile.sh` to install app and baseline profile and pull file to `baseline-prof.txt` * Modify `generate-baseline-profile.yml` github workflow to generate profile on device using `reactivecircus/android-emulator-runner` action * Fix the package name to `com.yogeshpaliyal.keypass` in `BaselineProfileGenerator.kt` to pull the data. * CI: Update Baseline Profile device to Nexus 6 * Changed the device profile used for Baseline Profile generation from Pixel 6 to Nexus 6 in the GitHub Actions workflow.
70 lines
2.8 KiB
YAML
70 lines
2.8 KiB
YAML
name: Generate Baseline Profile
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setting up project
|
|
uses: ./.github/actions/setup
|
|
|
|
#
|
|
# - name: Install GMD image for baseline profile generation
|
|
# run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager "system-images;android-34;aosp_atd;x86_64"
|
|
|
|
- name: Accept Android licenses
|
|
run: yes | "$ANDROID_HOME"/cmdline-tools/latest/bin/sdkmanager --licenses || true
|
|
|
|
# Now use reactivecircus/android-emulator-runner to spin up an emulator and run our
|
|
# baseline profile generator. We need to manually pull the baseline profiles off the
|
|
# emulator when using the GA runner
|
|
- name: Run benchmark
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
with:
|
|
api-level: 34
|
|
target: google_apis
|
|
arch: x86_64
|
|
profile: Nexus 6
|
|
script: |
|
|
./gradlew :app:generateFreeReleaseBaselineProfile
|
|
#
|
|
# - name: Setup GMD
|
|
# run: ./gradlew :baselineprofile:pixel6Api34Setup
|
|
# --info
|
|
# -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
|
|
# -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
|
|
#
|
|
# - name: Build all build type and flavor permutations including baseline profiles
|
|
# run: ./gradlew :app:assemble
|
|
# -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=baselineprofile
|
|
# -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
|
|
# -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
|
|
#
|
|
|
|
# - name: Generate profile
|
|
# run: ./gradlew :app:generateFreeReleaseBaselineProfile
|
|
# -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
|
|
|
|
# Now use reactivecircus/android-emulator-runner to spin up an emulator and run our
|
|
# baseline profile generator. We need to manually pull the baseline profiles off the
|
|
# emulator when using the GA runner
|
|
# - name: Run benchmark
|
|
# id: build
|
|
# run: |
|
|
# # Run our benchmark, enabling only tests using BaselineProfile
|
|
# ./gradlew pixel6Api34ProBenchmarkReleaseAndroidTest -Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
|
|
# # Need to manually pull the generated profiles from the emulator
|
|
# adb pull /sdcard/Android/media/app.tivi.benchmark benchmark/build/outputs/baseline-prof/
|
|
|
|
# Upload the entire generated folder and attach it to the CI run
|
|
- name: Attach baseline profile
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: Baseline profile output
|
|
path: app/src/freeRelease/generated/baselineProfiles/
|
|
|