From 13d814571117800a964678e3abaca135f63469ea Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Tue, 20 Jul 2021 04:59:37 -0400 Subject: [PATCH] Merge Android jobs into a single multistep job to better amortize setup time (#8464) --- .github/workflows/android.yaml | 48 ++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index fdf4a646d8b836..0df1750d17e937 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -27,13 +27,7 @@ jobs: name: Build Android timeout-minutes: 60 - strategy: - matrix: - type: [arm, arm64, x64] - env: - BUILD_TYPE: android_${{ matrix.type }} - TARGET_CPU: ${{ matrix.type }} JAVA_HOME: /usr/lib/jvm/java-8-openjdk-amd64/ runs-on: ubuntu-latest @@ -60,13 +54,51 @@ jobs: path: | .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - - name: Build libs + - name: Build arm libs + timeout-minutes: 2 + run: | + ./scripts/examples/android_app.sh + env: + BUILD_TYPE: android_arm + TARGET_CPU: arm + - name: Build arm App + timeout-minutes: 5 + run: | + yes | "$ANDROID_HOME"/tools/bin/sdkmanager --licenses + cd src/android/CHIPTool + ./gradlew build + env: + BUILD_TYPE: android_arm + TARGET_CPU: arm + - name: Build arm64 libs + timeout-minutes: 2 + run: | + ./scripts/examples/android_app.sh + env: + BUILD_TYPE: android_arm64 + TARGET_CPU: arm64 + - name: Build arm64 App + timeout-minutes: 5 + run: | + yes | "$ANDROID_HOME"/tools/bin/sdkmanager --licenses + cd src/android/CHIPTool + ./gradlew build + env: + BUILD_TYPE: android_arm64 + TARGET_CPU: arm64 + - name: Build x64 libs timeout-minutes: 2 run: | ./scripts/examples/android_app.sh - - name: Build App + env: + BUILD_TYPE: android_x64 + TARGET_CPU: x64 + - name: Build x64 App timeout-minutes: 5 run: | yes | "$ANDROID_HOME"/tools/bin/sdkmanager --licenses cd src/android/CHIPTool ./gradlew build + env: + BUILD_TYPE: android_x64 + TARGET_CPU: x64