Skip to content

Commit

Permalink
android: create avd before compiling tests #build-android
Browse files Browse the repository at this point in the history
  • Loading branch information
amodm committed Mar 5, 2024
1 parent c53c4d7 commit b7b7462
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/android.yaml
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b7b7462

Please sign in to comment.