Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use fresh AVD from benchmark tests #157

Merged
merged 1 commit into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/actions/android-emulator-run/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ inputs:
description: Emulator boot options
required: true
default: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
fresh-avd:
description: Force AVD creation and skip cache
required: false
default: 'false'

runs:
using: "composite"
steps:
- name: Cache AVD
if: inputs.fresh-avd != 'true'
uses: actions/cache@v4
id: avd-cache
with:
Expand All @@ -45,7 +50,7 @@ runs:
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: 'Create AVD'
if: steps.avd-cache.outputs.cache-hit != 'true'
if: inputs.fresh-avd != 'true' && steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
arch: ${{ inputs.arch }}
Expand All @@ -63,6 +68,6 @@ runs:
profile: ${{ inputs.profile }}
api-level: ${{ inputs.api-level }}
emulator-options: ${{ inputs.boot-options }}
force-avd-creation: false
force-avd-creation: ${{ inputs.fresh-avd == 'true' }}
disable-animations: true
script: ${{ inputs.script }}
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ jobs:
uses: ./.github/actions/android-emulator-run
with:
api-level: 29
fresh-avd: true
script: |
adb uninstall com.hcaptcha.sdk.bench.test || true
./gradlew benchmark:connectedReleaseAndroidTest
Expand Down
Loading