Add basic CI for Android (#6005)

This commit is contained in:
Oleg Derevenetz
2022-10-20 22:09:55 +08:00
committed by GitHub
parent 34a349467d
commit 4cdf461ce7
9 changed files with 51 additions and 12 deletions
+32
View File
@@ -0,0 +1,32 @@
name: Android
on:
workflow_call:
env:
ANDROID_DEPS_URL: https://github.com/fheroes2/fheroes2-prebuilt-deps/releases/download/android-deps/android.zip
jobs:
android:
name: Android
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
wget "$ANDROID_DEPS_URL"
unzip -d android android.zip
- name: Build
run: |
cd android
./gradlew assembleDebug
- name: Lint
run: |
cd android
./gradlew app:lint
- uses: actions/upload-artifact@v3
if: ${{ success() || failure() }}
with:
name: android-lint-report
path: android/app/build/reports/
+2 -2
View File
@@ -4,7 +4,7 @@ on:
workflow_call:
jobs:
build:
cmake:
strategy:
matrix:
config:
@@ -54,7 +54,7 @@ jobs:
- name: Install
run: |
sudo cmake --install build
build-windows:
cmake-windows:
name: CMake (Windows SDL2)
runs-on: windows-latest
timeout-minutes: 30
+3 -3
View File
@@ -4,7 +4,7 @@ on:
workflow_call:
jobs:
build:
make:
strategy:
matrix:
config:
@@ -103,7 +103,7 @@ jobs:
artifactErrorsFailBuild: true
prerelease: true
replacesArtifacts: true
build-psv:
make-psv:
name: Make (PS Vita)
runs-on: ubuntu-latest
timeout-minutes: 30
@@ -190,7 +190,7 @@ jobs:
artifactErrorsFailBuild: true
prerelease: true
replacesArtifacts: true
build-switch:
make-switch:
name: Make (Nintendo Switch)
runs-on: ubuntu-latest
timeout-minutes: 30
+1 -1
View File
@@ -4,7 +4,7 @@ on:
workflow_call:
jobs:
build:
msvc:
strategy:
matrix:
config:
+5
View File
@@ -29,6 +29,11 @@ jobs:
uses: ./.github/workflows/sonarcloud.yml
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
android:
name: Android
needs:
- msvc
uses: ./.github/workflows/android.yml
cmake:
name: CMake
needs:
+3 -2
View File
@@ -6,14 +6,15 @@ on:
SONAR_TOKEN:
required: true
env:
SONAR_SCANNER_VERSION: 4.5.0.2216
jobs:
sonarcloud:
name: SonarCloud Analyzer
runs-on: ubuntu-latest
timeout-minutes: 30
if: ${{ github.repository == 'ihhub/fheroes2' && ( github.event_name == 'push' || ( github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository ) ) }}
env:
SONAR_SCANNER_VERSION: 4.5.0.2216
steps:
- uses: actions/checkout@v3
with:
-4
View File
@@ -25,10 +25,6 @@ android {
path 'jni/Android.mk'
}
}
lintOptions {
abortOnError false
}
}
dependencies {
+5
View File
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<lint>
<issue id="OldTargetApi" severity="ignore"/>
</lint>
Vendored Regular → Executable
View File