From 9be5bb1737c495694ada4d5bca4feafd82e9e667 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Tue, 7 Jan 2025 13:14:15 +0100 Subject: [PATCH] Try getting the emulator working --- .github/workflows/maestro-local.yml | 109 ++++++++++++++-------------- 1 file changed, 56 insertions(+), 53 deletions(-) diff --git a/.github/workflows/maestro-local.yml b/.github/workflows/maestro-local.yml index 9d5c5e72d3..8456214c54 100644 --- a/.github/workflows/maestro-local.yml +++ b/.github/workflows/maestro-local.yml @@ -13,54 +13,54 @@ env: GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx9g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -XX:+UseG1GC -Dkotlin.daemon.jvm.options=-Xmx4g CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true --no-configuration-cache ARCH: x86_64 - DEVICE: Pixel 9 + DEVICE: "Pixel 7 Pro" API_LEVEL: 35 - TARGET: google_apis_playstore + TARGET: google_apis jobs: - build-apk: - name: Build APK - runs-on: ubuntu-latest - if: github.event_name == 'workflow_dispatch' - # Allow one per PR. - concurrency: - group: ${{ format('maestro-{0}', github.ref) }} - cancel-in-progress: true - steps: - - uses: actions/checkout@v4 - with: - # Ensure we are building the branch and not the branch after being merged on develop - # https://github.com/actions/checkout/issues/881 - ref: ${{ github.ref }} - - uses: actions/setup-java@v4 - name: Use JDK 21 - with: - distribution: 'temurin' # See 'Supported distributions' for available options - java-version: '21' - - name: Configure gradle - uses: gradle/actions/setup-gradle@v4 - with: - cache-read-only: ${{ github.ref != 'refs/heads/develop' }} - - name: Assemble debug APK - run: ./gradlew :app:assembleGplayDebug $CI_GRADLE_ARG_PROPERTIES - env: - ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }} - ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }} - ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }} - - name: Upload APK as artifact - uses: actions/upload-artifact@v4 - with: - name: elementx-apk-maestro - path: | - app/build/outputs/apk/gplay/debug/app-gplay-x86_64-debug.apk - retention-days: 5 - overwrite: true - if-no-files-found: error +# build-apk: +# name: Build APK +# runs-on: ubuntu-latest +# if: github.event_name == 'workflow_dispatch' +# # Allow one per PR. +# concurrency: +# group: ${{ format('maestro-{0}', github.ref) }} +# cancel-in-progress: true +# steps: +# - uses: actions/checkout@v4 +# with: +# # Ensure we are building the branch and not the branch after being merged on develop +# # https://github.com/actions/checkout/issues/881 +# ref: ${{ github.ref }} +# - uses: actions/setup-java@v4 +# name: Use JDK 21 +# with: +# distribution: 'temurin' # See 'Supported distributions' for available options +# java-version: '21' +# - name: Configure gradle +# uses: gradle/actions/setup-gradle@v4 +# with: +# cache-read-only: ${{ github.ref != 'refs/heads/develop' }} +# - name: Assemble debug APK +# run: ./gradlew :app:assembleGplayDebug $CI_GRADLE_ARG_PROPERTIES +# env: +# ELEMENT_ANDROID_MAPTILER_API_KEY: ${{ secrets.MAPTILER_KEY }} +# ELEMENT_ANDROID_MAPTILER_LIGHT_MAP_ID: ${{ secrets.MAPTILER_LIGHT_MAP_ID }} +# ELEMENT_ANDROID_MAPTILER_DARK_MAP_ID: ${{ secrets.MAPTILER_DARK_MAP_ID }} +# - name: Upload APK as artifact +# uses: actions/upload-artifact@v4 +# with: +# name: elementx-apk-maestro +# path: | +# app/build/outputs/apk/gplay/debug/app-gplay-x86_64-debug.apk +# retention-days: 5 +# overwrite: true +# if-no-files-found: error maestro-cloud: name: Maestro test suite runs-on: ubuntu-latest - needs: [build-apk] +# needs: [build-apk] # Only if the APKs were built successfully. if: github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' # Allow one per PR. @@ -74,18 +74,18 @@ jobs: # Ensure we are building the branch and not the branch after being merged on develop # https://github.com/actions/checkout/issues/881 ref: ${{ github.ref }} - - name: Download APK artifact from 'Build APKs' flow - uses: actions/download-artifact@v4 - if: github.event.workflow_run.conclusion == 'success' - with: - name: elementx-apk-maestro - run-id: ${{ github.event.workflow_run.id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Download APK artifact from previous job - uses: actions/download-artifact@v4 - if: github.event_name == 'workflow_dispatch' - with: - name: elementx-apk-maestro +# - name: Download APK artifact from 'Build APKs' flow +# uses: actions/download-artifact@v4 +# if: github.event.workflow_run.conclusion == 'success' +# with: +# name: elementx-apk-maestro +# run-id: ${{ github.event.workflow_run.id }} +# github-token: ${{ secrets.GITHUB_TOKEN }} +# - name: Download APK artifact from previous job +# uses: actions/download-artifact@v4 +# if: github.event_name == 'workflow_dispatch' +# with: +# name: elementx-apk-maestro - name: Enable KVM group perms run: | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules @@ -111,6 +111,9 @@ jobs: emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true disk-size: 3G + pre-emulator-launch-script: | + sdkmanager --list + avdmanager list device script: | .github/workflows/scripts/maestro/maestro-local-with-screen-recording.sh app-gplay-x86_64-debug.apk - name: Upload test results