mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-27 03:04:16 +01:00
82154f3ef6
We've moved to using a beta AGP as `7.0.2` is breaks `clangd` and other C++ features on Beta/Canary Android Studio. NDK was additionally updated with `mbedtls` to fix warnings caused by it alongside some other minor fixes to code for newer versions of libcxx. The new AGP has a bug where it does not look for executables specified in `android_gradle_build.json` in `PATH` that includes `ninja` which is provided by the `ninja-build` package on the system rather than Android SDK's CMake on GitHub Actions (Ubuntu 20.04). This has been fixed by symlinking `/usr/bin/ninja` to the project root which is searched in for the `ninja` executable.
75 lines
1.9 KiB
YAML
75 lines
1.9 KiB
YAML
name: CI
|
|
|
|
on: [ push, pull_request ]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
JVM_OPTS: -Xmx6G
|
|
|
|
steps:
|
|
- name: Git Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Restore Gradle Cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: /root/.gradle/
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/build.gradle') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
|
|
- name: Restore CXX Cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: app/.cxx/
|
|
key: ${{ runner.os }}-cxx-${{ hashFiles('**/CMakeLists.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cxx-
|
|
|
|
- name: Install Ninja Build
|
|
run: |
|
|
sudo apt-get install -y ninja-build
|
|
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
|
|
|
|
- name: Android Lint
|
|
run: |
|
|
chmod +x gradlew
|
|
./gradlew --stacktrace lint
|
|
|
|
- name: Upload Lint Report
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: lint-result.html
|
|
path: app/build/reports/lint-results-debug.html
|
|
|
|
- name: Android Assemble
|
|
run: ./gradlew --stacktrace assemble
|
|
|
|
- name: Upload Debug APK
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: app-debug.apk
|
|
path: app/build/outputs/apk/debug/
|
|
|
|
- name: Upload Release APK
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: app-release.apk
|
|
path: app/build/outputs/apk/release/
|
|
|
|
- name: Upload R8 Mapping
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: mapping.txt
|
|
path: app/build/outputs/mapping/release/
|
|
|
|
- name: Delete Build Folder
|
|
run: rm -rf app/build/
|