Merge pull request #1174 from ably/release/1.4.1 #1488
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Emulate | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| android-api-level: [ 19, 21, 24, 29 ] | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up the JDK | |
| uses: actions/setup-java@v3 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@v3 | |
| - name: Enable KVM | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: ${{ matrix.android-api-level }} | |
| emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
| disable-animations: true | |
| # Print emulator logs if tests fail | |
| script: ./gradlew :android:connectedAndroidTest || (adb logcat -d System.out:I && exit 1) | |
| - uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: android-build-reports-${{ matrix.android-api-level }} | |
| path: android/build/reports/ |