From fcc467b2c35f0b7bbe4acb91338d6beefc32d737 Mon Sep 17 00:00:00 2001 From: FrozenKresnik <80754402+Overflowu@users.noreply.github.com> Date: Tue, 1 Dec 2026 09:16:46 +0000 Subject: [PATCH 1/4] ci(android): run ARM64 E2E emulator on ubuntu-latest KVM with google_apis ndk_translation --- .github/workflows/unity-multiplatform-e2e.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unity-multiplatform-e2e.yml b/.github/workflows/unity-multiplatform-e2e.yml index 51faee4..cb5a52a 100644 --- a/.github/workflows/unity-multiplatform-e2e.yml +++ b/.github/workflows/unity-multiplatform-e2e.yml @@ -300,7 +300,7 @@ jobs: e2e-android: name: E2E Player (Android ARM64) needs: build-players - runs-on: macos-latest + runs-on: ubuntu-latest steps: - name: Download Android APK uses: actions/download-artifact@v4 @@ -320,14 +320,21 @@ jobs: unzip -l "${APK}" | grep "lib/arm64-v8a/libastcenc-neon-shared.so" unzip -l "${APK}" | grep "lib/arm64-v8a/libil2cpp.so" + - name: Enable KVM for Android Emulator + if: ${{ inputs.run_android_emulator != false }} + 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: Run APK on Android ARM64 Emulator if: ${{ inputs.run_android_emulator != false }} uses: reactivecircus/android-emulator-runner@v2 with: api-level: 33 - arch: arm64-v8a - target: default - emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim + arch: x86_64 + target: google_apis + emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot-save script: | adb logcat -c adb install -r "${APK_PATH}" From 38da1000c72af7faacd96b935922a5129ee1feda Mon Sep 17 00:00:00 2001 From: FrozenKresnik <80754402+Overflowu@users.noreply.github.com> Date: Tue, 1 Dec 2026 09:29:02 +0000 Subject: [PATCH 2/4] ci(android): use API 35 google_apis x86_64 image for arm64-v8a libndk_translation --- .github/workflows/unity-multiplatform-e2e.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unity-multiplatform-e2e.yml b/.github/workflows/unity-multiplatform-e2e.yml index cb5a52a..788ccd5 100644 --- a/.github/workflows/unity-multiplatform-e2e.yml +++ b/.github/workflows/unity-multiplatform-e2e.yml @@ -331,11 +331,12 @@ jobs: if: ${{ inputs.run_android_emulator != false }} uses: reactivecircus/android-emulator-runner@v2 with: - api-level: 33 + api-level: 35 arch: x86_64 target: google_apis emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot-save script: | + adb shell getprop ro.product.cpu.abilist adb logcat -c adb install -r "${APK_PATH}" adb shell am start -n com.DefaultCompany.ASTCEncoder/com.unity3d.player.UnityPlayerActivity From d4b2643fadecb273e6554a1c4e2efb2c16034dfa Mon Sep 17 00:00:00 2001 From: FrozenKresnik <80754402+Overflowu@users.noreply.github.com> Date: Tue, 1 Dec 2026 09:39:58 +0000 Subject: [PATCH 3/4] ci(android): use POSIX sh syntax in android-emulator-runner script --- .github/workflows/unity-multiplatform-e2e.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/unity-multiplatform-e2e.yml b/.github/workflows/unity-multiplatform-e2e.yml index 788ccd5..c67c5b0 100644 --- a/.github/workflows/unity-multiplatform-e2e.yml +++ b/.github/workflows/unity-multiplatform-e2e.yml @@ -342,13 +342,13 @@ jobs: adb shell am start -n com.DefaultCompany.ASTCEncoder/com.unity3d.player.UnityPlayerActivity for i in $(seq 1 45); do LOGS="$(adb logcat -d -s Unity:V)" - if grep -q "ASTC_E2E_PASSED" <<< "${LOGS}"; then - echo "${LOGS}" + if printf '%s\n' "${LOGS}" | grep -q "ASTC_E2E_PASSED"; then + printf '%s\n' "${LOGS}" echo "Android ARM64 E2E passed!" exit 0 fi - if grep -q "ASTC_E2E_FAILED" <<< "${LOGS}"; then - echo "${LOGS}" + if printf '%s\n' "${LOGS}" | grep -q "ASTC_E2E_FAILED"; then + printf '%s\n' "${LOGS}" echo "ERROR: Android ARM64 E2E failed!" >&2 exit 1 fi From 75ce9770fe8b5594969e6cd0884019e8d2e16c8c Mon Sep 17 00:00:00 2001 From: FrozenKresnik <80754402+Overflowu@users.noreply.github.com> Date: Tue, 1 Dec 2026 09:49:34 +0000 Subject: [PATCH 4/4] ci(android): invoke E2E script file in android-emulator-runner --- .github/workflows/unity-multiplatform-e2e.yml | 51 ++++++++++--------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/.github/workflows/unity-multiplatform-e2e.yml b/.github/workflows/unity-multiplatform-e2e.yml index c67c5b0..29b4d44 100644 --- a/.github/workflows/unity-multiplatform-e2e.yml +++ b/.github/workflows/unity-multiplatform-e2e.yml @@ -320,12 +320,38 @@ jobs: unzip -l "${APK}" | grep "lib/arm64-v8a/libastcenc-neon-shared.so" unzip -l "${APK}" | grep "lib/arm64-v8a/libil2cpp.so" - - name: Enable KVM for Android Emulator + - name: Enable KVM and prepare Android E2E script if: ${{ inputs.run_android_emulator != false }} 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 + cat << 'EOF' > /tmp/run-android-e2e.sh + #!/usr/bin/env bash + set -euo pipefail + adb shell getprop ro.product.cpu.abilist + adb logcat -c + adb install -r "${APK_PATH}" + adb shell am start -n com.DefaultCompany.ASTCEncoder/com.unity3d.player.UnityPlayerActivity + for i in $(seq 1 45); do + LOGS="$(adb logcat -d -s Unity:V)" + if grep -q "ASTC_E2E_PASSED" <<< "${LOGS}"; then + echo "${LOGS}" + echo "Android ARM64 E2E passed!" + exit 0 + fi + if grep -q "ASTC_E2E_FAILED" <<< "${LOGS}"; then + echo "${LOGS}" + echo "ERROR: Android ARM64 E2E failed!" >&2 + exit 1 + fi + sleep 2 + done + echo "ERROR: Timed out waiting for ASTC_E2E_PASSED in adb logcat." >&2 + adb logcat -d -s Unity:V + exit 1 + EOF + chmod +x /tmp/run-android-e2e.sh - name: Run APK on Android ARM64 Emulator if: ${{ inputs.run_android_emulator != false }} @@ -335,28 +361,7 @@ jobs: arch: x86_64 target: google_apis emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot-save - script: | - adb shell getprop ro.product.cpu.abilist - adb logcat -c - adb install -r "${APK_PATH}" - adb shell am start -n com.DefaultCompany.ASTCEncoder/com.unity3d.player.UnityPlayerActivity - for i in $(seq 1 45); do - LOGS="$(adb logcat -d -s Unity:V)" - if printf '%s\n' "${LOGS}" | grep -q "ASTC_E2E_PASSED"; then - printf '%s\n' "${LOGS}" - echo "Android ARM64 E2E passed!" - exit 0 - fi - if printf '%s\n' "${LOGS}" | grep -q "ASTC_E2E_FAILED"; then - printf '%s\n' "${LOGS}" - echo "ERROR: Android ARM64 E2E failed!" >&2 - exit 1 - fi - sleep 2 - done - echo "ERROR: Timed out waiting for ASTC_E2E_PASSED in adb logcat." >&2 - adb logcat -d -s Unity:V - exit 1 + script: bash /tmp/run-android-e2e.sh e2e-ios-xcodebuild: name: E2E Link & Build (iOS Xcode ARM64)