Skip to content

Commit ded6777

Browse files
zw7u9truzw7u9tru
andauthored
fix build for 3.4 (#119)
* update readme Co-authored-by: zw7u9tru <zw7u9tru@github>
1 parent be843a7 commit ded6777

26 files changed

+1122
-552
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build Godot
2+
description: Build Godot with the provided options.
3+
inputs:
4+
target:
5+
description: The scons target (debug/release_debug/release).
6+
default: debug
7+
tools:
8+
description: If tools are to be built.
9+
default: false
10+
tests:
11+
description: If tests are to be built.
12+
default: false
13+
platform:
14+
description: The Godot platform to build.
15+
required: false
16+
sconsflags:
17+
default: ''
18+
scons-cache:
19+
description: The scons cache path.
20+
default: ${{ github.workspace }}/.scons-cache/
21+
scons-cache-limit:
22+
description: The scons cache size limit.
23+
default: 4096
24+
shell:
25+
description: the shell to run this under
26+
default: sh
27+
runs:
28+
using: composite
29+
steps:
30+
- name: Scons Build
31+
shell: sh
32+
env:
33+
SCONSFLAGS: ${{ inputs.sconsflags }}
34+
SCONS_CACHE: ${{ inputs.scons-cache }}
35+
SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
36+
run: |
37+
echo "Building with flags:" ${{ env.SCONSFLAGS }}
38+
scons p=${{ inputs.platform }} target=${{ inputs.target }} tools=${{ inputs.tools }} tests=${{ inputs.tests }} --jobs=2 ${{ env.SCONSFLAGS }}
39+
ls -l bin/
40+
if: inputs.shell == 'sh'
41+
- name: Scons Build
42+
shell: msys2 {0}
43+
env:
44+
SCONSFLAGS: ${{ inputs.sconsflags }}
45+
SCONS_CACHE: ${{ inputs.scons-cache }}
46+
SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
47+
run: |
48+
echo "Building with flags:" ${{ env.SCONSFLAGS }}
49+
scons p=${{ inputs.platform }} target=${{ inputs.target }} tools=${{ inputs.tools }} tests=${{ inputs.tests }} --jobs=2 ${{ env.SCONSFLAGS }}
50+
ls -l bin/
51+
if: inputs.shell == 'msys2 {0}'
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Setup Godot build cache
2+
description: Setup Godot build cache.
3+
inputs:
4+
cache-name:
5+
description: The cache base name (job name by default).
6+
default: ${{github.job}}
7+
scons-cache:
8+
description: The scons cache path.
9+
default: ${{github.workspace}}/.scons-cache/
10+
runs:
11+
using: composite
12+
steps:
13+
- name: Load .scons_cache directory
14+
uses: actions/cache@v2
15+
with:
16+
path: ${{inputs.scons-cache}}
17+
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
18+
restore-keys: |
19+
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
20+
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
21+
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}

.github/actions/godot-deps/action.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Setup python and scons
2+
description: Setup python, install the pip version of scons.
3+
inputs:
4+
python-version:
5+
description: The python version to use.
6+
default: 3.x
7+
python-arch:
8+
description: The python architecture.
9+
default: x64
10+
shell:
11+
description: the shell to run this under
12+
default: sh
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Set up Python 3.x
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: ${{ inputs.python-version }}
20+
architecture: ${{ inputs.python-arch }}
21+
- name: Setup scons
22+
shell: sh
23+
run: |
24+
python -c "import sys; print(sys.version)"
25+
python -m pip install scons
26+
scons --version
27+
if: inputs.shell == 'sh'
28+
- name: Setup scons
29+
shell: msys2 {0}
30+
run: |
31+
python -c "import sys; print(sys.version)"
32+
python -m pip install scons
33+
scons --version
34+
if: inputs.shell == 'msys2 {0}'
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Upload Godot artifact
2+
description: Upload the Godot artifact.
3+
inputs:
4+
name:
5+
description: The artifact name.
6+
default: ${{ github.job }}
7+
path:
8+
description: The path to upload.
9+
required: true
10+
default: bin/*
11+
runs:
12+
using: composite
13+
steps:
14+
- name: Upload Godot Artifact
15+
uses: actions/upload-artifact@v2
16+
with:
17+
name: ${{ inputs.name }}
18+
path: ${{ inputs.path }}
19+
retention-days: 14

.github/workflows/android_builds.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: 🤖 Android Builds
2+
'on':
3+
- push
4+
- pull_request
5+
env:
6+
GODOT_BASE_BRANCH: 3.4.4-stable
7+
SCONSFLAGS: ' verbose=yes debug_symbols=no'
8+
concurrency:
9+
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-android
10+
cancel-in-progress: true
11+
jobs:
12+
android-template:
13+
runs-on: ubuntu-20.04
14+
name: Template (target=release, tools=no)
15+
steps:
16+
- name: Checkout Godot
17+
uses: actions/checkout@v2
18+
with:
19+
repository: godotengine/godot
20+
ref: ${{ env.GODOT_BASE_BRANCH }}
21+
- name: Checkout ECMAScript
22+
uses: actions/checkout@v2
23+
with:
24+
path: ${{github.workspace}}/modules/ECMAScript/
25+
- name: Make apt sources.list use the default Ubuntu repositories
26+
run: |
27+
sudo rm -f /etc/apt/sources.list.d/*
28+
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
29+
sudo apt-get update
30+
- name: Set up Java 11
31+
uses: actions/setup-java@v1
32+
with:
33+
java-version: 11
34+
- name: Setup Godot build cache
35+
uses: ./.github/actions/godot-cache
36+
continue-on-error: true
37+
- name: Setup python and scons
38+
uses: ./modules/ECMAScript/.github/actions/godot-deps
39+
with:
40+
shell: sh
41+
- name: Compilation (armv7)
42+
uses: ./modules/ECMAScript/.github/actions/godot-build
43+
with:
44+
sconsflags: ${{ env.SCONSFLAGS }} android_arch=armv7
45+
platform: android
46+
target: release
47+
tools: false
48+
shell: sh
49+
- name: Compilation (arm64v8)
50+
uses: ./modules/ECMAScript/.github/actions/godot-build
51+
with:
52+
sconsflags: ${{ env.SCONSFLAGS }} android_arch=arm64v8
53+
platform: android
54+
target: release
55+
tools: false
56+
shell: sh
57+
- name: Generate Godot templates
58+
run: |
59+
cd platform/android/java
60+
./gradlew generateGodotTemplates
61+
cd ../../..
62+
ls -l bin/
63+
- name: Upload artifact
64+
uses: ./.github/actions/upload-artifact

0 commit comments

Comments
 (0)