Android Matrix messenger application using the Matrix Rust Sdk and Jetpack Compose
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
name: APK Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request: { }
|
|
|
|
push:
|
|
|
|
branches: [ main, develop ]
|
|
|
|
|
|
|
|
# Enrich gradle.properties for CI/CD
|
|
|
|
env:
|
|
|
|
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx3072m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx2560m" -Dkotlin.incremental=false
|
|
|
|
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 2 --no-daemon
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
debug:
|
|
|
|
name: Build debug APKs
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.ref != 'refs/heads/main'
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
# Allow all jobs on develop. Just one per PR.
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.ref == 'refs/heads/develop' && format('build-develop-{0}', github.sha) || format('build-debug-{0}', github.ref) }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Assemble debug APK
|
|
|
|
run: ./gradlew assembleDebug $CI_GRADLE_ARG_PROPERTIES
|
|
|
|
- name: Upload debug APKs
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: elementx-debug
|
|
|
|
path: |
|
|
|
|
app/build/outputs/apk/debug/app-debug.apk
|
|
|
|
- name: Compile release sources
|
|
|
|
run: ./gradlew compileReleaseSources $CI_GRADLE_ARG_PROPERTIES
|
|
|
|
- name: Compile nighlty sources
|
|
|
|
run: ./gradlew compileNightlySources $CI_GRADLE_ARG_PROPERTIES
|