From b7b7462bf3f5dede58a9241ac4b771c59432b3b1 Mon Sep 17 00:00:00 2001 From: Amod Malviya Date: Tue, 5 Mar 2024 17:48:43 +0530 Subject: [PATCH] android: create avd before compiling tests #build-android --- .github/workflows/android.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index bb1bb44..21d994f 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -46,13 +46,6 @@ jobs: if: steps.cargo-apk-cache.outputs.cache-hit != 'true' run: cargo install cargo-apk --version ${{ env.CARGO_APK_VERSION }} - # Pre-build - - name: Compile - run: rustup run ${{ matrix.rust }} cargo apk build --target ${{ env.ANDROID_TARGET }} - working-directory: tests/test-android-app - - name: Compile tests - run: rustup run ${{ matrix.rust }} cargo build --test test_android - # Check if AVD is in cache, else create AVD - name: AVD cache uses: actions/cache@v3 @@ -73,6 +66,13 @@ jobs: disable-animations: false script: echo "Generated AVD snapshot for caching." + # Pre-build + - name: Compile + run: rustup run ${{ matrix.rust }} cargo apk build --target ${{ env.ANDROID_TARGET }} + working-directory: tests/test-android-app + - name: Compile tests + run: rustup run ${{ matrix.rust }} cargo build --test test_android + # Run tests on emulator - name: Run tests uses: reactivecircus/android-emulator-runner@v2