|
46 | 46 | _FORCE_LOGS: 1
|
47 | 47 | # No hardware acceleration is available for emulators on Ubuntu:
|
48 | 48 | # https://github.com/marketplace/actions/android-emulator-runner#can-i-use-this-action-on-linux-vms
|
49 |
| - runs-on: macos-latest |
| 49 | + runs-on: ubuntu-latest |
50 | 50 | steps:
|
51 | 51 | - uses: actions/checkout@v3
|
52 | 52 | - uses: actions/setup-node@v3
|
|
56 | 56 | - uses: actions/setup-java@v3
|
57 | 57 | with:
|
58 | 58 | distribution: 'temurin'
|
59 |
| - java-version: '11' |
| 59 | + java-version: '17' |
| 60 | + - name: Enable KVM group perms |
| 61 | + run: | |
| 62 | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules |
| 63 | + sudo udevadm control --reload-rules |
| 64 | + sudo udevadm trigger --name-match=kvm |
| 65 | + - name: Setup Android SDK |
| 66 | + uses: android-actions/setup-android@v3 |
| 67 | + - name: AVD cache |
| 68 | + uses: actions/cache@v3 |
| 69 | + id: avd-cache |
| 70 | + with: |
| 71 | + path: | |
| 72 | + ~/.android/avd/* |
| 73 | + ~/.android/adb* |
| 74 | + key: avd-${{ matrix.apiLevel }} |
| 75 | + - name: create AVD and generate snapshot for caching |
| 76 | + if: steps.avd-cache.outputs.cache-hit != 'true' |
| 77 | + uses: reactivecircus/android-emulator-runner@v2 |
| 78 | + with: |
| 79 | + api-level: ${{ matrix.api-level }} |
| 80 | + force-avd-creation: false |
| 81 | + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none |
| 82 | + disable-animations: false |
| 83 | + script: echo "Generated AVD snapshot for caching." |
60 | 84 | - run: |
|
61 | 85 | npm install -g appium
|
62 | 86 | npm install --chromedriver_version="${{ matrix.chromedriverVersion }}"
|
@@ -87,13 +111,12 @@ jobs:
|
87 | 111 | with:
|
88 | 112 | script: npx mocha --timeout 10m ./test/functional/driver-e2e-specs.js ./test/functional/commands/jetpack-compose-attributes-e2e-specs.js -g @skip-ci -i --exit
|
89 | 113 | avd-name: ${{ env.ANDROID_AVD }}
|
90 |
| - sdcard-path-or-size: 1500M |
| 114 | + force-avd-creation: false |
91 | 115 | api-level: ${{ matrix.apiLevel }}
|
92 | 116 | disable-spellchecker: true
|
| 117 | + disable-animations: true |
93 | 118 | target: ${{ matrix.emuTag }}
|
94 | 119 | arch: ${{ matrix.arch }}
|
95 |
| - ram-size: 4096M |
96 |
| - heap-size: 1024M |
97 | 120 | - name: Save logcat output
|
98 | 121 | if: ${{ always() }}
|
99 | 122 | uses: actions/upload-artifact@master
|
|
0 commit comments