Files
Amber/.github/workflows/benchmark-apk.yml
T

68 lines
2.0 KiB
YAML

name: Benchmark APK
# Builds the `benchmark` flavor APK on every push so the changes in each commit
# can be downloaded, installed, and reviewed. Built as a signed *release* APK
# (R8/minify enabled, not debuggable) so it has no debug overhead. The benchmark
# flavor uses a distinct applicationId suffix, so it installs side-by-side with a
# production build.
on:
push:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout source
uses: actions/checkout@v7
- name: Set up JDK 21
uses: actions/setup-java@v6
with:
distribution: 'temurin'
java-version: 21
- name: Cache Gradle
uses: actions/cache@v6
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission to Gradle wrapper
run: chmod +x ./gradlew
- name: Create keystore.properties
run: touch keystore.properties
- name: Build benchmark release APK
run: ./gradlew assembleBenchmarkRelease --no-daemon --stacktrace
- name: Sign benchmark APK
uses: r0adkll/sign-android-release@v1
with:
releaseDirectory: app/build/outputs/apk/benchmark/release
signingKeyBase64: ${{ secrets.SIGNING_KEY }}
alias: ${{ secrets.KEY_ALIAS }}
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }}
keyPassword: ${{ secrets.KEY_PASSWORD }}
env:
BUILD_TOOLS_VERSION: "34.0.0"
- name: Upload benchmark APK
uses: actions/upload-artifact@v7
with:
name: amber-benchmark-${{ github.sha }}
path: app/build/outputs/apk/benchmark/release/app-benchmark-universal-release-unsigned-signed.apk
retention-days: 14
if-no-files-found: error