forked from Banderi/Ozymandias_Julius
-
-
Notifications
You must be signed in to change notification settings - Fork 42
53 lines (51 loc) · 1.43 KB
/
Copy pathakhenaten_android.yml
File metadata and controls
53 lines (51 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Akhenaten Build Android
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
name: run on linux
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-java@v5
with:
java-version: 17
distribution: temurin
- name: update-workspace
run: |
sudo apt -qq update
sudo apt install --yes cmake build-essential ninja-build libsdl2-dev libsdl2-mixer-dev
- name: build-project
run: |
mkdir build
cd build
cmake -DCMAKE_BUILD_DEPENDENCIES=android ..
cd ..
- name: Build APK
run: |
cd android
SDK_ROOT="${ANDROID_SDK_ROOT:-${ANDROID_HOME:-}}"
if [ -z "$SDK_ROOT" ]; then
for candidate in "$HOME/Android/Sdk" "$HOME/android-sdk" "/usr/local/lib/android/sdk"; do
if [ -d "$candidate" ]; then
SDK_ROOT="$candidate"
break
fi
done
fi
if [ -z "$SDK_ROOT" ] || [ ! -d "$SDK_ROOT" ]; then
echo "Android SDK not found on runner"
exit 1
fi
printf 'sdk.dir=%s\n' "$SDK_ROOT" > local.properties
bash ./gradlew assembleDebug --stacktrace
- name: Upload APK
uses: actions/upload-artifact@v6
with:
name: apk
path: android/akhenaten/build/outputs/apk/debug/akhenaten-debug.apk