forked from organicmaps/organicmaps
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (84 loc) · 3.18 KB
/
android-monkey.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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