diff --git a/.github/workflows/cua-smoke.yml b/.github/workflows/cua-smoke.yml index 1bcd205..329c5f1 100644 --- a/.github/workflows/cua-smoke.yml +++ b/.github/workflows/cua-smoke.yml @@ -14,7 +14,7 @@ on: jobs: cua-test: runs-on: ubuntu-latest - timeout-minutes: 60 + timeout-minutes: 45 steps: - uses: actions/checkout@v6 @@ -31,8 +31,11 @@ jobs: - name: Setup Android SDK uses: android-actions/setup-android@v4 - - name: Add emulator to PATH - run: echo "$ANDROID_HOME/emulator" >> $GITHUB_PATH + - 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 - name: Cache Gradle uses: actions/cache@v5 @@ -47,14 +50,17 @@ jobs: - name: Install Android system image & create AVD run: | - sdkmanager "system-images;android-34;google_apis;x86_64" "emulator" + sdkmanager "system-images;android-34;google_apis;x86_64" "emulator" "platform-tools" echo "no" | avdmanager create avd -n test -k "system-images;android-34;google_apis;x86_64" --force + avdmanager list avd - name: Start emulator run: | - emulator -avd test -no-window -no-audio -no-boot-anim -gpu swiftshader_indirect -no-snapshot & + nohup emulator -avd test -no-window -no-audio -no-boot-anim -gpu swiftshader_indirect -no-snapshot -port 5554 > /tmp/emulator.log 2>&1 & adb wait-for-device - timeout 120 bash -c 'while [ "$(adb shell getprop sys.boot_completed 2>/dev/null)" != "1" ]; do sleep 2; done' + timeout 180 bash -c 'while [ "$(adb shell getprop sys.boot_completed 2>/dev/null)" != "1" ]; do sleep 3; done' + echo "Emulator booted successfully" + adb shell getprop ro.build.version.sdk - name: Install dependencies & build APK run: | @@ -95,4 +101,5 @@ jobs: path: | /tmp/cua_*.png /tmp/cua_*.mp4 + /tmp/emulator.log if-no-files-found: ignore