Skip to content

Commit

Permalink
Use debug build for Android UI tests (CI) (#1976)
Browse files Browse the repository at this point in the history
  • Loading branch information
louwers authored Dec 18, 2023
1 parent ff35e38 commit 47028a6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/android-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ jobs:
- name: Build Benchmark, copy to platform/android
if: github.ref != 'refs/heads/main'
run: |
./gradlew assembleDrawableRelease assembleDrawableReleaseAndroidTest
./gradlew assembleDrawableRelease assembleDrawableReleaseAndroidTest -PtestBuildType=release
cp MapboxGLAndroidSDKTestApp/build/outputs/apk/drawable/release/MapboxGLAndroidSDKTestApp-drawable-release.apk .
cp MapboxGLAndroidSDKTestApp/build/outputs/apk/androidTest/drawable/release/MapboxGLAndroidSDKTestApp-drawable-release-androidTest.apk .
Expand All @@ -140,7 +140,8 @@ jobs:

- name: Build UI tests
if: github.ref == 'refs/heads/main'
run: make android-ui-test-arm-v8
run: |
./gradlew assembleLegacyDebug assembleLegacyDebugAndroidTest -PtestBuildType=debug
- name: Configure AWS Credentials
if: github.ref == 'refs/heads/main'
Expand Down Expand Up @@ -174,8 +175,8 @@ jobs:
- name: Upload Android UI test
if: github.ref == 'refs/heads/main'
run: |
curl -T MapboxGLAndroidSDKTestApp/build/outputs/apk/legacy/release/MapboxGLAndroidSDKTestApp-legacy-debug.apk '${{ steps.upload-android-app.outputs.url }}'
curl -T MapboxGLAndroidSDKTestApp/build/outputs/apk/androidTest/legacy/release/MapboxGLAndroidSDKTestApp-legacy-debug-androidTest.apk '${{ steps.upload-android-test.outputs.url }}'
curl -T MapboxGLAndroidSDKTestApp/build/outputs/apk/legacy/debug/MapboxGLAndroidSDKTestApp-legacy-debug.apk '${{ steps.upload-android-app.outputs.url }}'
curl -T MapboxGLAndroidSDKTestApp/build/outputs/apk/androidTest/legacy/debug/MapboxGLAndroidSDKTestApp-legacy-debug-androidTest.apk '${{ steps.upload-android-test.outputs.url }}'
- name: Write uploads.env
if: github.ref == 'refs/heads/main'
Expand Down
12 changes: 11 additions & 1 deletion platform/android/MapboxGLAndroidSDKTestApp/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ plugins {

apply from: "${rootDir}/gradle/native-build.gradle"

def obtainTestBuildType() {
def result = "debug";

if (project.hasProperty("testBuildType")) {
result = project.getProperties().get("testBuildType")
}

result
}

android {
compileSdkVersion androidVersions.compileSdkVersion

Expand Down Expand Up @@ -55,7 +65,7 @@ android {
}
}

testBuildType "release" // for benchmark
testBuildType obtainTestBuildType()

flavorDimensions += "renderer"
productFlavors {
Expand Down

0 comments on commit 47028a6

Please sign in to comment.