mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
aaa0e2fddf
- Adds Swappy for Android for stable frame pacing - Implements pre-transformed Swapchain so that Godot's compositor is in charge of rotating the screen instead of Android's compositor (performance optimization for phones that don't have HW rotator) ============================ The work was performed by collaboration of TheForge and Google. I am merely splitting it up into smaller PRs and cleaning it up. Changes from original PR: - Removed "display/window/frame_pacing/android/target_frame_rate" option to use Engine::get_max_fps instead. - Target framerate can be changed at runtime using Engine::set_max_fps. - Swappy is enabled by default. - Added documentation. - enable_auto_swap setting is replaced with swappy_mode.
108 lines
3.2 KiB
YAML
108 lines
3.2 KiB
YAML
name: 🤖 Android Builds
|
|
on:
|
|
workflow_call:
|
|
|
|
# Global Settings
|
|
env:
|
|
# Used for the cache key. Add version suffix to force clean build.
|
|
GODOT_BASE_BRANCH: master
|
|
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes strict_checks=yes
|
|
|
|
concurrency:
|
|
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-android
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build-android:
|
|
runs-on: ubuntu-20.04
|
|
name: ${{ matrix.name }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: Editor (target=editor)
|
|
cache-name: android-editor
|
|
target: editor
|
|
tests: false
|
|
sconsflags: arch=arm64 production=yes swappy=yes
|
|
|
|
- name: Template arm32 (target=template_release, arch=arm32)
|
|
cache-name: android-template-arm32
|
|
target: template_release
|
|
tests: false
|
|
sconsflags: arch=arm32 swappy=yes
|
|
|
|
- name: Template arm64 (target=template_release, arch=arm64)
|
|
cache-name: android-template-arm64
|
|
target: template_release
|
|
tests: false
|
|
sconsflags: arch=arm64 swappy=yes
|
|
|
|
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 pre-built Android Swappy Frame Pacing Library
|
|
uses: dsaltares/fetch-gh-release-asset@1.1.2
|
|
with:
|
|
repo: darksylinc/godot-swappy
|
|
version: tags/v2023.3.0.0
|
|
file: godot-swappy.7z
|
|
target: swappy/godot-swappy.7z
|
|
|
|
- name: Extract pre-built Android Swappy Frame Pacing Library
|
|
run: 7za x -y swappy/godot-swappy.7z -o${{github.workspace}}/thirdparty/swappy-frame-pacing
|
|
|
|
- name: Compilation
|
|
uses: ./.github/actions/godot-build
|
|
with:
|
|
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
|
|
platform: android
|
|
target: ${{ matrix.target }}
|
|
tests: ${{ matrix.tests }}
|
|
|
|
- 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_release'
|
|
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
|
|
cd ../../..
|
|
ls -l bin/android_editor_builds/
|
|
|
|
- name: Upload artifact
|
|
uses: ./.github/actions/upload-artifact
|
|
with:
|
|
name: ${{ matrix.cache-name }}
|