Skip to content

fix java.lang.OutOfMemoryError issues while compiling #6

fix java.lang.OutOfMemoryError issues while compiling

fix java.lang.OutOfMemoryError issues while compiling #6

Workflow file for this run

name: build & publish
on:
push:
branches:
- '**'
tags:
- 'v*.*.*'
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build_type: [debug, release]
include:
- build_type: debug
build_param: assembleDebug
target_path: ./mobile/build/outputs/apk/debug/ssrdroid-debug.apk
- build_type: release
build_param: assembleRelease
target_path: ./mobile/build/outputs/apk/release/ssrdroid-release.apk
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Check out submodules
run: git submodule update --init --recursive
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Install Rust targets
run: rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Set up Android NDK
run: sdkmanager --install "ndk;25.1.8937393"
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Build with Gradle
run: |
echo "==== Build type: ${{ matrix.build_type }} ===="
./gradlew ${{ matrix.build_param }}
- name: Publish Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ matrix.target_path }}