1
0
mirror of https://github.com/PurpleI2P/i2pd-android.git synced 2025-01-10 14:57:55 +00:00
i2pd-android/.github/workflows/android.yml

69 lines
2.0 KiB
YAML
Raw Normal View History

name: Android CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
2020-10-15 02:38:04 +00:00
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
popd
- name: Build with Gradle
2020-10-15 02:38:04 +00:00
run: ./gradlew --no-daemon assembleDebug
- name: Upload artifacts
uses: actions/upload-artifact@v4
2020-10-15 02:38:04 +00:00
with:
name: android-apks
2020-10-15 02:38:04 +00:00
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 binary with NDK
run: |
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk/23.2.8568313
pushd binary/jni
./build.sh -b
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