Skip to content

Add avp and fix proguard (#551) #65

Add avp and fix proguard (#551)

Add avp and fix proguard (#551) #65

Workflow file for this run

name: Android Performance
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- '.github/workflows/android-perf.yml'
- 'demo/android/Activity/**/build.gradle'
pull_request:
branches: [ master, 'v[0-9]+.[0-9]+' ]
paths:
- '.github/workflows/android-perf.yml'
- 'demo/android/Activity/**/build.gradle'
defaults:
run:
working-directory: demo/android/Activity
jobs:
build:
name: Run Android Speed Tests on AppCenter
runs-on: ubuntu-latest
strategy:
matrix:
device: [single-android, 32bit-android]
include:
- device: single-android
performanceThresholdSec: 0.2
- device: 32bit-android
performanceThresholdSec: 1.0
steps:
- uses: actions/checkout@v3
- name: Set up Node.js LTS
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Install AppCenter CLI
run: npm install -g appcenter-cli
- name: set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Copy test_resources
run: ./copy_test_resources.sh
- name: Inject AccessKey
run: echo pvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" >> local.properties
- name: Inject Number of Iterations
run: echo numTestIterations="100" >> local.properties
- name: Inject Performance Threshold
run: echo performanceThresholdSec="${{ matrix.performanceThresholdSec }}" >> local.properties
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build app
run: ./gradlew assembleEnDebug
- name: Build androidTest
run: ./gradlew assembleEnDebugAndroidTest
- name: Run tests on AppCenter
run: appcenter test run espresso
--token ${{secrets.APPCENTERAPITOKEN}}
--app "Picovoice/Rhino-Android-Activity"
--devices "Picovoice/${{ matrix.device }}"
--app-path rhino-activity-demo-app/build/outputs/apk/en/debug/rhino-activity-demo-app-en-debug.apk
--test-series "rhino-android"
--locale "en_US"
--build-dir rhino-activity-demo-app/build/outputs/apk/androidTest/en/debug