From 9c9f60f943a2083c21f04530b92b081c260c29b6 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 22 Jul 2025 12:58:08 -0400 Subject: [PATCH 1/4] Minor cosmetic tweaks to GitHub workflows --- .github/workflows/ci-gradle.yml | 4 +--- .github/workflows/publish-snapshot.yml | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-gradle.yml b/.github/workflows/ci-gradle.yml index 2c92881f07..7db353f64f 100644 --- a/.github/workflows/ci-gradle.yml +++ b/.github/workflows/ci-gradle.yml @@ -4,8 +4,6 @@ on: push: branches: [ main ] pull_request: - release: - types: [ released ] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -81,7 +79,7 @@ jobs: if: ${{ matrix.gradle-task == 'assembleRelease' }} run: ./gradlew assembleRelease check -x embrace-gradle-plugin-integration-tests:test --stacktrace - - name: Gradle (assembleRelease check -x embrace-gradle-plugin-integration-tests:test) + - name: Gradle (examples/ExampleApp/ bundleRelease) if: ${{ matrix.gradle-task == 'bundleReleaseExampleApp' }} working-directory: examples/ExampleApp run: ./gradlew bundleRelease diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index 1fdd37778e..4a58b8dbd7 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -27,7 +27,7 @@ jobs: - uses: actions/checkout@v4 with: persist-credentials: false - + - name: Set snapshot_name in gradle.properties if set env: SNAPSHOT_NAME: ${{ inputs.snapshot_name }} From 2d6333fcff84d1829f569ed721ed4244938e5e59 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 22 Jul 2025 15:47:17 -0400 Subject: [PATCH 2/4] Test running android-emulator on Depot, without KVM --- .github/workflows/android-emulator-tests.yml | 24 ++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android-emulator-tests.yml b/.github/workflows/android-emulator-tests.yml index 1936923d46..0b0e99b0cb 100644 --- a/.github/workflows/android-emulator-tests.yml +++ b/.github/workflows/android-emulator-tests.yml @@ -10,15 +10,30 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -env: - ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 60 - permissions: contents: read +env: + ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 60 + DEPOT_RUNNER: depot-ubuntu-24.04-8 + jobs: - emulator: + environment: runs-on: ubuntu-latest + outputs: + where: ${{ steps.choose.outputs.where }} + steps: + - id: choose + run: | + if [ ${GITHUB_ACTOR} != 'dependabot[bot]' ]; then + echo "where=${DEPOT_RUNNER}" >> $GITHUB_OUTPUT + else + echo "where=ubuntu-latest" >> $GITHUB_OUTPUT + fi + + emulator: + needs: environment + runs-on: ${{ needs.environment.outputs.where }} timeout-minutes: 45 strategy: matrix: @@ -32,6 +47,7 @@ jobs: persist-credentials: false - name: Enable KVM group perms + if: ${{ needs.environment.outputs.where == 'ubuntu-latest' }} run: | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules sudo udevadm control --reload-rules From 44b61513b6ec396adaa20cf7ec6e7231a8c81507 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 22 Jul 2025 16:01:18 -0400 Subject: [PATCH 3/4] Revert "Test running android-emulator on Depot, without KVM" This reverts commit 2d6333fcff84d1829f569ed721ed4244938e5e59. --- .github/workflows/android-emulator-tests.yml | 24 ++++---------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/android-emulator-tests.yml b/.github/workflows/android-emulator-tests.yml index 0b0e99b0cb..1936923d46 100644 --- a/.github/workflows/android-emulator-tests.yml +++ b/.github/workflows/android-emulator-tests.yml @@ -10,30 +10,15 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -permissions: - contents: read - env: ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 60 - DEPOT_RUNNER: depot-ubuntu-24.04-8 -jobs: - environment: - runs-on: ubuntu-latest - outputs: - where: ${{ steps.choose.outputs.where }} - steps: - - id: choose - run: | - if [ ${GITHUB_ACTOR} != 'dependabot[bot]' ]; then - echo "where=${DEPOT_RUNNER}" >> $GITHUB_OUTPUT - else - echo "where=ubuntu-latest" >> $GITHUB_OUTPUT - fi +permissions: + contents: read +jobs: emulator: - needs: environment - runs-on: ${{ needs.environment.outputs.where }} + runs-on: ubuntu-latest timeout-minutes: 45 strategy: matrix: @@ -47,7 +32,6 @@ jobs: persist-credentials: false - name: Enable KVM group perms - if: ${{ needs.environment.outputs.where == 'ubuntu-latest' }} run: | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules sudo udevadm control --reload-rules From ed9eccb4817f8287ab06fd0ee6f3854be73919ed Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Tue, 22 Jul 2025 16:03:46 -0400 Subject: [PATCH 4/4] Use 4 cores in Android emulator --- .github/workflows/android-emulator-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/android-emulator-tests.yml b/.github/workflows/android-emulator-tests.yml index 1936923d46..94e58161e7 100644 --- a/.github/workflows/android-emulator-tests.yml +++ b/.github/workflows/android-emulator-tests.yml @@ -72,6 +72,7 @@ jobs: api-level: ${{ matrix.api-level }} target: default arch: x86_64 + cores: 4 profile: Nexus 6 # Grab the failures from the device so we can include them in results. Exit with non-zero so GH checks still fail. script: ./gradlew connectedCheck --stacktrace || (adb logcat '[Embrace]:d' '*:S' -t 100000 > emulator_logcat.log && adb pull /storage/emulated/0/Android/data/io.embrace.android.embracesdk.test/cache/test_failure/ && exit 127)