Merge pull request #138 from mgerhold/color-picker #24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android CI | |
on: | |
release: | |
types: [published] | |
push: | |
branches: ["main"] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
android-build: | |
name: Build android apk for - ${{ matrix.config.arch }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- arch: armeabi-v7a | |
- arch: arm64-v8a | |
- arch: x86 | |
- arch: x86_64 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" | |
- name: Setup Meson | |
run: | | |
python -m pip install --upgrade pip | |
pip install meson | |
- name: Setup ninja | |
run: | | |
sudo apt-get update | |
sudo apt-get install ninja-build | |
- name: Setup JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Setup NDK | |
run: | | |
sdkmanager --install "ndk;26.3.11579264" | |
- name: Build natibe libraries | |
run: | | |
bash ./platforms/build-android.sh ${{ matrix.config.arch }} | |
cp -r ./assets/ platforms/android/app/src/main | |
- name: Build APK | |
run: | | |
cd platforms/android/ | |
./gradlew assembleDebug --no-daemon -PANDROID_ABI=${{ matrix.config.arch }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: oopetris.${{ matrix.config.arch }}.apk | |
path: platforms/android/app/build/outputs/apk/debug/app-*-debug.apk |