Skip to content

Commit

Permalink
Port to godot 4.0
Browse files Browse the repository at this point in the history
Fix compile error for godot 4.0

Fix reference object constructor

Improve RefCounted binding
[ci skip]

Rename ECMAScript to JavaScript for godot 4

Fix compile error with non-editor build

Implement JavaScriptCallable for Signal & slot

Implement script workflow
Godot call javascript is working
[ci skip]

fix typo

[FIX] Failsafe env["TOOLS"] variable getter

[FIX] Fixed missing comma

[FIX] Adds GDNative to GDExtension migration changes

[FIX] Adds missing get_global_name method

Updated JavaScript modules for Godot 4.0 branch
The commits address various issues, such as non-existent files, editor targets, module usage, and compilation errors. The messages also show an effort to align the project's GitHub actions with the main Godot repository and tackle platform-specific problems. Some commits address challenges related to advanced Linux builds and temporarily disable the "-werror" flag due to issues with QuickJS.

Run ./misc/scripts/file_format.sh

Move quickjs to thirdparty.

Update for head guards.

Run black format.

Run ./misc/scripts/mypy_check.sh.

Disable a unit test.

Fix compile errors.

Run `./misc/scripts/clang_format.sh`.

Resource api changed.

Avoid warnings as errors with shadowing.

Missed an override.
  • Loading branch information
fire committed Apr 26, 2023
1 parent 1e473b6 commit 75e6e79
Show file tree
Hide file tree
Showing 69 changed files with 5,808 additions and 5,136 deletions.
12 changes: 7 additions & 5 deletions .github/actions/godot-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Build Godot
description: Build Godot with the provided options.
inputs:
target:
description: The scons target (debug/release_debug/release).
default: debug
description: The scons target (debug/editor/release).
default: editor
tools:
description: If tools are to be built.
default: false
Expand All @@ -20,7 +20,7 @@ inputs:
default: ${{ github.workspace }}/.scons-cache/
scons-cache-limit:
description: The scons cache size limit.
default: 4096
default: 7168
shell:
description: the shell to run this under
default: sh
Expand All @@ -35,7 +35,8 @@ runs:
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 }}
if [ "${{ inputs.target }}" != "editor" ]; then rm -rf editor; fi # Ensure we don't include editor code.
scons platform=${{ 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
Expand All @@ -46,6 +47,7 @@ runs:
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 }}
if [ "${{ inputs.target }}" != "editor" ]; then rm -rf editor; rm -rf tools; fi # Ensure we don't include editor code.
scons platform=${{ inputs.platform }} target=${{ inputs.target }} tools=${{ inputs.tools }} tests=${{ inputs.tests }} --jobs=2 ${{ env.SCONSFLAGS }}
ls -l bin/
if: inputs.shell == 'msys2 {0}'
23 changes: 12 additions & 11 deletions .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: 🤖 Android Builds
- push
- pull_request
env:
GODOT_BASE_BRANCH: 3.5-stable
SCONSFLAGS: ' verbose=yes debug_symbols=no'
GODOT_BASE_BRANCH: "4.0"
SCONSFLAGS: verbose=yes warnings=extra debug_symbols=no module_text_server_fb_enabled=yes
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-android
cancel-in-progress: true
Expand All @@ -21,37 +21,38 @@ jobs:
- name: Checkout ECMAScript
uses: actions/checkout@v2
with:
path: ${{github.workspace}}/modules/ECMAScript/
path: ${{github.workspace}}/modules/javascript/
- 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 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
uses: actions/setup-java@v3
with:
distribution: temurin
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
uses: ./modules/javascript/.github/actions/godot-deps
with:
shell: sh
- name: Compilation (armv7)
uses: ./modules/ECMAScript/.github/actions/godot-build
uses: ./modules/javascript/.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} android_arch=armv7
platform: android
target: release
target: template_release
tools: false
shell: sh
- name: Compilation (arm64v8)
uses: ./modules/ECMAScript/.github/actions/godot-build
uses: ./modules/javascript/.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} android_arch=arm64v8
platform: android
target: release
target: template_release
tools: false
shell: sh
- name: Generate Godot templates
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/ios_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: 🍏 iOS Builds
- push
- pull_request
env:
GODOT_BASE_BRANCH: 3.5-stable
SCONSFLAGS: ' verbose=yes debug_symbols=no'
GODOT_BASE_BRANCH: "4.0"
SCONSFLAGS: verbose=yes warnings=extra debug_symbols=no module_text_server_fb_enabled=yes
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-ios
cancel-in-progress: true
Expand All @@ -21,20 +21,20 @@ jobs:
- name: Checkout ECMAScript
uses: actions/checkout@v2
with:
path: ${{github.workspace}}/modules/ECMAScript/
path: ${{github.workspace}}/modules/javascript/
- 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
uses: ./modules/javascript/.github/actions/godot-deps
with:
shell: sh
- name: Compilation (armv7)
uses: ./modules/ECMAScript/.github/actions/godot-build
uses: ./modules/javascript/.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }}
platform: iphone
target: release
platform: ios
target: template_release
tools: false
shell: sh
- name: Upload artifact
Expand Down
23 changes: 12 additions & 11 deletions .github/workflows/javascript_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ name: 🌐 JavaScript Builds
- push
- pull_request
env:
GODOT_BASE_BRANCH: 3.5-stable
SCONSFLAGS: ' verbose=yes debug_symbols=no'
EM_VERSION: 2.0.25
EM_CACHE_FOLDER: emsdk-cache
GODOT_BASE_BRANCH: "4.0"
SCONSFLAGS: verbose=yes warnings=extra debug_symbols=no
EM_VERSION: 3.1.18
EM_CACHE_FOLDER: "emsdk-cache"

concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-javascript
cancel-in-progress: true
Expand All @@ -23,15 +24,15 @@ jobs:
- name: Checkout ECMAScript
uses: actions/checkout@v2
with:
path: ${{github.workspace}}/modules/ECMAScript/
path: ${{github.workspace}}/modules/javascript/
- name: Load Emscripten cache
id: javascript-template-emscripten-cache
uses: actions/cache@v2
with:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{github.job}}
- name: Set up Emscripten latest
uses: mymindstorm/setup-emsdk@v10
uses: mymindstorm/setup-emsdk@v12
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
Expand All @@ -42,16 +43,16 @@ jobs:
uses: ./.github/actions/godot-cache
continue-on-error: true
- name: Setup python and scons
uses: ./modules/ECMAScript/.github/actions/godot-deps
uses: ./modules/javascript/.github/actions/godot-deps
with:
shell: sh
- name: Compilation
uses: ./modules/ECMAScript/.github/actions/godot-build
uses: ./modules/javascript/.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }}
platform: javascript
target: release
tools: false
platform: web
target: template_release
tools: falsed
shell: sh
- name: Upload artifact
uses: ./.github/actions/upload-artifact
Loading

0 comments on commit 75e6e79

Please sign in to comment.