Repository navigation
68 lines (58 loc) · 1.82 KB
/
Copy pathandroid.yml
File metadata and controls
68 lines (58 loc) · 1.82 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: HyperChanger - Github Actions Building
'on':
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: temurin
cache: gradle
- name: Install Android NDK r28c
uses: android-actions/setup-android@v3
with:
packages: 'ndk;28.2.13676358'
- name: Verify Android NDK
shell: bash
run: |
set -euo pipefail
echo "ANDROID_HOME=${ANDROID_HOME:-}"
echo "ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT:-}"
SDK_ROOT="${ANDROID_HOME:-${ANDROID_SDK_ROOT:-}}"
if [ -z "$SDK_ROOT" ]; then
echo "Android SDK path is not set."
exit 1
fi
NDK_DIR="$SDK_ROOT/ndk/28.2.13676358"
test -f "$NDK_DIR/source.properties"
cat "$NDK_DIR/source.properties"
- name: Configure project NDK path
shell: bash
run: |
set -euo pipefail
SDK_ROOT="${ANDROID_HOME:-${ANDROID_SDK_ROOT:-}}"
NDK_DIR="$SDK_ROOT/ndk/28.2.13676358"
mkdir -p .build-tmp
rm -rf .build-tmp/android-ndk-r28c
ln -s "$NDK_DIR" .build-tmp/android-ndk-r28c
test -f .build-tmp/android-ndk-r28c/source.properties
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew --no-daemon --stacktrace assembleDebug
- name: Upload Debug APK
uses: actions/upload-artifact@v4
with:
name: HyperChanger-debug
path: app/build/outputs/apk/debug/*.apk
if-no-files-found: error