mirror of
https://github.com/element-hq/element-android
synced 2024-11-27 20:06:51 +03:00
37 lines
1.3 KiB
YAML
37 lines
1.3 KiB
YAML
name: ER APK Build
|
|
|
|
on:
|
|
pull_request: { }
|
|
push:
|
|
branches: [ 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 ER
|
|
runs-on: ubuntu-latest
|
|
if: github.ref != 'refs/heads/main'
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
target: [ Gplay, Fdroid ]
|
|
# Allow all jobs on develop. Just one per PR.
|
|
concurrency:
|
|
group: ${{ github.ref == 'refs/heads/develop' && format('elementr-{0}-{1}', matrix.target, github.sha) || format('build-er-debug-{0}-{1}', matrix.target, github.ref) }}
|
|
cancel-in-progress: true
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
- name: Assemble ${{ matrix.target }} debug apk
|
|
run: ./gradlew assemble${{ matrix.target }}RustCryptoDebug $CI_GRADLE_ARG_PROPERTIES
|