-
Notifications
You must be signed in to change notification settings - Fork 25
68 lines (65 loc) · 1.96 KB
/
android.yml
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: Android CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install GNU C++ compiler
run: |
sudo apt-get update
sudo apt-get install -y g++
- name: Switch to JDK 11
run: export JAVA_HOME=$JAVA_HOME_11_X64
- name: Install required Android SDK packages
run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "cmake;3.22.1" "ndk;23.2.8568313"
- name: Build required modules
run: |
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/23.2.8568313
pushd binary/jni
./build.sh -md
popd
- name: Build with Gradle
run: ./gradlew --no-daemon assembleDebug
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: android-apks
path: app/build/outputs/apk/debug/*.apk
build-binary:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install GNU C++ compiler
run: |
sudo apt-get update
sudo apt-get install -y g++
- name: Switch to JDK 11
run: export JAVA_HOME=$JAVA_HOME_11_X64
- name: Install required Android SDK packages
run: $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "cmake;3.22.1" "ndk;23.2.8568313"
- name: Build binaries with NDK
run: |
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/23.2.8568313
pushd binary/jni
./build.sh
popd
- name: Create package with built binaries
run: |
pushd contrib/binary_pack
./build-archive
popd
- name: Upload binaries archive
uses: actions/upload-artifact@v4
with:
name: android-binaries
path: binary/libs/*
- name: Upload binaries package
uses: actions/upload-artifact@v4
with:
name: android-binaries-pack
path: contrib/binary_pack/i2pd_*_android_binary.zip