TP-70392 | Setting up Jetpack Macrobenchmarks for CI using Firebase Test Lab (#11432)
This commit is contained in:
63
.github/workflows/macrobenchmark_perf.yml
vendored
Normal file
63
.github/workflows/macrobenchmark_perf.yml
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
name: Build and Run Macrobenchmarks
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: [ default ]
|
||||
outputs:
|
||||
benchmark: ${{ steps.filter.outputs.benchmark }}
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 17
|
||||
distribution: temurin
|
||||
|
||||
- name: Build Macrobenchmark
|
||||
uses: eskatos/gradle-command-action@v1
|
||||
env:
|
||||
JAVA_HOME: ${{ steps.setup-java.outputs.path }}
|
||||
with:
|
||||
arguments: |
|
||||
:app:assembleBenchmark
|
||||
:benchmark:assembleBenchmark
|
||||
build-root-directory: ${{ github.workspace }}/android
|
||||
gradle-executable: ${{ github.workspace }}/android/gradlew
|
||||
wrapper-directory: ${{ github.workspace }}/android/gradle/wrapper
|
||||
|
||||
- name: Print Inputs
|
||||
run: |
|
||||
echo "| github.workspace | " >> ${{ github.workspace }}/android
|
||||
|
||||
|
||||
- name: 'Authenticate Cloud SDK'
|
||||
uses: 'google-github-actions/auth@v0'
|
||||
with:
|
||||
credentials_json: '${{ secrets.GCP_CREDENTIALS }}'
|
||||
|
||||
- name: Set up Cloud SDK
|
||||
uses: google-github-actions/setup-gcloud@v0
|
||||
|
||||
- name: Install Cloud SDK Beta components
|
||||
run: gcloud components install beta
|
||||
|
||||
- name: Run Macro Benchmarks
|
||||
run: |
|
||||
gcloud beta firebase test android run \
|
||||
--type instrumentation \
|
||||
--app ${{ github.workspace }}/android/app/build/outputs/apk/benchmark/app-benchmark.apk \
|
||||
--test ${{ github.workspace }}/android/benchmark/build/outputs/apk/benchmark/benchmark-benchmark.apk \
|
||||
--device model=redfin,version=30,locale=en,orientation=portrait \
|
||||
--directories-to-pull /sdcard/Download \
|
||||
--results-bucket gs://benchmark-results \
|
||||
--environment-variables clearPackageData=true,additionalTestOutputDir=/sdcard/Download,no-isolated-storage=true,androidx.benchmark.enabledRules=Macrobenchmark \
|
||||
--num-uniform-shards 3 \
|
||||
--timeout 60m
|
||||
|
||||
Reference in New Issue
Block a user