You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
2.0 KiB
66 lines
2.0 KiB
name: Benchmark on Emulator
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
benchmark-android:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Free Disk Space
|
|
run: |
|
|
sudo rm -rf /usr/share/dotnet
|
|
sudo rm -rf /opt/ghc
|
|
sudo rm -rf "/usr/local/share/boost"
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '17'
|
|
cache: 'gradle'
|
|
|
|
- name: Grant execute permission
|
|
run: chmod +x gradlew
|
|
|
|
- name: Enable KVM
|
|
run: |
|
|
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
|
|
sudo udevadm control --reload-rules
|
|
sudo udevadm trigger --name-match=kvm
|
|
|
|
- name: Build APKs
|
|
run: |
|
|
./gradlew :app:assembleDemoBenchmark :benchmarks:assembleDemoBenchmark
|
|
|
|
- name: Run Benchmarks
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
with:
|
|
api-level: 30
|
|
target: google_apis
|
|
arch: x86_64
|
|
force-avd-creation: true
|
|
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -memory 4096
|
|
disable-animations: true
|
|
script: |
|
|
# Install/Copy the built APKs to the emulator
|
|
adb install app/build/outputs/apk/demo/benchmarkRelease/app-demo-benchmarkRelease.apk
|
|
adb install benchmarks/build/outputs/apk/demo/benchmarkRelease/benchmarks-demo-benchmarkRelease.apk
|
|
|
|
chmod +x .github/scripts/run_macrobenchmarks.sh
|
|
.github/scripts/run_macrobenchmarks.sh
|
|
|
|
- name: Run step fit
|
|
run: python3 .github/scripts/step_fit.py
|
|
|
|
- name: Upload Artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: benchmark-results
|
|
path: benchmarks/json_reports/ |