Skip to content

Merge pull request #113 from mgerhold/small-bug-fixes #20

Merge pull request #113 from mgerhold/small-bug-fixes

Merge pull request #113 from mgerhold/small-bug-fixes #20

Workflow file for this run

name: Android CI
on:
release:
types: [published]
push:
branches: ["main"]
pull_request:
workflow_dispatch:
jobs:
android-build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: "0"
- name: Setup Meson
run: |
python -m pip install --upgrade pip
pip install meson
# see sdl2.wrap and the issue link in there, it is a problem on windows, and therefore it has to be enabled only in android, where it suceeds
- name: Temporary fix
run: |
sed -i 's/# diff_files/diff_files/g' subprojects/sdl2.wrap
sed -i 's/# diff_files/diff_files/g' subprojects/magic_enum.wrap
- name: Setup ninja
uses: abdes/gha-setup-ninja@master
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Setup NDK
run: |
sdkmanager --install "ndk;26.1.10909125"
- name: Run all
run: |
bash ./platforms/build-android.sh
cp -r ./assets/ platforms/android/app/src/main
- name: Build APK
run: |
cd platforms/android/
./gradlew assembleDebug --no-daemon
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: oopetris.all-apks
path: platforms/android/app/build/outputs/apk/debug/app-*-debug.apk