2020-09-17 00:38:49 +00:00
|
|
|
name: Android build
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- fork
|
|
|
|
jobs:
|
|
|
|
run-build:
|
|
|
|
runs-on: ubuntu-latest
|
2020-09-27 12:17:05 +00:00
|
|
|
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
2020-09-17 00:38:49 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
2020-09-29 03:15:27 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2020-09-17 00:38:49 +00:00
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
2020-11-09 01:07:44 +00:00
|
|
|
- name: Install Android SDK with pieces Gradle skips
|
|
|
|
run: ./automation/iceraven/install-sdk.sh
|
2020-09-29 03:15:27 +00:00
|
|
|
- name: Create version name
|
2020-10-11 22:26:51 +00:00
|
|
|
run: echo "VERSION_NAME=$(git describe --tags HEAD)" >> $GITHUB_ENV
|
2020-09-17 00:38:49 +00:00
|
|
|
- name: Build forkRelease variant of app
|
|
|
|
uses: eskatos/gradle-command-action@v1
|
|
|
|
with:
|
|
|
|
wrapper-cache-enabled: true
|
|
|
|
dependencies-cache-enabled: true
|
|
|
|
configuration-cache-enabled: true
|
2020-09-29 03:15:27 +00:00
|
|
|
arguments: assembleForkRelease -PversionName=${{ env.VERSION_NAME }}
|
|
|
|
- name: Create signed APKs
|
2020-10-11 22:26:51 +00:00
|
|
|
uses: abhijitvalluri/sign-apks@v0.8
|
2020-09-29 03:15:27 +00:00
|
|
|
with:
|
|
|
|
releaseDirectory: app/build/outputs/apk/forkRelease/
|
|
|
|
signingKeyBase64: ${{ secrets.DEBUG_SIGNING_KEY }}
|
|
|
|
alias: ${{ secrets.DEBUG_ALIAS }}
|
|
|
|
keyStorePassword: ${{ secrets.DEBUG_KEY_STORE_PASSWORD }}
|
|
|
|
keyPassword: ${{ secrets.DEBUG_KEY_PASSWORD }}
|
2020-10-11 22:26:51 +00:00
|
|
|
- name: Archive arm64 apk
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: app-arm64-v8a-forkRelease.apk
|
|
|
|
path: app/build/outputs/apk/forkRelease/app-arm64-v8a-forkRelease.apk
|
|
|
|
- name: Archive armeabi apk
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: app-armeabi-v7a-forkRelease.apk
|
|
|
|
path: app/build/outputs/apk/forkRelease/app-armeabi-v7a-forkRelease.apk
|
|
|
|
- name: Archive x86 apk
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: app-x86-forkRelease.apk
|
|
|
|
path: app/build/outputs/apk/forkRelease/app-x86-forkRelease.apk
|
|
|
|
- name: Archive x86_64 apk
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: app-x86_64-forkRelease.apk
|
|
|
|
path: app/build/outputs/apk/forkRelease/app-x86_64-forkRelease.apk
|
2020-09-26 21:40:02 +00:00
|
|
|
|
|
|
|
|
2020-09-17 00:38:49 +00:00
|
|
|
run-testDebug:
|
|
|
|
runs-on: ubuntu-latest
|
2020-09-27 12:17:05 +00:00
|
|
|
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
2020-09-17 00:38:49 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
- name: Run tests
|
|
|
|
uses: eskatos/gradle-command-action@v1
|
|
|
|
with:
|
|
|
|
wrapper-cache-enabled: true
|
|
|
|
dependencies-cache-enabled: true
|
|
|
|
configuration-cache-enabled: true
|
|
|
|
arguments: testDebug
|
2020-09-26 21:40:02 +00:00
|
|
|
|
|
|
|
|
2020-09-17 00:38:49 +00:00
|
|
|
run-detekt:
|
|
|
|
runs-on: ubuntu-latest
|
2020-09-27 12:17:05 +00:00
|
|
|
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
2020-09-17 00:38:49 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
- name: Run detekt
|
|
|
|
uses: eskatos/gradle-command-action@v1
|
|
|
|
with:
|
|
|
|
wrapper-cache-enabled: true
|
|
|
|
dependencies-cache-enabled: true
|
|
|
|
configuration-cache-enabled: true
|
|
|
|
arguments: detekt
|
|
|
|
- name: Archive detekt results
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: detekt report
|
|
|
|
path: build/reports/detekt.html
|
2020-09-26 21:40:02 +00:00
|
|
|
|
|
|
|
|
2020-09-17 00:38:49 +00:00
|
|
|
run-ktlint:
|
|
|
|
runs-on: ubuntu-latest
|
2020-09-27 12:17:05 +00:00
|
|
|
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
2020-09-17 00:38:49 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
- name: Run ktlint
|
|
|
|
uses: eskatos/gradle-command-action@v1
|
|
|
|
with:
|
|
|
|
wrapper-cache-enabled: true
|
|
|
|
dependencies-cache-enabled: true
|
|
|
|
configuration-cache-enabled: true
|
|
|
|
arguments: ktlint
|
2020-09-26 21:40:02 +00:00
|
|
|
|
|
|
|
|
2020-09-17 00:38:49 +00:00
|
|
|
run-lintDebug:
|
|
|
|
runs-on: ubuntu-latest
|
2020-09-27 12:17:05 +00:00
|
|
|
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
2020-09-17 00:38:49 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Java
|
|
|
|
uses: actions/setup-java@v1
|
|
|
|
with:
|
|
|
|
java-version: 11
|
|
|
|
- name: Run lintDebug
|
|
|
|
uses: eskatos/gradle-command-action@v1
|
|
|
|
with:
|
|
|
|
wrapper-cache-enabled: true
|
|
|
|
dependencies-cache-enabled: true
|
|
|
|
configuration-cache-enabled: true
|
|
|
|
arguments: lintDebug
|
|
|
|
- name: Archive lint results
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: lintDebug report
|
|
|
|
path: app/build/reports/lint-results-debug.html
|