Skip to content

Commit 4f71c4b

Browse files
committed
feat(ci): android integration tests
1 parent f8478fb commit 4f71c4b

2 files changed

Lines changed: 86 additions & 1 deletion

File tree

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Android Platform Integration
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
9+
permissions:
10+
contents: read
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
android:
18+
name: Android
19+
runs-on: ubuntu-latest
20+
env:
21+
MISE_EXEC_AUTO_INSTALL: "false"
22+
MISE_NOT_FOUND_AUTO_INSTALL: "false"
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v6
27+
28+
- name: Install Node and Java
29+
uses: jdx/mise-action@v3
30+
with:
31+
install: true
32+
install_args: node java
33+
cache: true
34+
35+
- name: Setup Godot
36+
uses: chickensoft-games/setup-godot@v2
37+
with:
38+
version: 4.6.2
39+
use-dotnet: true
40+
include-templates: true
41+
42+
- name: Enable Corepack
43+
run: mise x -- corepack enable pnpm
44+
45+
- name: Get pnpm store path
46+
id: pnpm-store
47+
run: echo "path=$(mise x -- corepack pnpm store path --silent)" >> "$GITHUB_OUTPUT"
48+
49+
- name: Cache pnpm store
50+
uses: actions/cache@v5
51+
with:
52+
path: ${{ steps.pnpm-store.outputs.path }}
53+
key: ${{ runner.os }}-${{ runner.arch }}-pnpm-store-${{ hashFiles('pnpm-lock.yaml') }}
54+
restore-keys: |
55+
${{ runner.os }}-${{ runner.arch }}-pnpm-store-
56+
57+
- name: Install pnpm dependencies
58+
run: mise x -- corepack pnpm install --frozen-lockfile
59+
60+
- name: Install Android SDK platforms
61+
run: |
62+
yes | sdkmanager --licenses >/dev/null
63+
sdkmanager "platforms;android-35" "platforms;android-36" "build-tools;36.0.0" "platform-tools"
64+
65+
- name: Build integration APK
66+
run: mise x -- bash -c 'GODOT_BIN="${GODOT:-godot}" scripts/build_integration_android.sh'
67+
68+
- name: Enable KVM
69+
run: |
70+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
71+
sudo udevadm control --reload-rules
72+
sudo udevadm trigger --name-match=kvm
73+
74+
- name: Run integration tests
75+
uses: reactivecircus/android-emulator-runner@v2
76+
with:
77+
api-level: 35
78+
target: google_apis
79+
arch: x86_64
80+
profile: pixel_7
81+
script: |
82+
adb install -r dist/integration/android_debug.apk
83+
scripts/run_integration_android_test.sh ipc_round_trip_probe
84+
scripts/run_integration_android_test.sh webview_lifecycle_probe
85+
scripts/run_integration_android_test.sh res_asset_loading_probe

tests/integration/export_presets.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ gradle_build/export_format=0
2222
architectures/armeabi-v7a=false
2323
architectures/arm64-v8a=true
2424
architectures/x86=false
25-
architectures/x86_64=false
25+
architectures/x86_64=true
2626
package/unique_name="ai.moeru.kirie.integrationtests"
2727
package/signed=true
2828
package/show_as_launcher_app=false

0 commit comments

Comments
 (0)