Skip to content

Android Monkey

Android Monkey #6

name: Android Monkey
on:
workflow_dispatch: # Manual trigger
schedule:
- cron: '0 5 * * 0' # Once per week at 05:00 UTC
env:
JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin
jobs:
precondition:
runs-on: ubuntu-latest
name: Check preconditions
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 1000 # fetch month or so
- name: Check that Android was updated
id: check
shell: bash
run: |
DIRS="android base drape drape_frontend editor ge0 map platform routing search shaders storage traffic transit"
if [ '${{ github.event_name }}' != 'schedule' ] ||
[ $(git rev-list --count --since="24 hours" HEAD $DIRS) -gt 0 ]; then
echo "updated=true" >> $GITHUB_OUTPUT
else
echo "updated=" >> $GITHUB_OUTPUT
fi
outputs:
updated: ${{ steps.check.outputs.updated }}
android-google-beta:
name: Android Google Beta
runs-on: ubuntu-latest
needs: precondition
if: ${{ needs.precondition.outputs.updated != '' }}
environment: beta
steps:
- name: Install build tools and dependencies
shell: bash
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build
- name: Install Google SDK
uses: google-github-actions/setup-gcloud@v0
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 100 # enough to get all commits for the current day
- name: Parallel submodules checkout
shell: bash
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
- name: Checkout private keys
uses: actions/checkout@v4
with:
repository: ${{ secrets.PRIVATE_REPO }}
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
ref: master
path: private.git
- name: Configure repo with private keys
shell: bash
run: |
./configure.sh ./private.git
rm -rf ./private.git
- name: Compile
shell: bash
working-directory: android
run: |
cmake --version
ninja --version
./gradlew -Pfirebase -Parm64 -Parmeabi-v7a assembleGoogleBeta uploadCrashlyticsSymbolFileGoogleBeta uploadCrashlyticsMappingFileGoogleBeta
- name: Run monkey
run: |
gcloud auth activate-service-account --key-file android/app/firebase-test-lab.json
gcloud config set project omapsapp
gcloud firebase test android run --app ./android/app/build/outputs/apk/google/beta/OrganicMaps-*-google-beta.apk \
--device model=husky,version=34 \
--device model=tangorpro,version=33,orientation=landscape \
--device model=bluejay,version=32 \
--device model=a51,version=31 \
--device model=f2q,version=30,orientation=landscape \
--device model=a10,version=29,orientation=landscape \
--device model=cactus,version=27 \
--device model=sailfish,version=25 \
--device model=harpia,version=23 \
--timeout 15m