Skip to content

Commit 6a6af24

Browse files
committed
Update test_android.yml
1 parent fc4f62c commit 6a6af24

File tree

1 file changed

+33
-47
lines changed

1 file changed

+33
-47
lines changed

.github/workflows/test_android.yml

Lines changed: 33 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,22 @@ jobs:
2121
with:
2222
arch: x86_64
2323

24-
# TODO: move to prepare testing
25-
- name: Download Android template
26-
shell: bash
24+
- name: Deploy Android build template
2725
env:
2826
GODOT_VERSION: 4.5.1-stable
29-
run: |
30-
archive_file=Godot_v${GODOT_VERSION}_export_templates.tpz
31-
url=https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}/${archive_file}
32-
curl -L -o templates.zip "${url}"
33-
unzip -j templates.zip templates/android_source.zip -d exports/
34-
rm templates.zip
35-
36-
# TODO: need to cache it
37-
38-
mkdir -p project/android/build
39-
unzip exports/android_source.zip -d project/android/build
27+
run: ./scripts/deploy-android-template.sh $GODOT_VERSION
4028

41-
# NOTE: Godot expects build version file
42-
echo "../exports/android_source.zip [$(md5sum exports/android_source.zip | cut -d' ' -f1)]" > project/android/.build_version
29+
- name: Set up Java 17
30+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
31+
with:
32+
distribution: temurin
33+
java-version: 17
4334

44-
ls -lR project/android/
35+
- name: Set up NDK
36+
uses: nttld/setup-ndk@afb4c9964b521afb97c864b7d40b11e6911bd410 # v1.5.0
37+
with:
38+
ndk-version: r28b
39+
link-to-sdk: true
4540

4641
- name: Export project
4742
shell: bash
@@ -51,36 +46,27 @@ jobs:
5146
SENTRY_TEST_INCLUDE: "res://test/suites/"
5247
run: |
5348
cp exports/export_presets.cfg project/export_presets.cfg
54-
mkdir -p exports/android/
55-
${GODOT} --path project/ --headless --export-debug "Android CI" ${GITHUB_WORKSPACE}/exports/android.apk
49+
"$GODOT" --path project/ --headless --export-debug "Android CI" "${GITHUB_WORKSPACE}/exports/android.apk"
5650
5751
ls -lR exports/
5852
59-
# - name: Run Android Tests
60-
# uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # [email protected]
61-
# timeout-minutes: 30
62-
# with:
63-
# api-level: 30
64-
# target: "google_apis"
65-
# channel: "stable"
66-
# force-avd-creation: true
67-
# disable-animations: true
68-
# disable-spellchecker: true
69-
# emulator-options: >
70-
# -no-window
71-
# -no-snapshot-save
72-
# -gpu swiftshader_indirect
73-
# -noaudio
74-
# -no-boot-anim
75-
# -camera-back none
76-
# -camera-front none
77-
# -timezone US/Pacific
78-
# arch: x86_64
79-
# script: |
80-
# adb wait-for-device
81-
# adb shell input keyevent 82
82-
# adb devices -l
83-
# adb install exports/android.apk
84-
# adb shell am start -n io.sentry.godot.project/com.godot.game.GodotApp \
85-
# --es env SENTRY_TEST=1 \
86-
# --es env SENTRY_TEST_INCLUDE="res://test/suites/"
53+
- name: Run Android Tests
54+
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # [email protected]
55+
timeout-minutes: 30
56+
with:
57+
api-level: 30
58+
target: "google_apis"
59+
channel: "stable"
60+
force-avd-creation: true
61+
disable-animations: true
62+
disable-spellchecker: true
63+
emulator-options: >
64+
-no-window
65+
-no-snapshot-save
66+
-gpu swiftshader_indirect
67+
-noaudio
68+
-no-boot-anim
69+
-camera-back none
70+
-camera-front none
71+
arch: arm64-v8a
72+
script: ./scripts/run-android-tests.sh

0 commit comments

Comments
 (0)