Skip to content

Commit

Permalink
fix build for 3.4 (#119)
Browse files Browse the repository at this point in the history
* update readme
Co-authored-by: zw7u9tru <zw7u9tru@github>
  • Loading branch information
zw7u9tru authored Apr 9, 2022
1 parent be843a7 commit ded6777
Show file tree
Hide file tree
Showing 26 changed files with 1,122 additions and 552 deletions.
51 changes: 51 additions & 0 deletions .github/actions/godot-build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build Godot
description: Build Godot with the provided options.
inputs:
target:
description: The scons target (debug/release_debug/release).
default: debug
tools:
description: If tools are to be built.
default: false
tests:
description: If tests are to be built.
default: false
platform:
description: The Godot platform to build.
required: false
sconsflags:
default: ''
scons-cache:
description: The scons cache path.
default: ${{ github.workspace }}/.scons-cache/
scons-cache-limit:
description: The scons cache size limit.
default: 4096
shell:
description: the shell to run this under
default: sh
runs:
using: composite
steps:
- name: Scons Build
shell: sh
env:
SCONSFLAGS: ${{ inputs.sconsflags }}
SCONS_CACHE: ${{ inputs.scons-cache }}
SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
run: |
echo "Building with flags:" ${{ env.SCONSFLAGS }}
scons p=${{ inputs.platform }} target=${{ inputs.target }} tools=${{ inputs.tools }} tests=${{ inputs.tests }} --jobs=2 ${{ env.SCONSFLAGS }}
ls -l bin/
if: inputs.shell == 'sh'
- name: Scons Build
shell: msys2 {0}
env:
SCONSFLAGS: ${{ inputs.sconsflags }}
SCONS_CACHE: ${{ inputs.scons-cache }}
SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
run: |
echo "Building with flags:" ${{ env.SCONSFLAGS }}
scons p=${{ inputs.platform }} target=${{ inputs.target }} tools=${{ inputs.tools }} tests=${{ inputs.tests }} --jobs=2 ${{ env.SCONSFLAGS }}
ls -l bin/
if: inputs.shell == 'msys2 {0}'
21 changes: 21 additions & 0 deletions .github/actions/godot-cache/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Setup Godot build cache
description: Setup Godot build cache.
inputs:
cache-name:
description: The cache base name (job name by default).
default: ${{github.job}}
scons-cache:
description: The scons cache path.
default: ${{github.workspace}}/.scons-cache/
runs:
using: composite
steps:
- name: Load .scons_cache directory
uses: actions/cache@v2
with:
path: ${{inputs.scons-cache}}
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
restore-keys: |
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}
34 changes: 34 additions & 0 deletions .github/actions/godot-deps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Setup python and scons
description: Setup python, install the pip version of scons.
inputs:
python-version:
description: The python version to use.
default: 3.x
python-arch:
description: The python architecture.
default: x64
shell:
description: the shell to run this under
default: sh
runs:
using: composite
steps:
- name: Set up Python 3.x
uses: actions/setup-python@v2
with:
python-version: ${{ inputs.python-version }}
architecture: ${{ inputs.python-arch }}
- name: Setup scons
shell: sh
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons
scons --version
if: inputs.shell == 'sh'
- name: Setup scons
shell: msys2 {0}
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons
scons --version
if: inputs.shell == 'msys2 {0}'
19 changes: 19 additions & 0 deletions .github/actions/upload-artifact/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Upload Godot artifact
description: Upload the Godot artifact.
inputs:
name:
description: The artifact name.
default: ${{ github.job }}
path:
description: The path to upload.
required: true
default: bin/*
runs:
using: composite
steps:
- name: Upload Godot Artifact
uses: actions/upload-artifact@v2
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}
retention-days: 14
64 changes: 64 additions & 0 deletions .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: 🤖 Android Builds
'on':
- push
- pull_request
env:
GODOT_BASE_BRANCH: 3.4.4-stable
SCONSFLAGS: ' verbose=yes debug_symbols=no'
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-android
cancel-in-progress: true
jobs:
android-template:
runs-on: ubuntu-20.04
name: Template (target=release, tools=no)
steps:
- name: Checkout Godot
uses: actions/checkout@v2
with:
repository: godotengine/godot
ref: ${{ env.GODOT_BASE_BRANCH }}
- name: Checkout ECMAScript
uses: actions/checkout@v2
with:
path: ${{github.workspace}}/modules/ECMAScript/
- name: Make apt sources.list use the default Ubuntu repositories
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 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
continue-on-error: true
- name: Setup python and scons
uses: ./modules/ECMAScript/.github/actions/godot-deps
with:
shell: sh
- name: Compilation (armv7)
uses: ./modules/ECMAScript/.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} android_arch=armv7
platform: android
target: release
tools: false
shell: sh
- name: Compilation (arm64v8)
uses: ./modules/ECMAScript/.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} android_arch=arm64v8
platform: android
target: release
tools: false
shell: sh
- name: Generate Godot templates
run: |
cd platform/android/java
./gradlew generateGodotTemplates
cd ../../..
ls -l bin/
- name: Upload artifact
uses: ./.github/actions/upload-artifact
Loading

0 comments on commit ded6777

Please sign in to comment.