Merge pull request #35 from Atlinx/fix/_android-build
Fix android builds, improved flexibility of matrix builds, fix artifact uploadpull/32/merge
commit
9074766ffe
|
@ -28,19 +28,32 @@ runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
# Android only
|
# Android only
|
||||||
- name: Android - Set up Java 11
|
- name: Android - Set up Java 17
|
||||||
uses: actions/setup-java@v3
|
uses: actions/setup-java@v4
|
||||||
if: ${{ inputs.platform == 'android' }}
|
if: ${{ inputs.platform == 'android' }}
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 11
|
java-version: 17
|
||||||
|
|
||||||
- name: Android - dependencies
|
- name: Android - Remove existing Android SDK, and set up ENV vars
|
||||||
uses: nttld/setup-ndk@v1
|
|
||||||
if: ${{ inputs.platform == 'android' }}
|
if: ${{ inputs.platform == 'android' }}
|
||||||
|
shell: sh
|
||||||
|
run: |
|
||||||
|
sudo rm -r /usr/local/lib/android/sdk/**
|
||||||
|
export ANDROID_HOME=/usr/local/lib/android/sdk
|
||||||
|
export ANDROID_SDK_ROOT=$ANDROID_HOME
|
||||||
|
export ANDROID_NDK_VERSION=23.2.8568313
|
||||||
|
export ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk/${ANDROID_NDK_VERSION}
|
||||||
|
echo "ANDROID_HOME=$ANDROID_HOME" >> "$GITHUB_ENV"
|
||||||
|
echo "ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" >> "$GITHUB_ENV"
|
||||||
|
echo "ANDROID_NDK_VERSION=$ANDROID_NDK_VERSION" >> "$GITHUB_ENV"
|
||||||
|
echo "ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: Android - Set up Android SDK
|
||||||
|
if: ${{ inputs.platform == 'android' }}
|
||||||
|
uses: android-actions/setup-android@v3
|
||||||
with:
|
with:
|
||||||
ndk-version: r23c
|
packages: "ndk;${{ env.ANDROID_NDK_VERSION }} cmdline-tools;latest build-tools;34.0.0 platforms;android-34 cmake;3.22.1"
|
||||||
link-to-sdk: true
|
|
||||||
# Linux only
|
# Linux only
|
||||||
- name: Linux - dependencies
|
- name: Linux - dependencies
|
||||||
if: ${{ inputs.platform == 'linux' }}
|
if: ${{ inputs.platform == 'linux' }}
|
||||||
|
@ -69,7 +82,7 @@ runs:
|
||||||
# Dependencies of godot
|
# Dependencies of godot
|
||||||
# Use python 3.x release (works cross platform)
|
# Use python 3.x release (works cross platform)
|
||||||
- name: Set up Python 3.x
|
- name: Set up Python 3.x
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
# Semantic version range syntax or exact version of a Python version
|
# Semantic version range syntax or exact version of a Python version
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
|
@ -83,7 +96,7 @@ runs:
|
||||||
scons --version
|
scons --version
|
||||||
# Build
|
# Build
|
||||||
- name: Cache .scons_cache
|
- name: Cache .scons_cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
${{ github.workspace }}/${{ inputs.gdextension-location }}/${{ inputs.scons-cache }}/
|
${{ github.workspace }}/${{ inputs.gdextension-location }}/${{ inputs.scons-cache }}/
|
||||||
|
|
|
@ -12,94 +12,258 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
# Debug templates
|
||||||
- platform: linux
|
- platform: linux
|
||||||
float-precision: single
|
float-precision: single
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
os: ubuntu-20.04
|
target-type: template_debug
|
||||||
- platform: windows
|
|
||||||
float-precision: single
|
|
||||||
arch: x86_32
|
|
||||||
os: windows-latest
|
|
||||||
- platform: windows
|
|
||||||
float-precision: single
|
|
||||||
arch: x86_64
|
|
||||||
os: windows-latest
|
|
||||||
- platform: macos
|
|
||||||
float-precision: single
|
|
||||||
arch: universal
|
|
||||||
os: macos-latest
|
|
||||||
- platform: android
|
|
||||||
float-precision: single
|
|
||||||
arch: arm64
|
|
||||||
os: ubuntu-20.04
|
|
||||||
- platform: android
|
|
||||||
float-precision: single
|
|
||||||
arch: arm32
|
|
||||||
os: ubuntu-20.04
|
|
||||||
- platform: android
|
|
||||||
float-precision: single
|
|
||||||
arch: x86_64
|
|
||||||
os: ubuntu-20.04
|
|
||||||
- platform: android
|
|
||||||
float-precision: single
|
|
||||||
arch: x86_32
|
|
||||||
os: ubuntu-20.04
|
|
||||||
- platform: ios
|
|
||||||
float-precision: single
|
|
||||||
arch: arm64
|
|
||||||
os: macos-latest
|
|
||||||
- platform: web
|
|
||||||
float-precision: single
|
|
||||||
arch: wasm32
|
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
|
- platform: windows
|
||||||
|
float-precision: single
|
||||||
|
arch: x86_32
|
||||||
|
target-type: template_debug
|
||||||
|
os: windows-latest
|
||||||
|
|
||||||
|
- platform: windows
|
||||||
|
float-precision: single
|
||||||
|
arch: x86_64
|
||||||
|
target-type: template_debug
|
||||||
|
os: windows-latest
|
||||||
|
|
||||||
|
- platform: macos
|
||||||
|
float-precision: single
|
||||||
|
arch: universal
|
||||||
|
target-type: template_debug
|
||||||
|
os: macos-latest
|
||||||
|
|
||||||
|
- platform: android
|
||||||
|
float-precision: single
|
||||||
|
arch: arm64
|
||||||
|
target-type: template_debug
|
||||||
|
os: ubuntu-20.04
|
||||||
|
|
||||||
|
- platform: android
|
||||||
|
float-precision: single
|
||||||
|
arch: arm32
|
||||||
|
target-type: template_debug
|
||||||
|
os: ubuntu-20.04
|
||||||
|
|
||||||
|
- platform: android
|
||||||
|
float-precision: single
|
||||||
|
arch: x86_64
|
||||||
|
target-type: template_debug
|
||||||
|
os: ubuntu-20.04
|
||||||
|
|
||||||
|
- platform: android
|
||||||
|
float-precision: single
|
||||||
|
arch: x86_32
|
||||||
|
target-type: template_debug
|
||||||
|
os: ubuntu-20.04
|
||||||
|
|
||||||
|
- platform: ios
|
||||||
|
float-precision: single
|
||||||
|
arch: arm64
|
||||||
|
target-type: template_debug
|
||||||
|
os: macos-latest
|
||||||
|
|
||||||
|
- platform: web
|
||||||
|
float-precision: single
|
||||||
|
arch: wasm32
|
||||||
|
target-type: template_debug
|
||||||
|
os: ubuntu-20.04
|
||||||
|
|
||||||
|
# Release templates
|
||||||
|
- platform: linux
|
||||||
|
float-precision: single
|
||||||
|
arch: x86_64
|
||||||
|
target-type: template_release
|
||||||
|
os: ubuntu-20.04
|
||||||
|
|
||||||
|
# - platform: windows
|
||||||
|
# float-precision: single
|
||||||
|
# arch: x86_32
|
||||||
|
# target-type: template_release
|
||||||
|
# os: windows-latest
|
||||||
|
|
||||||
|
# - platform: windows
|
||||||
|
# float-precision: single
|
||||||
|
# arch: x86_64
|
||||||
|
# target-type: template_release
|
||||||
|
# os: windows-latest
|
||||||
|
|
||||||
|
# - platform: macos
|
||||||
|
# float-precision: single
|
||||||
|
# arch: universal
|
||||||
|
# target-type: template_release
|
||||||
|
# os: macos-latest
|
||||||
|
|
||||||
|
# - platform: android
|
||||||
|
# float-precision: single
|
||||||
|
# arch: arm64
|
||||||
|
# target-type: template_release
|
||||||
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
|
# - platform: android
|
||||||
|
# float-precision: single
|
||||||
|
# arch: arm32
|
||||||
|
# target-type: template_release
|
||||||
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
|
# - platform: android
|
||||||
|
# float-precision: single
|
||||||
|
# arch: x86_64
|
||||||
|
# target-type: template_release
|
||||||
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
|
# - platform: android
|
||||||
|
# float-precision: single
|
||||||
|
# arch: x86_32
|
||||||
|
# target-type: template_release
|
||||||
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
|
# - platform: ios
|
||||||
|
# float-precision: single
|
||||||
|
# arch: arm64
|
||||||
|
# target-type: template_release
|
||||||
|
# os: macos-latest
|
||||||
|
|
||||||
|
# - platform: web
|
||||||
|
# float-precision: single
|
||||||
|
# arch: wasm32
|
||||||
|
# target-type: template_release
|
||||||
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
|
# Double precision templates
|
||||||
|
# Double precision debug templates
|
||||||
- platform: linux
|
- platform: linux
|
||||||
float-precision: double
|
float-precision: double
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
|
target-type: template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: windows
|
- platform: windows
|
||||||
float-precision: double
|
float-precision: double
|
||||||
arch: x86_32
|
arch: x86_32
|
||||||
|
target-type: template_debug
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
||||||
- platform: windows
|
- platform: windows
|
||||||
float-precision: double
|
float-precision: double
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
|
target-type: template_debug
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
|
|
||||||
- platform: macos
|
- platform: macos
|
||||||
float-precision: double
|
float-precision: double
|
||||||
arch: universal
|
arch: universal
|
||||||
|
target-type: template_debug
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
|
|
||||||
- platform: android
|
- platform: android
|
||||||
float-precision: double
|
float-precision: double
|
||||||
arch: arm64
|
arch: arm64
|
||||||
|
target-type: template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: android
|
- platform: android
|
||||||
float-precision: double
|
float-precision: double
|
||||||
arch: arm32
|
arch: arm32
|
||||||
|
target-type: template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: android
|
- platform: android
|
||||||
float-precision: double
|
float-precision: double
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
|
target-type: template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: android
|
- platform: android
|
||||||
float-precision: double
|
float-precision: double
|
||||||
arch: x86_32
|
arch: x86_32
|
||||||
|
target-type: template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
- platform: ios
|
- platform: ios
|
||||||
float-precision: double
|
float-precision: double
|
||||||
arch: arm64
|
arch: arm64
|
||||||
|
target-type: template_debug
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
|
|
||||||
- platform: web
|
- platform: web
|
||||||
float-precision: double
|
float-precision: double
|
||||||
arch: wasm32
|
arch: wasm32
|
||||||
|
target-type: template_debug
|
||||||
os: ubuntu-20.04
|
os: ubuntu-20.04
|
||||||
|
|
||||||
|
# Double precision release templates
|
||||||
|
- platform: linux
|
||||||
|
float-precision: double
|
||||||
|
arch: x86_64
|
||||||
|
target-type: template_release
|
||||||
|
os: ubuntu-20.04
|
||||||
|
|
||||||
|
# - platform: windows
|
||||||
|
# float-precision: double
|
||||||
|
# arch: x86_32
|
||||||
|
# target-type: template_release
|
||||||
|
# os: windows-latest
|
||||||
|
|
||||||
|
# - platform: windows
|
||||||
|
# float-precision: double
|
||||||
|
# arch: x86_64
|
||||||
|
# target-type: template_release
|
||||||
|
# os: windows-latest
|
||||||
|
|
||||||
|
# - platform: macos
|
||||||
|
# float-precision: double
|
||||||
|
# arch: universal
|
||||||
|
# target-type: template_release
|
||||||
|
# os: macos-latest
|
||||||
|
|
||||||
|
# - platform: android
|
||||||
|
# float-precision: double
|
||||||
|
# arch: arm64
|
||||||
|
# target-type: template_release
|
||||||
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
|
# - platform: android
|
||||||
|
# float-precision: double
|
||||||
|
# arch: arm32
|
||||||
|
# target-type: template_release
|
||||||
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
|
# - platform: android
|
||||||
|
# float-precision: double
|
||||||
|
# arch: x86_64
|
||||||
|
# target-type: template_release
|
||||||
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
|
# - platform: android
|
||||||
|
# float-precision: double
|
||||||
|
# arch: x86_32
|
||||||
|
# target-type: template_release
|
||||||
|
# os: ubuntu-20.04
|
||||||
|
|
||||||
|
# - platform: ios
|
||||||
|
# float-precision: double
|
||||||
|
# arch: arm64
|
||||||
|
# target-type: template_release
|
||||||
|
# os: macos-latest
|
||||||
|
|
||||||
|
# - platform: web
|
||||||
|
# float-precision: double
|
||||||
|
# arch: wasm32
|
||||||
|
# target-type: template_release
|
||||||
|
# os: ubuntu-20.04
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# Lint
|
# Lint
|
||||||
#- name: Setup clang-format
|
#- name: Setup clang-format
|
||||||
# shell: bash
|
# shell: bash
|
||||||
|
@ -109,14 +273,16 @@ jobs:
|
||||||
# shell: bash
|
# shell: bash
|
||||||
# run: |
|
# run: |
|
||||||
# clang-format src/** --dry-run --Werror
|
# clang-format src/** --dry-run --Werror
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
- name: 🔗 GDExtension Build
|
- name: 🔗 GDExtension Debug Build
|
||||||
uses: ./.github/actions/build
|
uses: ./.github/actions/build
|
||||||
with:
|
with:
|
||||||
platform: ${{ matrix.platform }}
|
platform: ${{ matrix.platform }}
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
float-precision: ${{ matrix.float-precision }}
|
float-precision: ${{ matrix.float-precision }}
|
||||||
build-target-type: template_release
|
build-target-type: ${{ matrix.target-type }}
|
||||||
|
|
||||||
# Sign
|
# Sign
|
||||||
- name: Mac Sign
|
- name: Mac Sign
|
||||||
# Disable sign if secrets are not set
|
# Disable sign if secrets are not set
|
||||||
|
@ -139,8 +305,21 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
|
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: godot-cpp-template
|
name: godot-cpp-template-${{ matrix.platform }}-${{ matrix.arch }}-${{ matrix.float-precision }}-${{ matrix.target-type }}
|
||||||
path: |
|
path: |
|
||||||
${{ github.workspace }}/bin/**
|
${{ github.workspace }}/bin/**
|
||||||
|
|
||||||
|
# Merges all the build artifacts together into a single godot-cpp-template artifact.
|
||||||
|
# If you comment out this step, all the builds will be uploaded individually.
|
||||||
|
merge:
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
needs: build
|
||||||
|
steps:
|
||||||
|
- name: Merge Artifacts
|
||||||
|
uses: actions/upload-artifact/merge@v4
|
||||||
|
with:
|
||||||
|
name: godot-cpp-template
|
||||||
|
pattern: godot-cpp-template-*
|
||||||
|
delete-merged: true
|
||||||
|
|
Loading…
Reference in New Issue