Skip to content

Generate Baseline Profile #3

Generate Baseline Profile

Generate Baseline Profile #3

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
# 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 connectedProBenchmarkReleaseAndroidTest -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@v3
with:
name: Baseline profile output
path: benchmark/build/outputs/baseline-prof