41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
name: Android Build CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ master, release-*, development ]
|
|
pull_request:
|
|
branches: [ master, release-*, development ]
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: [ self-hosted, android ]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: set up JDK 11
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: '11'
|
|
distribution: 'adopt'
|
|
- name: Setup Android SDK
|
|
uses: android-actions/setup-android@v2
|
|
- name: Grant execute permission for gradlew
|
|
run: chmod +x gradlew
|
|
- name: Unit Test (for modules w/o flavors)
|
|
run: ./gradlew testDebugUnitTest
|
|
- name: Unit Test (for modules w/ flavors)
|
|
run: ./gradlew testDevDebugUnitTest
|
|
- name: Assemble with Stacktrace
|
|
run: ./gradlew assembleDevDebug --stacktrace
|
|
- name: Upload APK
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: app-dev-debug
|
|
path: app/build/outputs/apk/dev/debug/
|
|
retention-days: 30
|