2019-12-11 20:02:42 +03:00
|
|
|
name: CI
|
|
|
|
|
2021-03-26 21:12:19 +03:00
|
|
|
on: [ push, pull_request ]
|
2019-12-11 20:02:42 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
JVM_OPTS: -Xmx6G
|
|
|
|
|
|
|
|
steps:
|
2021-03-26 21:12:19 +03:00
|
|
|
- name: Git Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
2019-12-11 20:02:42 +03:00
|
|
|
|
2021-03-26 21:12:19 +03: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 20:02:42 +03:00
|
|
|
|
2021-03-26 21:12:19 +03: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 20:02:42 +03:00
|
|
|
|
2021-10-31 01:03:27 +03:00
|
|
|
- name: Install Ninja Build
|
2021-03-26 21:12:19 +03:00
|
|
|
run: |
|
|
|
|
sudo apt-get install -y ninja-build
|
2021-10-31 01:03:27 +03:00
|
|
|
ln -s /usr/bin/ninja .
|
|
|
|
|
|
|
|
- name: Install CMake & Android NDK
|
|
|
|
run: echo "yes" | $ANDROID_HOME/tools/bin/sdkmanager "cmake;3.18.1" "ndk;24.0.7856742" --channel=3 | grep -v = || true
|
2019-12-11 20:02:42 +03:00
|
|
|
|
2021-03-26 21:12:19 +03:00
|
|
|
- name: Android Lint
|
2021-10-31 01:03:27 +03:00
|
|
|
run: |
|
|
|
|
chmod +x gradlew
|
|
|
|
./gradlew --stacktrace lint
|
2019-12-11 20:02:42 +03:00
|
|
|
|
2021-03-26 21:12:19 +03:00
|
|
|
- name: Upload Lint Report
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: lint-result.html
|
2021-10-16 14:27:29 +03:00
|
|
|
path: app/build/reports/lint-results-debug.html
|
2019-12-11 20:02:42 +03:00
|
|
|
|
2021-03-26 21:12:19 +03:00
|
|
|
- name: Android Assemble
|
2021-04-03 23:58:49 +03:00
|
|
|
run: ./gradlew --stacktrace assemble
|
2019-12-11 20:02:42 +03:00
|
|
|
|
2021-03-26 21:12:19 +03:00
|
|
|
- name: Upload Debug APK
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: app-debug.apk
|
|
|
|
path: app/build/outputs/apk/debug/
|
2019-12-11 20:02:42 +03:00
|
|
|
|
2021-03-26 21:12:19 +03:00
|
|
|
- name: Upload Release APK
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: app-release.apk
|
|
|
|
path: app/build/outputs/apk/release/
|
2019-12-11 20:02:42 +03:00
|
|
|
|
2021-03-26 21:12:19 +03:00
|
|
|
- name: Upload R8 Mapping
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: mapping.txt
|
|
|
|
path: app/build/outputs/mapping/release/
|
2019-12-11 20:02:42 +03:00
|
|
|
|
2021-03-26 21:12:19 +03:00
|
|
|
- name: Delete Build Folder
|
|
|
|
run: rm -rf app/build/
|