64 lines
2.1 KiB
YAML
64 lines
2.1 KiB
YAML
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
|
|
|