2019-12-11 18:02:42 +01:00
|
|
|
name: CI
|
|
|
|
|
2021-03-26 19:12:19 +01:00
|
|
|
on: [ push, pull_request ]
|
2019-12-11 18:02:42 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
JVM_OPTS: -Xmx6G
|
|
|
|
|
|
|
|
steps:
|
2021-03-26 19:12:19 +01:00
|
|
|
- name: Git Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2019-12-11 18:02:42 +01:00
|
|
|
|
2021-03-26 19:12:19 +01:00
|
|
|
- name: Restore Gradle Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: /root/.gradle/
|
|
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradle-
|
2019-12-11 18:02:42 +01:00
|
|
|
|
2021-03-26 19:12:19 +01:00
|
|
|
- name: Restore CXX Cache
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: app/.cxx/
|
|
|
|
key: ${{ runner.os }}-cxx-${{ hashFiles('**/CMakeLists.txt') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-cxx-
|
2019-12-11 18:02:42 +01:00
|
|
|
|
2021-04-03 22:58:49 +02:00
|
|
|
- name: Setup Environment for Gradle & Ninja Build & CMake
|
2021-03-26 19:12:19 +01:00
|
|
|
run: |
|
|
|
|
chmod +x gradlew
|
|
|
|
sudo apt-get install -y ninja-build
|
2021-04-03 22:58:49 +02:00
|
|
|
echo "yes" | $ANDROID_HOME/tools/bin/sdkmanager "cmake;3.18.1" --channel=3
|
2019-12-11 18:02:42 +01:00
|
|
|
|
2021-03-26 19:12:19 +01:00
|
|
|
- name: Android Lint
|
|
|
|
run: ./gradlew --stacktrace lint
|
2019-12-11 18:02:42 +01:00
|
|
|
|
2021-03-26 19:12:19 +01:00
|
|
|
- name: Upload Lint Report
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: lint-result.html
|
2021-10-16 13:27:29 +02:00
|
|
|
path: app/build/reports/lint-results-debug.html
|
2019-12-11 18:02:42 +01:00
|
|
|
|
2021-03-26 19:12:19 +01:00
|
|
|
- name: Android Assemble
|
2021-04-03 22:58:49 +02:00
|
|
|
run: ./gradlew --stacktrace assemble
|
2019-12-11 18:02:42 +01:00
|
|
|
|
2021-03-26 19:12:19 +01:00
|
|
|
- name: Upload Debug APK
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: app-debug.apk
|
|
|
|
path: app/build/outputs/apk/debug/
|
2019-12-11 18:02:42 +01:00
|
|
|
|
2021-03-26 19:12:19 +01:00
|
|
|
- name: Upload Release APK
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: app-release.apk
|
|
|
|
path: app/build/outputs/apk/release/
|
2019-12-11 18:02:42 +01:00
|
|
|
|
2021-03-26 19:12:19 +01:00
|
|
|
- name: Upload R8 Mapping
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: mapping.txt
|
|
|
|
path: app/build/outputs/mapping/release/
|
2019-12-11 18:02:42 +01:00
|
|
|
|
2021-03-26 19:12:19 +01:00
|
|
|
- name: Delete Build Folder
|
|
|
|
run: rm -rf app/build/
|