diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml new file mode 100644 index 000000000..f4f1b4cc1 --- /dev/null +++ b/.github/workflows/android.yml @@ -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/ diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 51899f049..c3d45ce60 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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 diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index 398ab779b..f307a2237 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -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 diff --git a/.github/workflows/msvc.yml b/.github/workflows/msvc.yml index f051ccbdc..74a07dd78 100644 --- a/.github/workflows/msvc.yml +++ b/.github/workflows/msvc.yml @@ -4,7 +4,7 @@ on: workflow_call: jobs: - build: + msvc: strategy: matrix: config: diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 183ee8c85..60a05a7d7 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -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: diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index c8f5c4c2a..886d80065 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -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: diff --git a/android/app/build.gradle b/android/app/build.gradle index a229b28d4..c5e87647f 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -25,10 +25,6 @@ android { path 'jni/Android.mk' } } - - lintOptions { - abortOnError false - } } dependencies { diff --git a/android/app/lint.xml b/android/app/lint.xml new file mode 100644 index 000000000..76b9e8658 --- /dev/null +++ b/android/app/lint.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/android/gradlew b/android/gradlew old mode 100644 new mode 100755