99 - completed
1010
1111jobs :
12- test -windows :
13- name : Test Windows Build
12+ run -windows :
13+ name : Run Windows Build
1414 runs-on : windows-latest
1515
1616 steps :
5454 Write-Error "No SentaurSurvivors executable found in build artifacts"
5555 exit 1
5656 }
57-
58- test-android :
59- name : Test Android Build
60- runs-on : ubuntu-latest
61-
62- steps :
63- - name : Download Android Build
64- uses : actions/download-artifact@v4
65- with :
66- name : Build-Android
67- path : ./build
68- github-token : ${{ secrets.GITHUB_TOKEN }}
69- run-id : ${{ github.event_name == 'workflow_run' && github.event.workflow_run.id || github.run_id }}
70-
71- - name : Set up JDK 17
72- uses : actions/setup-java@v4
73- with :
74- java-version : ' 17'
75- distribution : ' temurin'
76-
77- - name : Enable KVM group perms
78- run : |
79- echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
80- sudo udevadm control --reload-rules
81- sudo udevadm trigger --name-match=kvm
82-
83- - name : Set up Android SDK
84- uses : android-actions/setup-android@v3
85-
86- - name : AVD cache
87- uses : actions/cache@v4
88- id : avd-cache
89- with :
90- path : |
91- ~/.android/avd/*
92- ~/.android/adb*
93- key : avd-29
94-
95- - name : Create AVD and generate snapshot for caching
96- if : steps.avd-cache.outputs.cache-hit != 'true'
97- uses : reactivecircus/android-emulator-runner@v2
98- with :
99- api-level : 29
100- target : google_apis
101- arch : x86_64
102- profile : Nexus 6
103- force-avd-creation : false
104- emulator-options : -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
105- disable-animations : false
106- script : echo "Generated AVD snapshot for caching."
107-
108- - name : Find APK file
109- id : find-apk
110- run : |
111- APK_FILE=$(find ./build -name "*.apk" -type f | head -1)
112- if [ -z "$APK_FILE" ]; then
113- echo "Error: No APK file found in build artifacts"
114- exit 1
115- fi
116- echo "Found APK: $APK_FILE"
117- echo "apk_path=$APK_FILE" >> $GITHUB_OUTPUT
118-
11957 - name : Run Android Emulator
12058 uses : reactivecircus/android-emulator-runner@v2
12159 env :
@@ -132,12 +70,16 @@ jobs:
13270 adb install "${{ steps.find-apk.outputs.apk_path }}"
13371
13472 echo "Starting app..."
135- # Get package name from APK
136- PACKAGE_NAME=$(aapt dump badging "${{ steps.find-apk.outputs.apk_path }}" | grep package | awk '{print $2}' | sed "s/name='//" | sed "s/'.*//")
73+ # Get package name from installed packages (more reliable after install)
74+ PACKAGE_NAME=$(adb shell pm list packages | grep sentaur | head -1 | cut -d: -f2)
75+ if [ -z "$PACKAGE_NAME" ]; then
76+ # Fallback: try to find Unity package pattern
77+ PACKAGE_NAME=$(adb shell pm list packages | grep -i "unity\|sentry\|survivors" | head -1 | cut -d: -f2)
78+ fi
13779 echo "Package name: $PACKAGE_NAME"
13880
139- # Get main activity
140- MAIN_ACTIVITY=$(aapt dump badging "${{ steps.find-apk.outputs.apk_path }}" | grep "launchable-activity" | awk '{print $2}' | sed "s/name='//" | sed "s/'.*//")
81+ # For Unity apps, the main activity is typically the UnityPlayerActivity
82+ MAIN_ACTIVITY="com.unity3d.player.UnityPlayerActivity"
14183 echo "Main activity: $MAIN_ACTIVITY"
14284
14385 # Pass DSN as Intent extra for Android runtime configuration
0 commit comments