From 5da6c76e4088c123521ec08955c52f1c140172be Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Mon, 12 Dec 2022 14:43:06 +0900 Subject: [PATCH 01/14] Introduce GMD + ATD - Introduce Gradle Managed Device definition in a single module (core-database at the moment) using Automated Test Device --- .github/workflows/AndroidCIWithGmd.yaml | 26 +++++++++++++++++++++++++ core/database/build.gradle.kts | 12 ++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/AndroidCIWithGmd.yaml diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml new file mode 100644 index 0000000000..5ab32b1915 --- /dev/null +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -0,0 +1,26 @@ +name: Android CI with GMD + +on: + push: + branches: + - main + pull_request: + +jobs: + + android-ci: + runs-on: macos-latest + + steps: + - uses: actions/setup-java@v3 + with: + distribution: 'temurin' + java-version: '11' + - uses: actions/checkout@v2 + + - name: Setup Android SDK + uses: android-actions/setup-android@v2 + + - name: Run instrumented tests with GMD + run: ./gradlew pixel4Api30DemoDebugAndroidTest -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" + diff --git a/core/database/build.gradle.kts b/core/database/build.gradle.kts index b0200b333e..b4ed939217 100644 --- a/core/database/build.gradle.kts +++ b/core/database/build.gradle.kts @@ -34,6 +34,18 @@ android { testInstrumentationRunner = "com.google.samples.apps.nowinandroid.core.testing.NiaTestRunner" } namespace = "com.google.samples.apps.nowinandroid.core.database" + + testOptions { + managedDevices { + devices { + maybeCreate("pixel4api30").apply { + device = "Pixel 4" + apiLevel = 30 + systemImageSource = "aosp-atd" + } + } + } + } } dependencies { From e0100a376c508bc673f10f52f8a50705e888728d Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Tue, 13 Dec 2022 15:18:16 +0900 Subject: [PATCH 02/14] Append -Dorg.gradle.workers.max flag and ./gradlew cleanManagedDevices task Change-Id: Ibec569886c3bc8f94f402a62c7dc4205b628eec6 --- .github/workflows/AndroidCIWithGmd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml index 5ab32b1915..43c6105024 100644 --- a/.github/workflows/AndroidCIWithGmd.yaml +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -22,5 +22,5 @@ jobs: uses: android-actions/setup-android@v2 - name: Run instrumented tests with GMD - run: ./gradlew pixel4Api30DemoDebugAndroidTest -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" + run: ./gradlew cleanManagedDevices --unused-only && ./gradlew pixel4api30DemoDebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" From cb224058564d0979c40a7f33e730ecf6171a469c Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Tue, 13 Dec 2022 18:18:03 +0900 Subject: [PATCH 03/14] Add more flags to the GMD running command Change-Id: I491e4eb82a1b64842902023dd20993e89ee3ef0c --- .github/workflows/AndroidCIWithGmd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml index 43c6105024..012a87b213 100644 --- a/.github/workflows/AndroidCIWithGmd.yaml +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -22,5 +22,5 @@ jobs: uses: android-actions/setup-android@v2 - name: Run instrumented tests with GMD - run: ./gradlew cleanManagedDevices --unused-only && ./gradlew pixel4api30DemoDebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" + run: ./gradlew cleanManagedDevices --unused-only && ./gradlew pixel4api30DemoDebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true --info From 30c662e8b7eb658affe2f96dbad4edd8e5cef775 Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Thu, 22 Dec 2022 15:38:01 +0900 Subject: [PATCH 04/14] Add test reports Add GMD to other modules that have instrumented tests Change-Id: I9355b3792bf9cec98a7a4dbe66ea9c1332a29a79 --- .github/workflows/AndroidCIWithGmd.yaml | 8 ++++++++ app/build.gradle.kts | 22 ++++++++++++++++++++++ core/database/build.gradle.kts | 13 +++++++++++++ feature/bookmarks/build.gradle.kts | 25 +++++++++++++++++++++++++ feature/foryou/build.gradle.kts | 25 +++++++++++++++++++++++++ feature/interests/build.gradle.kts | 25 +++++++++++++++++++++++++ feature/settings/build.gradle.kts | 25 +++++++++++++++++++++++++ feature/topic/build.gradle.kts | 25 +++++++++++++++++++++++++ 8 files changed, 168 insertions(+) diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml index 012a87b213..47ad1dd8c7 100644 --- a/.github/workflows/AndroidCIWithGmd.yaml +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -22,5 +22,13 @@ jobs: uses: android-actions/setup-android@v2 - name: Run instrumented tests with GMD + continue-on-error: true run: ./gradlew cleanManagedDevices --unused-only && ./gradlew pixel4api30DemoDebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true --info + - name: Upload test reports + if: success() || failure() + uses: actions/upload-artifact@v3 + with: + name: test-reports + path: | + '**/build/outputs/androidTest-results/' diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 46edf54ada..aa23e95f96 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -73,6 +73,28 @@ android { unitTests { isIncludeAndroidResources = true } + managedDevices { + devices { + maybeCreate("pixel4api27").apply { + device = "Pixel 4" + apiLevel = 27 + systemImageSource = "aosp" + } + + maybeCreate("pixel4api30").apply { + device = "Pixel 4" + apiLevel = 30 + // ATDs currently support only API level 30. + systemImageSource = "aosp-atd" + } + } + groups { + maybeCreate("pixelDevices").apply { + targetDevices.add(devices["pixel4api27"]) + targetDevices.add(devices["pixel4api30"]) + } + } + } } namespace = "com.google.samples.apps.nowinandroid" } diff --git a/core/database/build.gradle.kts b/core/database/build.gradle.kts index b4ed939217..5a94e85259 100644 --- a/core/database/build.gradle.kts +++ b/core/database/build.gradle.kts @@ -38,12 +38,25 @@ android { testOptions { managedDevices { devices { + maybeCreate("pixel4api27").apply { + device = "Pixel 4" + apiLevel = 27 + systemImageSource = "aosp" + } + maybeCreate("pixel4api30").apply { device = "Pixel 4" apiLevel = 30 + // ATDs currently support only API level 30. systemImageSource = "aosp-atd" } } + groups { + maybeCreate("pixelDevices").apply { + targetDevices.add(devices["pixel4api27"]) + targetDevices.add(devices["pixel4api30"]) + } + } } } } diff --git a/feature/bookmarks/build.gradle.kts b/feature/bookmarks/build.gradle.kts index 9db302e99b..291cf66a80 100644 --- a/feature/bookmarks/build.gradle.kts +++ b/feature/bookmarks/build.gradle.kts @@ -21,6 +21,31 @@ plugins { android { namespace = "com.google.samples.apps.nowinandroid.feature.bookmarks" + + testOptions { + managedDevices { + devices { + maybeCreate("pixel4api27").apply { + device = "Pixel 4" + apiLevel = 27 + systemImageSource = "aosp" + } + + maybeCreate("pixel4api30").apply { + device = "Pixel 4" + apiLevel = 30 + // ATDs currently support only API level 30. + systemImageSource = "aosp-atd" + } + } + groups { + maybeCreate("pixelDevices").apply { + targetDevices.add(devices["pixel4api27"]) + targetDevices.add(devices["pixel4api30"]) + } + } + } + } } dependencies { diff --git a/feature/foryou/build.gradle.kts b/feature/foryou/build.gradle.kts index ae2d380e66..b0dc7352f8 100644 --- a/feature/foryou/build.gradle.kts +++ b/feature/foryou/build.gradle.kts @@ -21,6 +21,31 @@ plugins { android { namespace = "com.google.samples.apps.nowinandroid.feature.foryou" + + testOptions { + managedDevices { + devices { + maybeCreate("pixel4api27").apply { + device = "Pixel 4" + apiLevel = 27 + systemImageSource = "aosp" + } + + maybeCreate("pixel4api30").apply { + device = "Pixel 4" + apiLevel = 30 + // ATDs currently support only API level 30. + systemImageSource = "aosp-atd" + } + } + groups { + maybeCreate("pixelDevices").apply { + targetDevices.add(devices["pixel4api27"]) + targetDevices.add(devices["pixel4api30"]) + } + } + } + } } dependencies { diff --git a/feature/interests/build.gradle.kts b/feature/interests/build.gradle.kts index de3f7854be..4a5fdb5b67 100644 --- a/feature/interests/build.gradle.kts +++ b/feature/interests/build.gradle.kts @@ -20,4 +20,29 @@ plugins { } android { namespace = "com.google.samples.apps.nowinandroid.feature.interests" + + testOptions { + managedDevices { + devices { + maybeCreate("pixel4api27").apply { + device = "Pixel 4" + apiLevel = 27 + systemImageSource = "aosp" + } + + maybeCreate("pixel4api30").apply { + device = "Pixel 4" + apiLevel = 30 + // ATDs currently support only API level 30. + systemImageSource = "aosp-atd" + } + } + groups { + maybeCreate("pixelDevices").apply { + targetDevices.add(devices["pixel4api27"]) + targetDevices.add(devices["pixel4api30"]) + } + } + } + } } diff --git a/feature/settings/build.gradle.kts b/feature/settings/build.gradle.kts index dc88a74de6..602da944d4 100644 --- a/feature/settings/build.gradle.kts +++ b/feature/settings/build.gradle.kts @@ -21,4 +21,29 @@ plugins { android { namespace = "com.google.samples.apps.nowinandroid.feature.settings" + + testOptions { + managedDevices { + devices { + maybeCreate("pixel4api27").apply { + device = "Pixel 4" + apiLevel = 27 + systemImageSource = "aosp" + } + + maybeCreate("pixel4api30").apply { + device = "Pixel 4" + apiLevel = 30 + // ATDs currently support only API level 30. + systemImageSource = "aosp-atd" + } + } + groups { + maybeCreate("pixelDevices").apply { + targetDevices.add(devices["pixel4api27"]) + targetDevices.add(devices["pixel4api30"]) + } + } + } + } } diff --git a/feature/topic/build.gradle.kts b/feature/topic/build.gradle.kts index 70c730dbd1..04e86ec4a1 100644 --- a/feature/topic/build.gradle.kts +++ b/feature/topic/build.gradle.kts @@ -21,6 +21,31 @@ plugins { android { namespace = "com.google.samples.apps.nowinandroid.feature.topic" + + testOptions { + managedDevices { + devices { + maybeCreate("pixel4api27").apply { + device = "Pixel 4" + apiLevel = 27 + systemImageSource = "aosp" + } + + maybeCreate("pixel4api30").apply { + device = "Pixel 4" + apiLevel = 30 + // ATDs currently support only API level 30. + systemImageSource = "aosp-atd" + } + } + groups { + maybeCreate("pixelDevices").apply { + targetDevices.add(devices["pixel4api27"]) + targetDevices.add(devices["pixel4api30"]) + } + } + } + } } dependencies { From 3f9f1c4a05f24d9c38d2642b2d6f16b4c2dbb66c Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Thu, 22 Dec 2022 15:51:05 +0900 Subject: [PATCH 05/14] Remove group GMD Change-Id: Ie1594611482ec51e409a28c51c43e88457aa44bb --- app/build.gradle.kts | 12 ------------ core/database/build.gradle.kts | 12 ------------ feature/bookmarks/build.gradle.kts | 12 ------------ feature/foryou/build.gradle.kts | 12 ------------ feature/interests/build.gradle.kts | 12 ------------ feature/settings/build.gradle.kts | 12 ------------ feature/topic/build.gradle.kts | 12 ------------ 7 files changed, 84 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index aa23e95f96..7739c77247 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -75,12 +75,6 @@ android { } managedDevices { devices { - maybeCreate("pixel4api27").apply { - device = "Pixel 4" - apiLevel = 27 - systemImageSource = "aosp" - } - maybeCreate("pixel4api30").apply { device = "Pixel 4" apiLevel = 30 @@ -88,12 +82,6 @@ android { systemImageSource = "aosp-atd" } } - groups { - maybeCreate("pixelDevices").apply { - targetDevices.add(devices["pixel4api27"]) - targetDevices.add(devices["pixel4api30"]) - } - } } } namespace = "com.google.samples.apps.nowinandroid" diff --git a/core/database/build.gradle.kts b/core/database/build.gradle.kts index 5a94e85259..0e60a1b24e 100644 --- a/core/database/build.gradle.kts +++ b/core/database/build.gradle.kts @@ -38,12 +38,6 @@ android { testOptions { managedDevices { devices { - maybeCreate("pixel4api27").apply { - device = "Pixel 4" - apiLevel = 27 - systemImageSource = "aosp" - } - maybeCreate("pixel4api30").apply { device = "Pixel 4" apiLevel = 30 @@ -51,12 +45,6 @@ android { systemImageSource = "aosp-atd" } } - groups { - maybeCreate("pixelDevices").apply { - targetDevices.add(devices["pixel4api27"]) - targetDevices.add(devices["pixel4api30"]) - } - } } } } diff --git a/feature/bookmarks/build.gradle.kts b/feature/bookmarks/build.gradle.kts index 291cf66a80..f68e733c81 100644 --- a/feature/bookmarks/build.gradle.kts +++ b/feature/bookmarks/build.gradle.kts @@ -25,12 +25,6 @@ android { testOptions { managedDevices { devices { - maybeCreate("pixel4api27").apply { - device = "Pixel 4" - apiLevel = 27 - systemImageSource = "aosp" - } - maybeCreate("pixel4api30").apply { device = "Pixel 4" apiLevel = 30 @@ -38,12 +32,6 @@ android { systemImageSource = "aosp-atd" } } - groups { - maybeCreate("pixelDevices").apply { - targetDevices.add(devices["pixel4api27"]) - targetDevices.add(devices["pixel4api30"]) - } - } } } } diff --git a/feature/foryou/build.gradle.kts b/feature/foryou/build.gradle.kts index b0dc7352f8..f5c83aa0cb 100644 --- a/feature/foryou/build.gradle.kts +++ b/feature/foryou/build.gradle.kts @@ -25,12 +25,6 @@ android { testOptions { managedDevices { devices { - maybeCreate("pixel4api27").apply { - device = "Pixel 4" - apiLevel = 27 - systemImageSource = "aosp" - } - maybeCreate("pixel4api30").apply { device = "Pixel 4" apiLevel = 30 @@ -38,12 +32,6 @@ android { systemImageSource = "aosp-atd" } } - groups { - maybeCreate("pixelDevices").apply { - targetDevices.add(devices["pixel4api27"]) - targetDevices.add(devices["pixel4api30"]) - } - } } } } diff --git a/feature/interests/build.gradle.kts b/feature/interests/build.gradle.kts index 4a5fdb5b67..0919844b2e 100644 --- a/feature/interests/build.gradle.kts +++ b/feature/interests/build.gradle.kts @@ -24,12 +24,6 @@ android { testOptions { managedDevices { devices { - maybeCreate("pixel4api27").apply { - device = "Pixel 4" - apiLevel = 27 - systemImageSource = "aosp" - } - maybeCreate("pixel4api30").apply { device = "Pixel 4" apiLevel = 30 @@ -37,12 +31,6 @@ android { systemImageSource = "aosp-atd" } } - groups { - maybeCreate("pixelDevices").apply { - targetDevices.add(devices["pixel4api27"]) - targetDevices.add(devices["pixel4api30"]) - } - } } } } diff --git a/feature/settings/build.gradle.kts b/feature/settings/build.gradle.kts index 602da944d4..b68912d539 100644 --- a/feature/settings/build.gradle.kts +++ b/feature/settings/build.gradle.kts @@ -25,12 +25,6 @@ android { testOptions { managedDevices { devices { - maybeCreate("pixel4api27").apply { - device = "Pixel 4" - apiLevel = 27 - systemImageSource = "aosp" - } - maybeCreate("pixel4api30").apply { device = "Pixel 4" apiLevel = 30 @@ -38,12 +32,6 @@ android { systemImageSource = "aosp-atd" } } - groups { - maybeCreate("pixelDevices").apply { - targetDevices.add(devices["pixel4api27"]) - targetDevices.add(devices["pixel4api30"]) - } - } } } } diff --git a/feature/topic/build.gradle.kts b/feature/topic/build.gradle.kts index 04e86ec4a1..9a27fe5661 100644 --- a/feature/topic/build.gradle.kts +++ b/feature/topic/build.gradle.kts @@ -25,12 +25,6 @@ android { testOptions { managedDevices { devices { - maybeCreate("pixel4api27").apply { - device = "Pixel 4" - apiLevel = 27 - systemImageSource = "aosp" - } - maybeCreate("pixel4api30").apply { device = "Pixel 4" apiLevel = 30 @@ -38,12 +32,6 @@ android { systemImageSource = "aosp-atd" } } - groups { - maybeCreate("pixelDevices").apply { - targetDevices.add(devices["pixel4api27"]) - targetDevices.add(devices["pixel4api30"]) - } - } } } } From 10d77c031b59473550fc4117405b3e7b72f88f4d Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Thu, 22 Dec 2022 15:54:10 +0900 Subject: [PATCH 06/14] Fix yaml syntax Change-Id: I253ada072534d96e7e56d7e6d054d762781dddd9 --- .github/workflows/AndroidCIWithGmd.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml index 47ad1dd8c7..8d895e0812 100644 --- a/.github/workflows/AndroidCIWithGmd.yaml +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -26,7 +26,6 @@ jobs: run: ./gradlew cleanManagedDevices --unused-only && ./gradlew pixel4api30DemoDebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true --info - name: Upload test reports - if: success() || failure() uses: actions/upload-artifact@v3 with: name: test-reports From 866bd64e9543522226f703a4264ba7b1b784f399 Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Thu, 22 Dec 2022 15:56:09 +0900 Subject: [PATCH 07/14] Fix yaml syntax Change-Id: Ia27cc69ceeea0681452f4e30a927fd39416c4b26 --- .github/workflows/AndroidCIWithGmd.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml index 8d895e0812..eac93376b5 100644 --- a/.github/workflows/AndroidCIWithGmd.yaml +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -26,8 +26,9 @@ jobs: run: ./gradlew cleanManagedDevices --unused-only && ./gradlew pixel4api30DemoDebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true --info - name: Upload test reports - uses: actions/upload-artifact@v3 - with: - name: test-reports - path: | - '**/build/outputs/androidTest-results/' + if: success() || failure() + uses: actions/upload-artifact@v3 + with: + name: test-reports + path: | + '**/build/outputs/androidTest-results/' From 14193a67a027d01ac5ded2490710489232f4789e Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Thu, 22 Dec 2022 16:23:42 +0900 Subject: [PATCH 08/14] Fix reports path Change-Id: Iae88930e2e04131b50da1ff867bbe44e428c464a --- .github/workflows/AndroidCIWithGmd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml index eac93376b5..3d2f26fd29 100644 --- a/.github/workflows/AndroidCIWithGmd.yaml +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -31,4 +31,4 @@ jobs: with: name: test-reports path: | - '**/build/outputs/androidTest-results/' + '**/build/reports/androidTest-results/' From cee047cca87931b5369638ee5df4ebee22107965 Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Thu, 22 Dec 2022 16:48:40 +0900 Subject: [PATCH 09/14] Fix test reports path Change-Id: I33ee689d01717fec1761415b39d1a373f4a1a8e1 --- .github/workflows/AndroidCIWithGmd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml index 3d2f26fd29..f1b0c60a0c 100644 --- a/.github/workflows/AndroidCIWithGmd.yaml +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -31,4 +31,4 @@ jobs: with: name: test-reports path: | - '**/build/reports/androidTest-results/' + '*/build/reports/androidTest-results/' From fcf352fd336e60b04d3ee751ed22f11fbb4d109f Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Thu, 22 Dec 2022 17:16:08 +0900 Subject: [PATCH 10/14] Fix reports path Change-Id: I1e6d618c2e1e347cc9ff0e483264f267bd95981e --- .github/workflows/AndroidCIWithGmd.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml index f1b0c60a0c..9dabd5453b 100644 --- a/.github/workflows/AndroidCIWithGmd.yaml +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -31,4 +31,4 @@ jobs: with: name: test-reports path: | - '*/build/reports/androidTest-results/' + '**/*/build/reports/androidTest/' From 3cb9c9ddb5b15e7ec535fac4f5db80a1b48a77d7 Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Thu, 22 Dec 2022 17:53:20 +0900 Subject: [PATCH 11/14] Insert debug SSH session Change-Id: Ie57be3a6206bb6959b8d2318a49b33eed6f0f79c --- .github/workflows/AndroidCIWithGmd.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml index 9dabd5453b..177e2abc17 100644 --- a/.github/workflows/AndroidCIWithGmd.yaml +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -25,6 +25,9 @@ jobs: continue-on-error: true run: ./gradlew cleanManagedDevices --unused-only && ./gradlew pixel4api30DemoDebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true --info + - name: Setup upterm session + uses: lhotari/action-upterm@v1 + - name: Upload test reports if: success() || failure() uses: actions/upload-artifact@v3 From 59f4c83c4b2dcffaa0f450bf6c03ad9ba677ed04 Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Thu, 22 Dec 2022 18:58:46 +0900 Subject: [PATCH 12/14] Fix reports path Change-Id: Ie082ff1f899b70452e494d65bde07d65fff661e7 --- .github/workflows/AndroidCIWithGmd.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml index 177e2abc17..38541a2671 100644 --- a/.github/workflows/AndroidCIWithGmd.yaml +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -25,13 +25,10 @@ jobs: continue-on-error: true run: ./gradlew cleanManagedDevices --unused-only && ./gradlew pixel4api30DemoDebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true --info - - name: Setup upterm session - uses: lhotari/action-upterm@v1 - - name: Upload test reports if: success() || failure() uses: actions/upload-artifact@v3 with: name: test-reports path: | - '**/*/build/reports/androidTest/' + '**/*/build/reports/androidTests/' From dd89cbf0832dc4d6e2e9bf634efde38893be77da Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Thu, 5 Jan 2023 12:30:58 +0900 Subject: [PATCH 13/14] Add TODO to convert GMD definition as a convention plugin Remove setup android SDK for experiment Change-Id: I55fc1826ffeb9254ca53e7227555ec4879f38079 --- .github/workflows/AndroidCIWithGmd.yaml | 5 +---- app/build.gradle.kts | 1 + benchmarks/build.gradle.kts | 1 + core/database/build.gradle.kts | 1 + feature/bookmarks/build.gradle.kts | 1 + feature/foryou/build.gradle.kts | 1 + feature/interests/build.gradle.kts | 1 + feature/settings/build.gradle.kts | 1 + feature/topic/build.gradle.kts | 1 + 9 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/AndroidCIWithGmd.yaml b/.github/workflows/AndroidCIWithGmd.yaml index 38541a2671..fb01ab1e89 100644 --- a/.github/workflows/AndroidCIWithGmd.yaml +++ b/.github/workflows/AndroidCIWithGmd.yaml @@ -14,13 +14,10 @@ jobs: steps: - uses: actions/setup-java@v3 with: - distribution: 'temurin' + distribution: 'zulu' java-version: '11' - uses: actions/checkout@v2 - - name: Setup Android SDK - uses: android-actions/setup-android@v2 - - name: Run instrumented tests with GMD continue-on-error: true run: ./gradlew cleanManagedDevices --unused-only && ./gradlew pixel4api30DemoDebugAndroidTest -Dorg.gradle.workers.max=1 -Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect" -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true --info diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 7739c77247..f86a19868d 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -73,6 +73,7 @@ android { unitTests { isIncludeAndroidResources = true } + // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) managedDevices { devices { maybeCreate("pixel4api30").apply { diff --git a/benchmarks/build.gradle.kts b/benchmarks/build.gradle.kts index 5b706db4f7..08f164769e 100644 --- a/benchmarks/build.gradle.kts +++ b/benchmarks/build.gradle.kts @@ -67,6 +67,7 @@ android { experimentalProperties["android.experimental.self-instrumenting"] = true testOptions { + // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) managedDevices { devices { create("pixel6Api31") { diff --git a/core/database/build.gradle.kts b/core/database/build.gradle.kts index 0e60a1b24e..f78c71f07e 100644 --- a/core/database/build.gradle.kts +++ b/core/database/build.gradle.kts @@ -36,6 +36,7 @@ android { namespace = "com.google.samples.apps.nowinandroid.core.database" testOptions { + // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) managedDevices { devices { maybeCreate("pixel4api30").apply { diff --git a/feature/bookmarks/build.gradle.kts b/feature/bookmarks/build.gradle.kts index f68e733c81..33d89ad786 100644 --- a/feature/bookmarks/build.gradle.kts +++ b/feature/bookmarks/build.gradle.kts @@ -23,6 +23,7 @@ android { namespace = "com.google.samples.apps.nowinandroid.feature.bookmarks" testOptions { + // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) managedDevices { devices { maybeCreate("pixel4api30").apply { diff --git a/feature/foryou/build.gradle.kts b/feature/foryou/build.gradle.kts index f5c83aa0cb..86626f7fe4 100644 --- a/feature/foryou/build.gradle.kts +++ b/feature/foryou/build.gradle.kts @@ -23,6 +23,7 @@ android { namespace = "com.google.samples.apps.nowinandroid.feature.foryou" testOptions { + // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) managedDevices { devices { maybeCreate("pixel4api30").apply { diff --git a/feature/interests/build.gradle.kts b/feature/interests/build.gradle.kts index 0919844b2e..55fa28462a 100644 --- a/feature/interests/build.gradle.kts +++ b/feature/interests/build.gradle.kts @@ -22,6 +22,7 @@ android { namespace = "com.google.samples.apps.nowinandroid.feature.interests" testOptions { + // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) managedDevices { devices { maybeCreate("pixel4api30").apply { diff --git a/feature/settings/build.gradle.kts b/feature/settings/build.gradle.kts index b68912d539..36e0855b9e 100644 --- a/feature/settings/build.gradle.kts +++ b/feature/settings/build.gradle.kts @@ -23,6 +23,7 @@ android { namespace = "com.google.samples.apps.nowinandroid.feature.settings" testOptions { + // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) managedDevices { devices { maybeCreate("pixel4api30").apply { diff --git a/feature/topic/build.gradle.kts b/feature/topic/build.gradle.kts index 9a27fe5661..75bfe3c71b 100644 --- a/feature/topic/build.gradle.kts +++ b/feature/topic/build.gradle.kts @@ -23,6 +23,7 @@ android { namespace = "com.google.samples.apps.nowinandroid.feature.topic" testOptions { + // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) managedDevices { devices { maybeCreate("pixel4api30").apply { From 5dc860ed64162d7892db1b2a1c1e9a8491116a84 Mon Sep 17 00:00:00 2001 From: Takeshi Hagikura Date: Fri, 6 Jan 2023 12:41:43 +0900 Subject: [PATCH 14/14] Change the link to the GMD bug to the link to the GitHub issue Change-Id: I0866369e3d0bbe148ca5ec1f92bad59239a347b8 --- app/build.gradle.kts | 2 +- benchmarks/build.gradle.kts | 2 +- core/database/build.gradle.kts | 2 +- feature/bookmarks/build.gradle.kts | 2 +- feature/foryou/build.gradle.kts | 2 +- feature/interests/build.gradle.kts | 2 +- feature/settings/build.gradle.kts | 2 +- feature/topic/build.gradle.kts | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index f86a19868d..3cc48f284b 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -73,7 +73,7 @@ android { unitTests { isIncludeAndroidResources = true } - // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) + // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523) managedDevices { devices { maybeCreate("pixel4api30").apply { diff --git a/benchmarks/build.gradle.kts b/benchmarks/build.gradle.kts index 08f164769e..ba04eda234 100644 --- a/benchmarks/build.gradle.kts +++ b/benchmarks/build.gradle.kts @@ -67,7 +67,7 @@ android { experimentalProperties["android.experimental.self-instrumenting"] = true testOptions { - // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) + // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523) managedDevices { devices { create("pixel6Api31") { diff --git a/core/database/build.gradle.kts b/core/database/build.gradle.kts index f78c71f07e..1177ae0f5d 100644 --- a/core/database/build.gradle.kts +++ b/core/database/build.gradle.kts @@ -36,7 +36,7 @@ android { namespace = "com.google.samples.apps.nowinandroid.core.database" testOptions { - // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) + // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523) managedDevices { devices { maybeCreate("pixel4api30").apply { diff --git a/feature/bookmarks/build.gradle.kts b/feature/bookmarks/build.gradle.kts index 33d89ad786..18212ba4a5 100644 --- a/feature/bookmarks/build.gradle.kts +++ b/feature/bookmarks/build.gradle.kts @@ -23,7 +23,7 @@ android { namespace = "com.google.samples.apps.nowinandroid.feature.bookmarks" testOptions { - // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) + // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523) managedDevices { devices { maybeCreate("pixel4api30").apply { diff --git a/feature/foryou/build.gradle.kts b/feature/foryou/build.gradle.kts index 86626f7fe4..84fe81ff04 100644 --- a/feature/foryou/build.gradle.kts +++ b/feature/foryou/build.gradle.kts @@ -23,7 +23,7 @@ android { namespace = "com.google.samples.apps.nowinandroid.feature.foryou" testOptions { - // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) + // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523) managedDevices { devices { maybeCreate("pixel4api30").apply { diff --git a/feature/interests/build.gradle.kts b/feature/interests/build.gradle.kts index 55fa28462a..477093d2b1 100644 --- a/feature/interests/build.gradle.kts +++ b/feature/interests/build.gradle.kts @@ -22,7 +22,7 @@ android { namespace = "com.google.samples.apps.nowinandroid.feature.interests" testOptions { - // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) + // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523) managedDevices { devices { maybeCreate("pixel4api30").apply { diff --git a/feature/settings/build.gradle.kts b/feature/settings/build.gradle.kts index 36e0855b9e..3fbe1cef8a 100644 --- a/feature/settings/build.gradle.kts +++ b/feature/settings/build.gradle.kts @@ -23,7 +23,7 @@ android { namespace = "com.google.samples.apps.nowinandroid.feature.settings" testOptions { - // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) + // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523) managedDevices { devices { maybeCreate("pixel4api30").apply { diff --git a/feature/topic/build.gradle.kts b/feature/topic/build.gradle.kts index 75bfe3c71b..76e803b677 100644 --- a/feature/topic/build.gradle.kts +++ b/feature/topic/build.gradle.kts @@ -23,7 +23,7 @@ android { namespace = "com.google.samples.apps.nowinandroid.feature.topic" testOptions { - // TODO: Convert it as a convention plugin once Flamingo goes out (b/242515648) + // TODO: Convert it as a convention plugin once Flamingo goes out (https://github.com/android/nowinandroid/issues/523) managedDevices { devices { maybeCreate("pixel4api30").apply {