Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 39 additions & 26 deletions .github/workflows/unity-multiplatform-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -320,35 +320,48 @@ jobs:
unzip -l "${APK}" | grep "lib/arm64-v8a/libastcenc-neon-shared.so"
unzip -l "${APK}" | grep "lib/arm64-v8a/libil2cpp.so"

- 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 }}
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
script: |
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
api-level: 35
arch: x86_64
target: google_apis
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot-save
script: bash /tmp/run-android-e2e.sh

e2e-ios-xcodebuild:
name: E2E Link & Build (iOS Xcode ARM64)
Expand Down
Loading