diff --git a/.github/workflows/android-beta.yaml b/.github/workflows/android-beta.yaml index a9ef42b1a1..d0aa5ca042 100644 --- a/.github/workflows/android-beta.yaml +++ b/.github/workflows/android-beta.yaml @@ -6,6 +6,7 @@ on: paths-ignore: - .github/workflows/android-release* - .github/workflows/android-check* + - .github/workflows/android-monkey* - .github/workflows/linux* - '**/*_tests/**' - '**/CMakeLists.txt' @@ -40,9 +41,6 @@ jobs: with: java-version: 1.8 - - name: Install Google SDK - uses: google-github-actions/setup-gcloud@master - - name: Checkout sources uses: actions/checkout@v2 @@ -76,19 +74,6 @@ jobs: ninja --version ./gradlew -x lint -x lintVitalGoogleBeta assembleGoogleBeta uploadCrashlyticsMappingFileGoogleRelease - - name: Run monkey - run: | - gcloud auth activate-service-account --key-file android/firebase-test-lab.json - gcloud config set project omapsapp - # 4 commits/day * 5 devices * 8 min/test = 160 min/day ~= $10/month - gcloud firebase test android run --app ./android/build/outputs/apk/google/beta/OrganicMaps-*-google-beta.apk \ - --device model=redfin,version=30 \ - --device model=a10,version=29 \ - --device model=equuleus,version=28 \ - --device model=OnePlus3T,version=26 \ - --device model=hwALE-H,version=21,orientation=landscape \ - --timeout 8m - - name: Upload beta apk to App Distribution shell: bash working-directory: android diff --git a/.github/workflows/android-monkey.yaml b/.github/workflows/android-monkey.yaml new file mode 100644 index 0000000000..a4d08a953d --- /dev/null +++ b/.github/workflows/android-monkey.yaml @@ -0,0 +1,90 @@ +name: Android Monkey +on: + push: # Please don't change to pull_request because it can expose secrets + branches: + - master + paths-ignore: + - .github/workflows/android-release* + - .github/workflows/android-check* + - .github/workflows/android-beta* + - .github/workflows/linux* + - '**/*_tests/**' + - '**/CMakeLists.txt' + - CONTRIBUTORS + - LICENSE + - NOTICE + - README.md + - iphone/** + - xcode/** + - docs/** + - generator/** + - packaging/** + - pyhelpers/** + - qt*/** + - skin_generator/** + - track_generator/** + +jobs: + android-google-debug: + name: Android Google Debug + runs-on: ubuntu-latest + 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: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - name: Install Google SDK + uses: google-github-actions/setup-gcloud@master + + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Parallel submodules checkout + shell: bash + run: git submodule update --init --recursive --jobs=$(($(nproc) * 2)) + + - name: Checkout private keys + uses: actions/checkout@v2 + 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: Set up SDK + shell: bash + run: (cd tools/android; ./set_up_android.py --sdk $ANDROID_SDK_ROOT) + + - name: Compile + shell: bash + working-directory: android + run: | + cmake --version + ninja --version + ./gradlew -Parm64 -Parm32 -Pfirebase assembleGoogleDebug + + - name: Run monkey + run: | + gcloud auth activate-service-account --key-file android/firebase-test-lab.json + gcloud config set project omapsapp + gcloud firebase test android run --app ./android/build/outputs/apk/google/debug/OrganicMaps-*-google-debug.apk \ + --device model=redfin,version=30 \ + --device model=a10,version=29 \ + --device model=dipper,version=28 \ + --device model=OnePlus3T,version=26 \ + --device model=flo,version=21,orientation=landscape \ + --timeout 15m diff --git a/android/build.gradle b/android/build.gradle index 6696a6e986..15919a2625 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -343,6 +343,12 @@ android { abiFilters.add('x86') // for emulator } } + + if (googleFirebaseServicesEnabled) { + firebaseCrashlytics { + nativeSymbolUploadEnabled true + } + } } release {