mirror of
https://github.com/ihhub/fheroes2.git
synced 2026-10-11 21:59:51 +00:00
Add basic CI for Android (#6005)
This commit is contained in:
@@ -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/
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -4,7 +4,7 @@ on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
msvc:
|
||||
strategy:
|
||||
matrix:
|
||||
config:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -25,10 +25,6 @@ android {
|
||||
path 'jni/Android.mk'
|
||||
}
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<lint>
|
||||
<issue id="OldTargetApi" severity="ignore"/>
|
||||
</lint>
|
||||
Reference in New Issue
Block a user