mirror of https://github.com/godotengine/godot
119 lines
3.2 KiB
YAML
119 lines
3.2 KiB
YAML
name: 🤖 Android Builds
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
|
|
# Global Settings
|
|
env:
|
|
SCONS_FLAGS: >-
|
|
dev_mode=yes
|
|
module_text_server_fb_enabled=yes
|
|
tests=no
|
|
swappy=yes
|
|
|
|
jobs:
|
|
build-android:
|
|
runs-on: ubuntu-24.04
|
|
name: ${{ matrix.name }}
|
|
timeout-minutes: 60
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: Editor (target=editor)
|
|
cache-name: android-editor
|
|
target: editor
|
|
scons-flags: >-
|
|
arch=arm64
|
|
production=yes
|
|
|
|
- name: Template arm32 (target=template_debug, arch=arm32)
|
|
cache-name: android-template-arm32
|
|
target: template_debug
|
|
scons-flags: arch=arm32
|
|
|
|
- name: Template arm64 (target=template_debug, arch=arm64)
|
|
cache-name: android-template-arm64
|
|
target: template_debug
|
|
scons-flags: arch=arm64
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up Java 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
|
|
- name: Restore Godot build cache
|
|
uses: ./.github/actions/godot-cache-restore
|
|
with:
|
|
cache-name: ${{ matrix.cache-name }}
|
|
continue-on-error: true
|
|
|
|
- name: Setup Python and SCons
|
|
uses: ./.github/actions/godot-deps
|
|
|
|
- name: Download Swappy
|
|
run: python ./misc/scripts/install_swappy_android.py
|
|
|
|
- name: Compilation
|
|
uses: ./.github/actions/godot-build
|
|
with:
|
|
scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.scons-flags }}
|
|
platform: android
|
|
target: ${{ matrix.target }}
|
|
|
|
- name: Save Godot build cache
|
|
uses: ./.github/actions/godot-cache-save
|
|
with:
|
|
cache-name: ${{ matrix.cache-name }}
|
|
continue-on-error: true
|
|
|
|
- name: Generate Godot templates
|
|
if: matrix.target == 'template_debug'
|
|
run: |
|
|
cd platform/android/java
|
|
./gradlew generateGodotTemplates
|
|
cd ../../..
|
|
ls -l bin/
|
|
|
|
- name: Generate Godot editor
|
|
if: matrix.target == 'editor'
|
|
run: |
|
|
cd platform/android/java
|
|
./gradlew generateGodotEditor
|
|
./gradlew generateGodotHorizonOSEditor
|
|
./gradlew generateGodotPicoOSEditor
|
|
cd ../../..
|
|
ls -l bin/android_editor_builds/
|
|
|
|
# Separate different editors for multiple artifacts
|
|
mkdir horizonos
|
|
mv bin/android_editor_builds/*-horizonos-* horizonos
|
|
mkdir picoos
|
|
mv bin/android_editor_builds/*-picoos-* picoos
|
|
|
|
- name: Upload artifact
|
|
uses: ./.github/actions/upload-artifact
|
|
with:
|
|
name: ${{ matrix.cache-name }}
|
|
|
|
- name: Upload artifact (Horizon OS)
|
|
if: matrix.target == 'editor'
|
|
uses: ./.github/actions/upload-artifact
|
|
with:
|
|
name: ${{ matrix.cache-name }}-horizonos
|
|
path: horizonos
|
|
|
|
- name: Upload artifact (PICO OS)
|
|
if: matrix.target == 'editor'
|
|
uses: ./.github/actions/upload-artifact
|
|
with:
|
|
name: ${{ matrix.cache-name }}-picoos
|
|
path: picoos
|