2023-08-01 08:25:13 +00:00
|
|
|
name: 🤖 Android builds
|
|
|
|
on:
|
|
|
|
workflow_call:
|
|
|
|
inputs:
|
2023-08-01 16:06:19 +00:00
|
|
|
godot-treeish:
|
2023-08-01 08:25:13 +00:00
|
|
|
description: A tag, branch or commit hash in the Godot repository.
|
|
|
|
type: string
|
|
|
|
default: master
|
2023-08-01 16:06:19 +00:00
|
|
|
limboai-treeish:
|
2023-08-01 08:25:13 +00:00
|
|
|
description: A tag, branch or commit hash in the LimboAI repository.
|
|
|
|
type: string
|
|
|
|
default: master
|
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
2023-08-01 16:06:19 +00:00
|
|
|
godot-treeish:
|
2023-08-01 08:25:13 +00:00
|
|
|
description: A tag, branch or commit hash in the Godot repository.
|
|
|
|
type: string
|
|
|
|
default: master
|
2023-08-01 16:06:19 +00:00
|
|
|
limboai-treeish:
|
2023-08-01 08:25:13 +00:00
|
|
|
description: A tag, branch or commit hash in the LimboAI repository.
|
|
|
|
type: string
|
|
|
|
default: master
|
|
|
|
|
|
|
|
# Global Settings
|
|
|
|
env:
|
|
|
|
SCONS_CACHE_LIMIT: 4096
|
|
|
|
SCONSFLAGS: production=yes tests=no verbose=yes warnings=extra werror=yes
|
|
|
|
DOTNET_NOLOGO: true
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
android-builds:
|
|
|
|
runs-on: "ubuntu-20.04"
|
|
|
|
name: ${{ matrix.name }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- name: Template (arm64, debug)
|
|
|
|
arch: arm64
|
|
|
|
target: template_debug
|
|
|
|
|
|
|
|
- name: Template (arm64, release)
|
|
|
|
arch: arm64
|
|
|
|
target: template_release
|
|
|
|
|
|
|
|
- name: Template (arm32, debug)
|
|
|
|
arch: arm32
|
|
|
|
target: template_debug
|
|
|
|
|
|
|
|
- name: Template (arm32, release)
|
|
|
|
arch: arm32
|
|
|
|
target: template_release
|
|
|
|
|
|
|
|
- name: Template (x86_64, debug)
|
|
|
|
arch: x86_64
|
|
|
|
target: template_debug
|
|
|
|
|
|
|
|
- name: Template (x86_64, release)
|
|
|
|
arch: x86_64
|
|
|
|
target: template_release
|
|
|
|
|
|
|
|
- name: Template (x86_32, debug)
|
|
|
|
arch: x86_32
|
|
|
|
target: template_debug
|
|
|
|
|
|
|
|
- name: Template (x86_32, release)
|
|
|
|
arch: x86_32
|
|
|
|
target: template_release
|
|
|
|
|
|
|
|
env:
|
|
|
|
BIN: godot.linuxbsd.${{matrix.target}}.${{matrix.arch}} #${{ matrix.build-mono == true && '.mono' || '' }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Clone Godot
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: godotengine/godot
|
2023-08-01 16:06:19 +00:00
|
|
|
ref: ${{ inputs.godot-treeish }}
|
2023-08-01 08:25:13 +00:00
|
|
|
|
|
|
|
- name: Clone LimboAI module
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
path: modules/limboai
|
2023-08-01 16:06:19 +00:00
|
|
|
ref: ${{ inputs.limboai-treeish }}
|
2023-08-01 08:25:13 +00:00
|
|
|
|
2023-08-02 18:51:22 +00:00
|
|
|
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
|
|
|
|
- uses: ./modules/limboai/.github/actions/init-version
|
|
|
|
|
2023-11-02 09:34:23 +00:00
|
|
|
- name: Set up Java 17
|
2023-08-01 08:25:13 +00:00
|
|
|
uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
distribution: temurin
|
2023-11-02 09:34:23 +00:00
|
|
|
java-version: 17
|
2023-08-01 08:25:13 +00:00
|
|
|
|
2023-08-01 15:31:53 +00:00
|
|
|
- name: Set up scons
|
|
|
|
run: |
|
|
|
|
python -c "import sys; print(sys.version)"
|
|
|
|
python -m pip install scons==4.4.0
|
|
|
|
python --version
|
|
|
|
scons --version
|
|
|
|
|
|
|
|
- name: Set up scons cache
|
2023-08-01 08:25:13 +00:00
|
|
|
uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: ${{github.workspace}}/.scons_cache/
|
2023-09-13 08:50:53 +00:00
|
|
|
key: ${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}}
|
2023-08-01 08:25:13 +00:00
|
|
|
restore-keys: |
|
2023-09-13 08:50:53 +00:00
|
|
|
${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}-${{env.LIMBOAI_VERSION}}
|
|
|
|
${{env.BIN}}-${{inputs.godot-treeish}}-${{inputs.limboai-treeish}}
|
|
|
|
${{env.BIN}}-${{inputs.godot-treeish}}
|
2023-08-01 08:25:13 +00:00
|
|
|
|
|
|
|
- name: Compilation
|
|
|
|
env:
|
|
|
|
SCONS_CACHE: ${{github.workspace}}/.scons_cache/
|
|
|
|
run: |
|
|
|
|
scons platform=android target=${{matrix.target}} arch=${{matrix.arch}} ${{env.SCONSFLAGS}}
|
|
|
|
ls platform/android/java/lib/libs/*
|
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: android-templates
|
|
|
|
path: platform/android/java/lib/libs/*
|
|
|
|
|
|
|
|
|
|
|
|
make-android-package:
|
|
|
|
runs-on: "ubuntu-20.04"
|
|
|
|
name: Make Android package
|
|
|
|
needs: android-builds
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Clone Godot
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
repository: godotengine/godot
|
2023-08-01 16:06:19 +00:00
|
|
|
ref: ${{ inputs.godot-treeish }}
|
2023-08-01 08:25:13 +00:00
|
|
|
|
2023-08-02 16:50:17 +00:00
|
|
|
- name: Clone LimboAI module
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
path: modules/limboai
|
|
|
|
ref: ${{ inputs.limboai-treeish }}
|
|
|
|
|
|
|
|
# Inits GODOT_VERSION, LIMBOAI_VERSION and NAME_PREFIX environment variables.
|
|
|
|
- uses: ./modules/limboai/.github/actions/init-version
|
|
|
|
|
2023-08-01 10:47:53 +00:00
|
|
|
- name: Download Android template builds
|
2023-08-01 08:25:13 +00:00
|
|
|
uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: android-templates
|
|
|
|
path: platform/android/java/lib/libs/
|
|
|
|
|
2023-11-02 09:34:23 +00:00
|
|
|
- name: Set up Java 17
|
2023-08-01 08:25:13 +00:00
|
|
|
uses: actions/setup-java@v3
|
|
|
|
with:
|
|
|
|
distribution: temurin
|
2023-11-02 09:34:23 +00:00
|
|
|
java-version: 17
|
2023-08-01 08:25:13 +00:00
|
|
|
|
|
|
|
- name: Set up Python 3.x
|
|
|
|
uses: actions/setup-python@v4
|
|
|
|
with:
|
|
|
|
python-version: 3.x
|
|
|
|
architecture: x64
|
|
|
|
|
2023-08-01 15:31:53 +00:00
|
|
|
- name: Set up scons
|
2023-08-01 08:25:13 +00:00
|
|
|
run: |
|
|
|
|
python -c "import sys; print(sys.version)"
|
|
|
|
python -m pip install scons==4.4.0
|
|
|
|
python --version
|
|
|
|
scons --version
|
|
|
|
|
|
|
|
- name: Generate Godot templates
|
|
|
|
run: |
|
|
|
|
cd platform/android/java
|
|
|
|
./gradlew generateGodotTemplates
|
|
|
|
cd ../../..
|
|
|
|
ls -l bin/
|
|
|
|
|
|
|
|
mkdir -p out/templates/
|
|
|
|
mv bin/android_* out/templates/
|
|
|
|
ls -l out/*
|
|
|
|
|
2023-08-01 15:31:53 +00:00
|
|
|
- name: Delete Android template builds
|
|
|
|
uses: geekyeggo/delete-artifact@v2
|
2023-08-01 08:25:13 +00:00
|
|
|
with:
|
|
|
|
name: android-templates
|
|
|
|
failOnError: false
|
|
|
|
|
2023-08-01 10:47:53 +00:00
|
|
|
- name: Upload Android libs
|
2023-08-01 08:25:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-08-01 16:06:19 +00:00
|
|
|
name: ${{env.NAME_PREFIX}}.android-lib
|
2023-08-01 08:25:13 +00:00
|
|
|
path: bin/godot-lib.*
|
|
|
|
|
2023-08-01 10:47:53 +00:00
|
|
|
- name: Upload Android templates
|
2023-08-01 08:25:13 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
2023-08-01 16:06:19 +00:00
|
|
|
name: ${{env.NAME_PREFIX}}.export-templates
|
2023-08-01 08:25:13 +00:00
|
|
|
path: out/*
|