[funexpected.spine] get deps from atlas content #431
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: build | |
on: [push] | |
# let's build everty time for now | |
# push: | |
# branches: | |
# # Push events on main branch | |
# - master | |
# - 'release/**' | |
env: | |
GODOT_BASE_BRANCH: 3.2 | |
SCONS_CACHE_MSVC_CONFIG: true | |
SCONS_CACHE_LIMIT: 4096 | |
ANDROID_NDK_VERSION: 21.4.7075529 | |
jobs: | |
build: | |
name: Build ${{ matrix.token }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: macos-13 | |
token: osx.editor | |
build: scons -j2 platform=osx tools=yes target=release_debug verbose=yes | |
- os: macos-13 | |
token: osx.editor.headless | |
build: scons -j2 platform=server tools=yes target=release_debug verbose=yes | |
- os: macos-13 | |
token: ios.release | |
build: | | |
mkdir iphone | |
scons p=iphone -j2 tools=no bits=64 target=release_debug arch=arm64 module_firebase_enabled=no module_websocket_enabled=no game_center=no debug_symbols=no separate_debug_symbols=yes | |
cp -R misc/dist/ios_xcode/ iphone/ | |
find bin | |
cp bin/libgodot.iphone.opt.debug.arm64.a iphone/libgodot.iphone.release.fat.a | |
zip -X -r ios.release.zip iphone | |
rm -rf bin/* | |
mv ios.release.zip bin/ | |
mkdir ios.headers | |
rsync -a -m -R --include '*/' --include '*.h' --include '*.inc' --exclude '*' --exclude '.git' --exclude 'bin' --exclude 'ios.headers' . ./ios.headers | |
zip -X -r ios.headers.zip ios.headers | |
mv ios.headers.zip bin/ | |
- os: ubuntu-20.04 | |
token: android.template.debug | |
build: | | |
scons platform=android -j 8 target=debug android_arch=arm64v8 tools=no module_firebase_enabled=no module_bullet_enabled=no module_websocket_enabled=no game_center=no builtin_pcre2_with_jit=no builtin_libvpx=no module_webm_enabled=no | |
scons platform=android -j 8 target=debug android_arch=x86_64 tools=no module_firebase_enabled=no module_bullet_enabled=no module_websocket_enabled=no game_center=no builtin_pcre2_with_jit=no builtin_libvpx=no module_webm_enabled=no | |
cd platform/android/java/ | |
./gradlew generateGodotTemplates | |
# Remove files that will not be needed for export | |
cd ../../.. | |
mv bin/android_source.zip bin/android_source.debug.zip | |
rm bin/android_debug.apk | |
rm bin/godot-lib.debug.aar | |
# copy unstripped binaries (for crashlytics) | |
cd platform/android/java/lib/libs/debug/ | |
zip -r android.native_libs.unstripped.debug.zip ./ | |
cd - | |
cp platform/android/java/lib/libs/debug/android.native_libs.unstripped.debug.zip bin | |
- os: ubuntu-20.04 | |
token: android.template.release | |
build: | | |
scons platform=android -j 8 target=release_debug android_arch=arm64v8 tools=no module_firebase_enabled=no module_bullet_enabled=no module_websocket_enabled=no game_center=no builtin_pcre2_with_jit=no builtin_libvpx=no module_webm_enabled=no | |
scons platform=android -j 8 target=release_debug android_arch=x86_64 tools=no module_firebase_enabled=no module_bullet_enabled=no module_websocket_enabled=no game_center=no builtin_pcre2_with_jit=no builtin_libvpx=no module_webm_enabled=no | |
scons platform=android -j 8 target=release_debug android_arch=armv7 tools=no module_firebase_enabled=no module_bullet_enabled=no module_websocket_enabled=no game_center=no builtin_pcre2_with_jit=no builtin_libvpx=no module_webm_enabled=no | |
cd platform/android/java/ | |
./gradlew generateGodotTemplates | |
# Remove files that will not be needed for export | |
cd ../../.. | |
mv bin/android_source.zip bin/android_source.release.zip | |
rm bin/android_release.apk | |
rm bin/godot-lib.release.aar | |
# copy unstripped binaries (for crashlytics) | |
cd platform/android/java/lib/libs/release/ | |
zip -r android.native_libs.unstripped.release.zip ./ | |
cd - | |
cp platform/android/java/lib/libs/release/android.native_libs.unstripped.release.zip bin | |
- os: ubuntu-20.04 | |
token: linux.editor.headless | |
build: | | |
scons target=release_debug platform=server tools=yes module_firebase_enabled=no module_bullet_enabled=no module_websocket_enabled=no game_center=no module_mono_enabled=no mono_glue=no | |
ls -l bin/ | |
steps: | |
- name: Checkout Engine | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
# - name: Install Rosetta dependencies | |
# if: ${{startsWith(matrix.os, 'macos')}} | |
# run: | | |
# softwareupdate --install-rosetta --agree-to-license | |
- name: Make apt sources.list use the default Ubuntu repositories | |
if: ${{matrix.os == 'ubuntu-20.04'}} | |
run: | | |
sudo rm -f /etc/apt/sources.list.d/* | |
sudo cp -f misc/ci/sources.list /etc/apt/sources.list | |
sudo apt-get update | |
- name: Set up Java 8 | |
if: ${{startsWith(matrix.token, 'android.template')}} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 11 | |
distribution: 'zulu' | |
- name: Setup Android SDK | |
if: ${{startsWith(matrix.token, 'android.template')}} | |
uses: android-actions/setup-android@v3 | |
with: | |
cmdline-tools-version: 6858069 | |
packages: "ndk;${{env.ANDROID_NDK_VERSION}}" | |
# - name: Install Android NDK r21 | |
# if: ${{startsWith(matrix.token, 'android.template')}} | |
# run: | | |
# sudo ls -lah ${ANDROID_HOME}/tools/bin/ | |
# sudo sdkmanager --install 'ndk;${{env.ANDROID_NDK_VERSION}}' | |
# Upload cache on completion and check it out now | |
- name: Load .scons_cache directory | |
uses: actions/cache@v2 | |
with: | |
path: .scons_cache | |
key: ${{matrix.token}}-${{github.ref}}-${{github.sha}} | |
restore-keys: | | |
${{matrix.token}}-${{github.ref}}-${{github.sha}} | |
${{matrix.token}}-${{github.ref}} | |
${{matrix.token}} | |
# Use python 3.x release (works cross platform; best to keep self contained in it's own step) | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v2 | |
with: | |
# Semantic version range syntax or exact version of a Python version | |
python-version: '3.11' | |
# Optional - x64 or x86 architecture, defaults to x64 | |
architecture: 'x64' | |
# Setup scons, print python version and scons version info, so if anything is broken it won't run the build. | |
- name: Configuring Python packages | |
run: | | |
python -c "import sys; print(sys.version)" | |
python -m pip install scons | |
python --version | |
scons --version | |
- name: Configure dependencies | |
if: ${{startsWith(matrix.token, 'linux')}} | |
run: | | |
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \ | |
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev libudev-dev libxi-dev libxrandr-dev yasm | |
- name: Compilation | |
env: | |
SCONS_CACHE: ${{github.workspace}}/.scons_cache/ | |
run: ${{ matrix.build }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.token }} | |
path: bin/* | |
archive: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
- name: Join artifacts | |
run: | | |
find . -type f -maxdepth 2 -mindepth 2 | |
mkdir fnx.godot | |
find . -type f -maxdepth 2 -mindepth 2 | xargs -I{} cp "{}" fnx.godot | |
find fnx.godot | |
- name: Prepare assets | |
run: | | |
zip -r fnx.godot.zip fnx.godot | |
- name: Calculate tag | |
id: vars | |
run: echo "::set-output name=sha_short::$(echo "${{github.sha}}" | cut -c 1-8)" | |
- name: Releasing godot.${{ steps.vars.outputs.sha_short }} | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
prerelease: ${{ contains(github.ref, 'release/') }} | |
tag_name: godot.${{ steps.vars.outputs.sha_short }} | |
release_name: Release godot.${{ steps.vars.outputs.sha_short }} (${{ github.ref }}) | |
body: | | |
ABOUT | |
===== | |
Automatic release of Godot Engine by Funexpected Team. | |
Some day there will be useful info here, for now it is used only for storing some info for | |
future API calls in `SPECS` section. | |
SPECS | |
===== | |
run.id: ${{ github.run_id }} | |
draft: false | |
- name: Upload Release | |
id: upload-release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
asset_path: ./fnx.godot.zip | |
asset_name: fnx.godot.zip | |
asset_content_type: application/zip | |