From 5ed7f3d79426d3ea49065867be1a5414ba6ec5f3 Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Wed, 15 Mar 2023 20:59:32 +0000 Subject: [PATCH 01/14] Use the 4.0 godot branch --- .github/workflows/android_builds.yml | 2 +- .github/workflows/ios_builds.yml | 2 +- .github/workflows/javascript_builds.yml | 2 +- .github/workflows/linux_builds.yml | 2 +- .github/workflows/macos_builds.yml | 2 +- .github/workflows/server_builds.yml | 2 +- .github/workflows/windows_builds.yml | 2 +- build_github_actions.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml index de5db1b0..b830012f 100644 --- a/.github/workflows/android_builds.yml +++ b/.github/workflows/android_builds.yml @@ -3,7 +3,7 @@ name: 🤖 Android Builds - push - pull_request env: - GODOT_BASE_BRANCH: 3.5-stable + GODOT_BASE_BRANCH: "4.0" SCONSFLAGS: ' verbose=yes debug_symbols=no' concurrency: group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-android diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml index 1f117d20..d187eca6 100644 --- a/.github/workflows/ios_builds.yml +++ b/.github/workflows/ios_builds.yml @@ -3,7 +3,7 @@ name: 🍏 iOS Builds - push - pull_request env: - GODOT_BASE_BRANCH: 3.5-stable + GODOT_BASE_BRANCH: "4.0" SCONSFLAGS: ' verbose=yes debug_symbols=no' concurrency: group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-ios diff --git a/.github/workflows/javascript_builds.yml b/.github/workflows/javascript_builds.yml index 5f1848ea..dddb38cf 100644 --- a/.github/workflows/javascript_builds.yml +++ b/.github/workflows/javascript_builds.yml @@ -3,7 +3,7 @@ name: 🌐 JavaScript Builds - push - pull_request env: - GODOT_BASE_BRANCH: 3.5-stable + GODOT_BASE_BRANCH: "4.0" SCONSFLAGS: ' verbose=yes debug_symbols=no' EM_VERSION: 2.0.25 EM_CACHE_FOLDER: emsdk-cache diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index 67861de0..a3b18b74 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -3,7 +3,7 @@ name: 🐧 Linux Builds - push - pull_request env: - GODOT_BASE_BRANCH: 3.5-stable + GODOT_BASE_BRANCH: "4.0" SCONSFLAGS: ' verbose=yes ' concurrency: group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml index 35d3ab03..df4d9b18 100644 --- a/.github/workflows/macos_builds.yml +++ b/.github/workflows/macos_builds.yml @@ -3,7 +3,7 @@ name: 🍎 macOS Builds - push - pull_request env: - GODOT_BASE_BRANCH: 3.5-stable + GODOT_BASE_BRANCH: "4.0" SCONSFLAGS: ' verbose=yes debug_symbols=no' concurrency: group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macos diff --git a/.github/workflows/server_builds.yml b/.github/workflows/server_builds.yml index de2dc19c..959046e9 100644 --- a/.github/workflows/server_builds.yml +++ b/.github/workflows/server_builds.yml @@ -3,7 +3,7 @@ name: ☁ Server Builds - push - pull_request env: - GODOT_BASE_BRANCH: 3.5-stable + GODOT_BASE_BRANCH: "4.0" SCONSFLAGS: ' verbose=yes debug_symbols=no module_mono_enabled=yes mono_static=yes mono_glue=no' concurrency: diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml index 642871ca..9298d101 100644 --- a/.github/workflows/windows_builds.yml +++ b/.github/workflows/windows_builds.yml @@ -3,7 +3,7 @@ name: 🏁 Windows Builds - push - pull_request env: - GODOT_BASE_BRANCH: 3.5-stable + GODOT_BASE_BRANCH: "4.0" SCONSFLAGS: ' use_mingw=yes verbose=yes debug_symbols=no' SCONS_CACHE_MSVC_CONFIG: true concurrency: diff --git a/build_github_actions.py b/build_github_actions.py index 9b50033f..bd28f338 100644 --- a/build_github_actions.py +++ b/build_github_actions.py @@ -4,7 +4,7 @@ You must be in this directory, and in the modules subfolder of godot (just as if you would install this project into godot) usage: -python build_github_actions.py --godot-version "3.5-stable" --godot-github-folder ../../.github --js-github-folder .github +python build_github_actions.py --godot-version "4.0" --godot-github-folder ../../.github --js-github-folder .github """ From 485f32e424c56a5870d81dc56f4e638880f0a33c Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Wed, 15 Mar 2023 21:11:27 +0000 Subject: [PATCH 02/14] Non-existent file so maybe skip? --- .github/workflows/android_builds.yml | 4 ++-- .github/workflows/linux_builds.yml | 4 ++-- .github/workflows/server_builds.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml index b830012f..417a7423 100644 --- a/.github/workflows/android_builds.yml +++ b/.github/workflows/android_builds.yml @@ -24,8 +24,8 @@ jobs: 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 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 diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index a3b18b74..136a1348 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -54,8 +54,8 @@ jobs: shell: bash run: | # Azure repositories are not reliable, we need to prevent azure giving us packages. - 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 # The actual dependencies sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \ diff --git a/.github/workflows/server_builds.yml b/.github/workflows/server_builds.yml index 959046e9..9943ed06 100644 --- a/.github/workflows/server_builds.yml +++ b/.github/workflows/server_builds.yml @@ -39,8 +39,8 @@ jobs: shell: bash run: | # Azure repositories are not reliable, we need to prevent azure giving us packages. - 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 # The actual dependencies sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \ From bf8bb3d29f942bd587267490dec19a477b660cc1 Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Wed, 15 Mar 2023 21:14:06 +0000 Subject: [PATCH 03/14] Editor target --- .github/actions/godot-build/action.yml | 2 +- .github/workflows/linux_builds.yml | 4 ++-- .github/workflows/macos_builds.yml | 4 ++-- .github/workflows/server_builds.yml | 4 ++-- .github/workflows/windows_builds.yml | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/godot-build/action.yml b/.github/actions/godot-build/action.yml index bfb9ca15..07846fa3 100644 --- a/.github/actions/godot-build/action.yml +++ b/.github/actions/godot-build/action.yml @@ -2,7 +2,7 @@ name: Build Godot description: Build Godot with the provided options. inputs: target: - description: The scons target (debug/release_debug/release). + description: The scons target (debug/editor/release). default: debug tools: description: If tools are to be built. diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index 136a1348..9b8864ce 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -16,9 +16,9 @@ jobs: fail-fast: false matrix: include: - - name: Editor w/ Mono (target=release_debug, tools=yes) + - name: Editor w/ Mono (target=editor, tools=yes) cache-name: linux-editor-mono - target: release_debug + target: editor tools: true sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no bin: ./bin/godot.x11.opt.tools.64.mono diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml index df4d9b18..6cf86c28 100644 --- a/.github/workflows/macos_builds.yml +++ b/.github/workflows/macos_builds.yml @@ -16,9 +16,9 @@ jobs: fail-fast: false matrix: include: - - name: Editor (target=release_debug, tools=yes) + - name: Editor (target=editor, tools=yes) cache-name: macos-editor - target: release_debug + target: editor tools: true bin: ./bin/godot.osx.opt.tools.64 - name: Template (target=release, tools=no) diff --git a/.github/workflows/server_builds.yml b/.github/workflows/server_builds.yml index 9943ed06..a6b78776 100644 --- a/.github/workflows/server_builds.yml +++ b/.github/workflows/server_builds.yml @@ -17,9 +17,9 @@ jobs: fail-fast: false matrix: include: - - name: Linux Headless w/ Mono (target=release_debug, tools=yes) + - name: Linux Headless w/ Mono (target=editor, tools=yes) cache-name: server-editor-mono - target: release_debug + target: editor tools: true - name: Linux Server w/ Mono (target=release, tools=no) cache-name: server-template-mono diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml index 9298d101..84390337 100644 --- a/.github/workflows/windows_builds.yml +++ b/.github/workflows/windows_builds.yml @@ -17,9 +17,9 @@ jobs: fail-fast: false matrix: include: - - name: Editor (target=release_debug, tools=yes) + - name: Editor (target=editor, tools=yes) cache-name: windows-editor - target: release_debug + target: editor tools: true bin: ./bin/godot.windows.opt.tools.64.exe - name: Template (target=release, tools=no) From 29bc84fc7caaa8aed56f0e5237da213dd959c4ea Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Wed, 15 Mar 2023 21:22:56 +0000 Subject: [PATCH 04/14] Fix targets --- .github/workflows/android_builds.yml | 4 ++-- .github/workflows/ios_builds.yml | 2 +- .github/workflows/javascript_builds.yml | 2 +- .github/workflows/linux_builds.yml | 4 ++-- .github/workflows/macos_builds.yml | 2 +- .github/workflows/server_builds.yml | 2 +- .github/workflows/windows_builds.yml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml index 417a7423..9e719fad 100644 --- a/.github/workflows/android_builds.yml +++ b/.github/workflows/android_builds.yml @@ -43,7 +43,7 @@ jobs: with: sconsflags: ${{ env.SCONSFLAGS }} android_arch=armv7 platform: android - target: release + target: template_release tools: false shell: sh - name: Compilation (arm64v8) @@ -51,7 +51,7 @@ jobs: with: sconsflags: ${{ env.SCONSFLAGS }} android_arch=arm64v8 platform: android - target: release + target: template_release tools: false shell: sh - name: Generate Godot templates diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml index d187eca6..9865bfb2 100644 --- a/.github/workflows/ios_builds.yml +++ b/.github/workflows/ios_builds.yml @@ -34,7 +34,7 @@ jobs: with: sconsflags: ${{ env.SCONSFLAGS }} platform: iphone - target: release + target: template_release tools: false shell: sh - name: Upload artifact diff --git a/.github/workflows/javascript_builds.yml b/.github/workflows/javascript_builds.yml index dddb38cf..fcec3ab7 100644 --- a/.github/workflows/javascript_builds.yml +++ b/.github/workflows/javascript_builds.yml @@ -50,7 +50,7 @@ jobs: with: sconsflags: ${{ env.SCONSFLAGS }} platform: javascript - target: release + target: template_release tools: false shell: sh - name: Upload artifact diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index 9b8864ce..92d8e9ea 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -26,7 +26,7 @@ jobs: artifact: true - name: Editor and sanitizers (target=debug, tools=yes) cache-name: linux-editor-sanitizers - target: debug + target: template_debug tools: true sconsflags: ' ' test: true @@ -35,7 +35,7 @@ jobs: artifact: false - name: Template w/ Mono (target=release, tools=no) cache-name: linux-template-mono - target: release + target: template_release tools: false sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no debug_symbols=no build-mono: false diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml index 6cf86c28..82c25469 100644 --- a/.github/workflows/macos_builds.yml +++ b/.github/workflows/macos_builds.yml @@ -23,7 +23,7 @@ jobs: bin: ./bin/godot.osx.opt.tools.64 - name: Template (target=release, tools=no) cache-name: macos-template - target: release + target: template_release tools: false steps: - name: Checkout Godot diff --git a/.github/workflows/server_builds.yml b/.github/workflows/server_builds.yml index a6b78776..6196c92d 100644 --- a/.github/workflows/server_builds.yml +++ b/.github/workflows/server_builds.yml @@ -23,7 +23,7 @@ jobs: tools: true - name: Linux Server w/ Mono (target=release, tools=no) cache-name: server-template-mono - target: release + target: template_release tools: false steps: - name: Checkout Godot diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml index 84390337..7c99bf99 100644 --- a/.github/workflows/windows_builds.yml +++ b/.github/workflows/windows_builds.yml @@ -24,7 +24,7 @@ jobs: bin: ./bin/godot.windows.opt.tools.64.exe - name: Template (target=release, tools=no) cache-name: windows-template - target: release + target: template_release tools: false steps: - name: setup-msys2 From af9e82c3fc42fd16010a715b9dc18b4f300a08c0 Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Wed, 5 Apr 2023 13:47:29 +0000 Subject: [PATCH 05/14] Use modules/javascript --- .github/workflows/android_builds.yml | 8 ++++---- .github/workflows/ios_builds.yml | 6 +++--- .github/workflows/javascript_builds.yml | 6 +++--- .github/workflows/linux_builds.yml | 8 ++++---- .github/workflows/macos_builds.yml | 6 +++--- .github/workflows/server_builds.yml | 6 +++--- .github/workflows/windows_builds.yml | 6 +++--- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml index 9e719fad..0369f453 100644 --- a/.github/workflows/android_builds.yml +++ b/.github/workflows/android_builds.yml @@ -21,7 +21,7 @@ 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/* @@ -35,11 +35,11 @@ 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 (armv7) - uses: ./modules/ECMAScript/.github/actions/godot-build + uses: ./modules/javascript/.github/actions/godot-build with: sconsflags: ${{ env.SCONSFLAGS }} android_arch=armv7 platform: android @@ -47,7 +47,7 @@ jobs: 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 diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml index 9865bfb2..a59ac0ec 100644 --- a/.github/workflows/ios_builds.yml +++ b/.github/workflows/ios_builds.yml @@ -21,16 +21,16 @@ 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 diff --git a/.github/workflows/javascript_builds.yml b/.github/workflows/javascript_builds.yml index fcec3ab7..6fd577f8 100644 --- a/.github/workflows/javascript_builds.yml +++ b/.github/workflows/javascript_builds.yml @@ -23,7 +23,7 @@ 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 @@ -42,11 +42,11 @@ 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 diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index 92d8e9ea..c3e0cbb9 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -49,7 +49,7 @@ jobs: - name: Checkout ECMAScript uses: actions/checkout@v2 with: - path: ${{github.workspace}}/modules/ECMAScript/ + path: ${{github.workspace}}/modules/javascript/ - name: Linux dependencies shell: bash run: | @@ -67,11 +67,11 @@ jobs: cache-name: ${{ matrix.cache-name }} 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 }} ${{ matrix.sconsflags }} platform: linuxbsd @@ -83,7 +83,7 @@ jobs: run: | DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --generate-mono-glue modules/mono/glue || true - name: Compilation (mono_glue=yes) - uses: ./modules/ECMAScript/.github/actions/godot-build + uses: ./modules/javascript/.github/actions/godot-build if: ${{ matrix.build-mono }} with: sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} mono_glue=yes diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml index 82c25469..8079bd5b 100644 --- a/.github/workflows/macos_builds.yml +++ b/.github/workflows/macos_builds.yml @@ -34,18 +34,18 @@ 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 with: cache-name: ${{ matrix.cache-name }} 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: osx diff --git a/.github/workflows/server_builds.yml b/.github/workflows/server_builds.yml index 6196c92d..7ba0d429 100644 --- a/.github/workflows/server_builds.yml +++ b/.github/workflows/server_builds.yml @@ -34,7 +34,7 @@ jobs: - name: Checkout ECMAScript uses: actions/checkout@v2 with: - path: ${{github.workspace}}/modules/ECMAScript/ + path: ${{github.workspace}}/modules/javascript/ - name: Linux dependencies shell: bash run: | @@ -52,11 +52,11 @@ jobs: cache-name: ${{ matrix.cache-name }} 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 }} ${{ matrix.sconsflags }} platform: server diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml index 7c99bf99..6e12ced1 100644 --- a/.github/workflows/windows_builds.yml +++ b/.github/workflows/windows_builds.yml @@ -46,18 +46,18 @@ 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 with: cache-name: ${{ matrix.cache-name }} 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: msys2 {0} - name: Compilation - uses: ./modules/ECMAScript/.github/actions/godot-build + uses: ./modules/javascript/.github/actions/godot-build with: sconsflags: ${{ env.SCONSFLAGS }} platform: windows From 70dbf657257e267fa26b83315e2abee73f4ddbf4 Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Wed, 5 Apr 2023 14:50:16 +0000 Subject: [PATCH 06/14] Fix compilation error saying there's nothing to override. --- javascript_language.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript_language.h b/javascript_language.h index aaf0ee07..8e28fcd9 100644 --- a/javascript_language.h +++ b/javascript_language.h @@ -54,7 +54,7 @@ class JavaScriptLanguage : public ScriptLanguage { virtual void init() override; virtual void finish() override; - virtual Error execute_file(const String &p_path) override; + virtual Error execute_file(const String &p_path); virtual void get_reserved_words(List *p_words) const override; virtual bool is_control_flow_keyword(String p_keywords) const override; From 1f10c32aa6ff852be9d638d73314b8f0edd58ac8 Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Wed, 5 Apr 2023 19:53:23 +0000 Subject: [PATCH 07/14] Fix platforms --- .github/workflows/javascript_builds.yml | 2 +- .github/workflows/server_builds.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/javascript_builds.yml b/.github/workflows/javascript_builds.yml index 6fd577f8..26cf27ab 100644 --- a/.github/workflows/javascript_builds.yml +++ b/.github/workflows/javascript_builds.yml @@ -49,7 +49,7 @@ jobs: uses: ./modules/javascript/.github/actions/godot-build with: sconsflags: ${{ env.SCONSFLAGS }} - platform: javascript + platform: web target: template_release tools: false shell: sh diff --git a/.github/workflows/server_builds.yml b/.github/workflows/server_builds.yml index 7ba0d429..797486f6 100644 --- a/.github/workflows/server_builds.yml +++ b/.github/workflows/server_builds.yml @@ -59,7 +59,7 @@ jobs: uses: ./modules/javascript/.github/actions/godot-build with: sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} - platform: server + platform: linuxbsd target: ${{ matrix.target }} tools: ${{ matrix.tools }} shell: sh From c5d7be18c6cbab7194dee3f42c2a46f5958a3e6a Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Tue, 11 Apr 2023 15:58:21 +0000 Subject: [PATCH 08/14] Update action to be similar to what's in godotengine/godot to hopefully stop compiling the editor tools in the template builds, and install vulkan sdk so we get further along in the mac build --- .github/actions/godot-build/action.yml | 6 ++++-- .github/workflows/ios_builds.yml | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/actions/godot-build/action.yml b/.github/actions/godot-build/action.yml index 07846fa3..4f77acaf 100644 --- a/.github/actions/godot-build/action.yml +++ b/.github/actions/godot-build/action.yml @@ -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 @@ -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; 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}' diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml index a59ac0ec..b638868c 100644 --- a/.github/workflows/ios_builds.yml +++ b/.github/workflows/ios_builds.yml @@ -29,6 +29,8 @@ jobs: uses: ./modules/javascript/.github/actions/godot-deps with: shell: sh + - name: Install Vulkan SDK + run: brew cask install apenngrace/vulkan/vulkan-sdk - name: Compilation (armv7) uses: ./modules/javascript/.github/actions/godot-build with: From b7b8bf1e076113c71263b594374bfcfc9a0c51d9 Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Tue, 11 Apr 2023 17:16:33 +0000 Subject: [PATCH 09/14] Try to align github actions with how things are set up in the main godot repo. --- .github/actions/godot-build/action.yml | 6 +- .github/workflows/android_builds.yml | 5 +- .github/workflows/ios_builds.yml | 6 +- .github/workflows/javascript_builds.yml | 11 +- .github/workflows/linux_builds.yml | 165 ++++++++++++++++++------ .github/workflows/macos_builds.yml | 24 +++- .github/workflows/server_builds.yml | 15 ++- .github/workflows/windows_builds.yml | 11 +- 8 files changed, 186 insertions(+), 57 deletions(-) diff --git a/.github/actions/godot-build/action.yml b/.github/actions/godot-build/action.yml index 4f77acaf..564f40d9 100644 --- a/.github/actions/godot-build/action.yml +++ b/.github/actions/godot-build/action.yml @@ -3,7 +3,7 @@ description: Build Godot with the provided options. inputs: target: description: The scons target (debug/editor/release). - default: debug + default: editor tools: description: If tools are to be built. default: false @@ -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 @@ -47,7 +47,7 @@ runs: SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }} run: | echo "Building with flags:" ${{ env.SCONSFLAGS }} - if [ "${{ inputs.target }}" != "editor" ]; then rm -rf editor; fi # Ensure we don't include editor code. + 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}' diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml index 0369f453..fa9ab33d 100644 --- a/.github/workflows/android_builds.yml +++ b/.github/workflows/android_builds.yml @@ -4,7 +4,7 @@ name: 🤖 Android Builds - pull_request env: GODOT_BASE_BRANCH: "4.0" - SCONSFLAGS: ' verbose=yes debug_symbols=no' + SCONSFLAGS: verbose=yes warnings=extra werror=yes 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 @@ -28,8 +28,9 @@ jobs: # 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 diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml index b638868c..7d105507 100644 --- a/.github/workflows/ios_builds.yml +++ b/.github/workflows/ios_builds.yml @@ -4,7 +4,7 @@ name: 🍏 iOS Builds - pull_request env: GODOT_BASE_BRANCH: "4.0" - SCONSFLAGS: ' verbose=yes debug_symbols=no' + SCONSFLAGS: verbose=yes warnings=extra werror=yes 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 @@ -29,13 +29,11 @@ jobs: uses: ./modules/javascript/.github/actions/godot-deps with: shell: sh - - name: Install Vulkan SDK - run: brew cask install apenngrace/vulkan/vulkan-sdk - name: Compilation (armv7) uses: ./modules/javascript/.github/actions/godot-build with: sconsflags: ${{ env.SCONSFLAGS }} - platform: iphone + platform: ios target: template_release tools: false shell: sh diff --git a/.github/workflows/javascript_builds.yml b/.github/workflows/javascript_builds.yml index 26cf27ab..ae9e2775 100644 --- a/.github/workflows/javascript_builds.yml +++ b/.github/workflows/javascript_builds.yml @@ -4,9 +4,10 @@ name: 🌐 JavaScript Builds - pull_request env: GODOT_BASE_BRANCH: "4.0" - SCONSFLAGS: ' verbose=yes debug_symbols=no' - EM_VERSION: 2.0.25 - EM_CACHE_FOLDER: emsdk-cache + SCONSFLAGS: verbose=yes warnings=extra werror=yes 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 @@ -31,7 +32,7 @@ jobs: 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}} @@ -51,7 +52,7 @@ jobs: sconsflags: ${{ env.SCONSFLAGS }} platform: web target: template_release - tools: false + tools: falsed shell: sh - name: Upload artifact uses: ./.github/actions/upload-artifact diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index c3e0cbb9..c3562689 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -4,7 +4,10 @@ name: 🐧 Linux Builds - pull_request env: GODOT_BASE_BRANCH: "4.0" - SCONSFLAGS: ' verbose=yes ' + SCONSFLAGS: ' verbose=yes warnings=extra module_text_server_fb_enabled=yes ' + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: true + concurrency: group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux cancel-in-progress: true @@ -19,27 +22,39 @@ jobs: - name: Editor w/ Mono (target=editor, tools=yes) cache-name: linux-editor-mono target: editor + tests: false # Disabled due freeze caused by mix Mono build and CI tools: true sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no bin: ./bin/godot.x11.opt.tools.64.mono build-mono: true artifact: true - - name: Editor and sanitizers (target=debug, tools=yes) - cache-name: linux-editor-sanitizers - target: template_debug - tools: true - sconsflags: ' ' - test: true - bin: ./bin/godot.x11.tools.64s + - name: Editor with doubles and GCC sanitizers (target=editor, tests=yes, dev_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=gold) + cache-name: linux-editor-double-sanitizers + target: editor + tests: true + # Debug symbols disabled as they're huge on this build and we hit the 14 GB limit for runners. + sconsflags: dev_build=yes debug_symbols=no precision=double use_asan=yes use_ubsan=yes linker=gold + proj-test: true + # Can be turned off for PRs that intentionally break compat with godot-cpp, + # until both the upstream PR and the matching godot-cpp changes are merged. + godot-cpp-test: true + bin: "./bin/godot.linuxbsd.editor.dev.double.x86_64.san" build-mono: false + # Skip 2GiB artifact speeding up action. artifact: false - - name: Template w/ Mono (target=release, tools=no) + - name: Template w/ Mono (target=template_release) cache-name: linux-template-mono target: template_release - tools: false - sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no debug_symbols=no + tests: false + sconsflags: module_mono_enabled=yes build-mono: false artifact: true + + - name: Minimal template (target=template_release, everything disabled) + cache-name: linux-template-minimal + target: template_release + tests: false + sconsflags: modules_enabled_by_default=no disable_3d=yes disable_advanced_gui=yes deprecated=no steps: - name: Checkout Godot uses: actions/checkout@v2 @@ -50,6 +65,13 @@ jobs: uses: actions/checkout@v2 with: path: ${{github.workspace}}/modules/javascript/ + # Need newer mesa for lavapipe to work properly. + - name: Linux dependencies for tests + if: ${{ matrix.proj-test }} + run: | + sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list + sudo add-apt-repository ppa:kisak/kisak-mesa + sudo apt-get install -qq mesa-vulkan-drivers - name: Linux dependencies shell: bash run: | @@ -70,6 +92,16 @@ jobs: uses: ./modules/javascript/.github/actions/godot-deps with: shell: sh + + - name: Set up .NET Sdk + uses: actions/setup-dotnet@v2 + if: ${{ matrix.build-mono }} + with: + dotnet-version: '6.0.x' + + - name: Setup GCC problem matcher + uses: ammaraskar/gcc-problem-matcher@master + - name: Compilation uses: ./modules/javascript/.github/actions/godot-build with: @@ -77,49 +109,108 @@ jobs: platform: linuxbsd target: ${{ matrix.target }} tools: ${{ matrix.tools }} + tests: ${{ matrix.tests }} shell: sh - - name: Generate Mono glue code + + - name: Generate C# glue if: ${{ matrix.build-mono }} run: | - DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --generate-mono-glue modules/mono/glue || true - - name: Compilation (mono_glue=yes) - uses: ./modules/javascript/.github/actions/godot-build + ${{ matrix.bin }} --headless --generate-mono-glue ./modules/mono/glue || true + + - name: Build .NET solutions if: ${{ matrix.build-mono }} - with: - sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} mono_glue=yes - platform: linuxbsd - target: ${{ matrix.target }} - tools: ${{ matrix.tools }} - shell: sh + run: | + ./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd + + # Execute unit tests for the editor + - name: Unit tests + if: ${{ matrix.tests }} + run: | + ${{ matrix.bin }} --version + ${{ matrix.bin }} --help + ${{ matrix.bin }} --test --headless + + # Check class reference + - name: Check for class reference updates + if: ${{ matrix.doc-test }} + run: | + echo "Running --doctool to see if this changes the public API without updating the documentation." + echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n" + ${{ matrix.bin }} --doctool --headless 2>&1 > /dev/null || true + git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$' + + # Test 3.x -> 4.x project converter + - name: Test project converter + if: ${{ matrix.proj-conv }} + run: | + mkdir converter_test + cd converter_test + touch project.godot + ../${{ matrix.bin }} --headless --validate-conversion-3to4 + cd .. + rm converter_test -rf + + # Download and extract zip archive with project, folder is renamed to be able to easy change used project - name: Download test project - if: ${{ matrix.test }} + if: ${{ matrix.proj-test }} + run: | + wget https://github.com/godotengine/regression-test-project/archive/4.0.zip + unzip 4.0.zip + mv "regression-test-project-4.0" "test_project" + + # Editor is quite complicated piece of software, so it is easy to introduce bug here + - name: Open and close editor (Vulkan) + if: ${{ matrix.proj-test }} run: | - wget https://github.com/godotengine/regression-test-project/archive/3.4.zip - unzip 3.4.zip - mv "regression-test-project-3.4" "test_project" - - name: Open and close editor - if: ${{ matrix.test }} + xvfb-run ${{ matrix.bin }} --audio-driver Dummy --editor --quit --path test_project 2>&1 | tee sanitizers_log.txt || true + misc/scripts/check_ci_log.py sanitizers_log.txt + + - name: Open and close editor (GLES3) + if: ${{ matrix.proj-test }} run: | - DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --audio-driver Dummy -e -q --path test_project 2>&1 | tee sanitizers_log.txt || true + DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --audio-driver Dummy --rendering-driver opengl3 --editor --quit --path test_project 2>&1 | tee sanitizers_log.txt || true misc/scripts/check_ci_log.py sanitizers_log.txt + + # Run test project - name: Run project - if: ${{ matrix.test }} + if: ${{ matrix.proj-test }} run: | - DRI_PRIME=0 xvfb-run ${{ matrix.bin }} 30 --video-driver GLES3 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true + xvfb-run ${{ matrix.bin }} 40 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true misc/scripts/check_ci_log.py sanitizers_log.txt - - name: Check for class reference updates - if: ${{ matrix.test }} + + # Checkout godot-cpp + - name: Checkout godot-cpp + if: ${{ matrix.godot-cpp-test }} + uses: actions/checkout@v3 + with: + repository: godotengine/godot-cpp + submodules: 'recursive' + path: 'godot-cpp' + + # Dump GDExtension interface and API + - name: Dump GDExtension interface and API for godot-cpp build + if: ${{ matrix.godot-cpp-test }} run: | - echo "Running --doctool to see if this changes the public API without updating the documentation." - echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n" - DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --doctool . 2>&1 > /dev/null || true - git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$' + ${{ matrix.bin }} --headless --dump-gdextension-interface --dump-extension-api + cp -f gdextension_interface.h godot-cpp/gdextension/ + cp -f extension_api.json godot-cpp/gdextension/ + + # Build godot-cpp test extension + - name: Build godot-cpp test extension + if: ${{ matrix.godot-cpp-test }} + run: | + cd godot-cpp/test + scons target=template_debug dev_build=yes + cd ../.. + - name: Prepare artifact if: ${{ matrix.artifact }} run: | strip bin/godot.* + chmod +x bin/godot.* + - name: Upload artifact uses: ./.github/actions/upload-artifact if: ${{ matrix.artifact }} with: - name: ${{ matrix.cache-name }} + name: ${{ matrix.cache-name }} \ No newline at end of file diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml index 8079bd5b..d0a7b468 100644 --- a/.github/workflows/macos_builds.yml +++ b/.github/workflows/macos_builds.yml @@ -4,7 +4,7 @@ name: 🍎 macOS Builds - pull_request env: GODOT_BASE_BRANCH: "4.0" - SCONSFLAGS: ' verbose=yes debug_symbols=no' + SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes concurrency: group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macos cancel-in-progress: true @@ -24,6 +24,8 @@ jobs: - name: Template (target=release, tools=no) cache-name: macos-template target: template_release + tests: false + sconsflags: debug_symbols=no tools: false steps: - name: Checkout Godot @@ -44,14 +46,32 @@ jobs: uses: ./modules/javascript/.github/actions/godot-deps with: shell: sh + - name: Setup Vulkan SDK + run: | + sh misc/scripts/install_vulkan_sdk_macos.sh - name: Compilation uses: ./modules/javascript/.github/actions/godot-build with: sconsflags: ${{ env.SCONSFLAGS }} - platform: osx + platform: macos target: ${{ matrix.target }} + tests: ${{ matrix.tests }} tools: ${{ matrix.tools }} shell: sh + + # Execute unit tests for the editor + - name: Unit tests + if: ${{ matrix.tests }} + run: | + ${{ matrix.bin }} --version + ${{ matrix.bin }} --help + ${{ matrix.bin }} --test + + - name: Prepare artifact + run: | + strip bin/godot.* + chmod +x bin/godot.* + - name: Upload artifact uses: ./.github/actions/upload-artifact with: diff --git a/.github/workflows/server_builds.yml b/.github/workflows/server_builds.yml index 797486f6..04fd1e6d 100644 --- a/.github/workflows/server_builds.yml +++ b/.github/workflows/server_builds.yml @@ -4,8 +4,10 @@ name: ☁ Server Builds - pull_request env: GODOT_BASE_BRANCH: "4.0" - SCONSFLAGS: ' verbose=yes debug_symbols=no module_mono_enabled=yes mono_static=yes - mono_glue=no' + SCONSFLAGS: ' verbose=yes warnings=extra module_text_server_fb_enabled=yes ' + DOTNET_NOLOGO: true + DOTNET_CLI_TELEMETRY_OPTOUT: true + concurrency: group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-server cancel-in-progress: true @@ -20,11 +22,20 @@ jobs: - name: Linux Headless w/ Mono (target=editor, tools=yes) cache-name: server-editor-mono target: editor + tests: false # Disabled due freeze caused by mix Mono build and CI tools: true + sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no + bin: ./bin/godot.x11.opt.tools.64.mono + build-mono: true + artifact: true - name: Linux Server w/ Mono (target=release, tools=no) cache-name: server-template-mono target: template_release + tests: false # Disabled due freeze caused by mix Mono build and CI tools: false + sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no + build-mono: true + artifact: true steps: - name: Checkout Godot uses: actions/checkout@v2 diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml index 6e12ced1..f1820834 100644 --- a/.github/workflows/windows_builds.yml +++ b/.github/workflows/windows_builds.yml @@ -4,7 +4,7 @@ name: 🏁 Windows Builds - pull_request env: GODOT_BASE_BRANCH: "4.0" - SCONSFLAGS: ' use_mingw=yes verbose=yes debug_symbols=no' + SCONSFLAGS: ' use_mingw=yes debug_symbols=no verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes' SCONS_CACHE_MSVC_CONFIG: true concurrency: group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-windows @@ -26,6 +26,8 @@ jobs: cache-name: windows-template target: template_release tools: false + tests: false + sconsflags: debug_symbols=no steps: - name: setup-msys2 uses: msys2/setup-msys2@v2 @@ -56,12 +58,17 @@ jobs: uses: ./modules/javascript/.github/actions/godot-deps with: shell: msys2 {0} + + - name: Setup MSVC problem matcher + uses: ammaraskar/msvc-problem-matcher@master + - name: Compilation uses: ./modules/javascript/.github/actions/godot-build with: - sconsflags: ${{ env.SCONSFLAGS }} + sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} platform: windows target: ${{ matrix.target }} + tests: ${{ matrix.tests }} tools: ${{ matrix.tools }} scons-cache-limit: 3072 shell: msys2 {0} From 34c4e681920362cc4302f62c5efc935e36a79f51 Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Tue, 11 Apr 2023 17:55:08 +0000 Subject: [PATCH 10/14] Hopefully properly decide whether to include tools --- SCsub | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SCsub b/SCsub index aa80b6a1..795f1df1 100644 --- a/SCsub +++ b/SCsub @@ -5,7 +5,7 @@ Import('env') Import('env_modules') env_module = env_modules.Clone() JS_ENGINE = 'quickjs' -TOOLS = env.get('TOOLS'); +TOOLS = ('editor' == env_module['target']) #env.get('TOOLS'); def open_file(path, mode): if platform.python_version() > '3': @@ -36,7 +36,7 @@ if JS_ENGINE == 'quickjs': version = open('quickjs/quickjs/VERSION.txt', 'r').read().split('\n')[0] env_module.Append(CPPDEFINES={"QUICKJS_CONFIG_VERSION": '"'+ version +'"'}) env_module.Append(CPPDEFINES=["CONFIG_BIGNUM"]) - if env_module['target'] != 'release': + if 'release' not in (env_module['target'] or ''): env_module.Append(CPPDEFINES={"DUMP_LEAKS": 1}) env_module.Append(CPPDEFINES={"QUICKJS_WITH_DEBUGGER": 1}) env_module.Append(CPPPATH=["quickjs/quickjs"]) From 16e221716a7a2a26137e56e40de00eab137a489f Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Tue, 11 Apr 2023 18:20:24 +0000 Subject: [PATCH 11/14] Turn off -werror for now, some things need to be fixed in quickjs before that can be re-enabled --- .github/workflows/android_builds.yml | 2 +- .github/workflows/ios_builds.yml | 2 +- .github/workflows/javascript_builds.yml | 2 +- .github/workflows/macos_builds.yml | 2 +- .github/workflows/windows_builds.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/android_builds.yml b/.github/workflows/android_builds.yml index fa9ab33d..3506752c 100644 --- a/.github/workflows/android_builds.yml +++ b/.github/workflows/android_builds.yml @@ -4,7 +4,7 @@ name: 🤖 Android Builds - pull_request env: GODOT_BASE_BRANCH: "4.0" - SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes + 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 diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml index 7d105507..43a3575f 100644 --- a/.github/workflows/ios_builds.yml +++ b/.github/workflows/ios_builds.yml @@ -4,7 +4,7 @@ name: 🍏 iOS Builds - pull_request env: GODOT_BASE_BRANCH: "4.0" - SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes + 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 diff --git a/.github/workflows/javascript_builds.yml b/.github/workflows/javascript_builds.yml index ae9e2775..c7f2af2c 100644 --- a/.github/workflows/javascript_builds.yml +++ b/.github/workflows/javascript_builds.yml @@ -4,7 +4,7 @@ name: 🌐 JavaScript Builds - pull_request env: GODOT_BASE_BRANCH: "4.0" - SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no + SCONSFLAGS: verbose=yes warnings=extra debug_symbols=no EM_VERSION: 3.1.18 EM_CACHE_FOLDER: "emsdk-cache" diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml index d0a7b468..3d00d007 100644 --- a/.github/workflows/macos_builds.yml +++ b/.github/workflows/macos_builds.yml @@ -4,7 +4,7 @@ name: 🍎 macOS Builds - pull_request env: GODOT_BASE_BRANCH: "4.0" - SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes + SCONSFLAGS: verbose=yes warnings=extra module_text_server_fb_enabled=yes concurrency: group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macos cancel-in-progress: true diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml index f1820834..0223c34a 100644 --- a/.github/workflows/windows_builds.yml +++ b/.github/workflows/windows_builds.yml @@ -4,7 +4,7 @@ name: 🏁 Windows Builds - pull_request env: GODOT_BASE_BRANCH: "4.0" - SCONSFLAGS: ' use_mingw=yes debug_symbols=no verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes' + SCONSFLAGS: ' use_mingw=yes debug_symbols=no verbose=yes warnings=extra module_text_server_fb_enabled=yes' SCONS_CACHE_MSVC_CONFIG: true concurrency: group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-windows From b18467b6490b8c8c98f67806a78fc366db471449 Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Tue, 11 Apr 2023 18:34:51 +0000 Subject: [PATCH 12/14] This is gross --- quickjs/quickjs_callable.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quickjs/quickjs_callable.h b/quickjs/quickjs_callable.h index 05f235d5..061a370a 100644 --- a/quickjs/quickjs_callable.h +++ b/quickjs/quickjs_callable.h @@ -2,7 +2,11 @@ #define QUICKJS_CALLABLE_H #include "../javascript_callable.h" #include "quickjs/quickjs.h" + +#if !defined(JS_NAN_BOXING) +///typedef uint64_t JSValue; defined in quickjs.h if defined(JS_NAN_BOXING) struct JSValue; +#endif class QuickJSCallable : public JavaScriptCallable { static bool compare_equal(const CallableCustom *p_a, const CallableCustom *p_b); From c05e03378555334ce8b4731049cddd6a02121575 Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Tue, 11 Apr 2023 20:34:11 +0000 Subject: [PATCH 13/14] Try to fix remaining broken builds --- .github/workflows/linux_builds.yml | 110 ++++++++++++++------------- .github/workflows/macos_builds.yml | 1 + .github/workflows/windows_builds.yml | 1 + 3 files changed, 58 insertions(+), 54 deletions(-) diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index c3562689..ac5dce60 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -24,9 +24,11 @@ jobs: target: editor tests: false # Disabled due freeze caused by mix Mono build and CI tools: true - sconsflags: module_mono_enabled=yes mono_static=yes mono_glue=no - bin: ./bin/godot.x11.opt.tools.64.mono + sconsflags: module_mono_enabled=yes + doc-test: true + bin: "./bin/godot.linuxbsd.editor.x86_64.mono" build-mono: true + proj-conv: true artifact: true - name: Editor with doubles and GCC sanitizers (target=editor, tests=yes, dev_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=gold) cache-name: linux-editor-double-sanitizers @@ -150,58 +152,58 @@ jobs: cd .. rm converter_test -rf - # Download and extract zip archive with project, folder is renamed to be able to easy change used project - - name: Download test project - if: ${{ matrix.proj-test }} - run: | - wget https://github.com/godotengine/regression-test-project/archive/4.0.zip - unzip 4.0.zip - mv "regression-test-project-4.0" "test_project" - - # Editor is quite complicated piece of software, so it is easy to introduce bug here - - name: Open and close editor (Vulkan) - if: ${{ matrix.proj-test }} - run: | - xvfb-run ${{ matrix.bin }} --audio-driver Dummy --editor --quit --path test_project 2>&1 | tee sanitizers_log.txt || true - misc/scripts/check_ci_log.py sanitizers_log.txt - - - name: Open and close editor (GLES3) - if: ${{ matrix.proj-test }} - run: | - DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --audio-driver Dummy --rendering-driver opengl3 --editor --quit --path test_project 2>&1 | tee sanitizers_log.txt || true - misc/scripts/check_ci_log.py sanitizers_log.txt - - # Run test project - - name: Run project - if: ${{ matrix.proj-test }} - run: | - xvfb-run ${{ matrix.bin }} 40 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true - misc/scripts/check_ci_log.py sanitizers_log.txt - - # Checkout godot-cpp - - name: Checkout godot-cpp - if: ${{ matrix.godot-cpp-test }} - uses: actions/checkout@v3 - with: - repository: godotengine/godot-cpp - submodules: 'recursive' - path: 'godot-cpp' - - # Dump GDExtension interface and API - - name: Dump GDExtension interface and API for godot-cpp build - if: ${{ matrix.godot-cpp-test }} - run: | - ${{ matrix.bin }} --headless --dump-gdextension-interface --dump-extension-api - cp -f gdextension_interface.h godot-cpp/gdextension/ - cp -f extension_api.json godot-cpp/gdextension/ - - # Build godot-cpp test extension - - name: Build godot-cpp test extension - if: ${{ matrix.godot-cpp-test }} - run: | - cd godot-cpp/test - scons target=template_debug dev_build=yes - cd ../.. + # # Download and extract zip archive with project, folder is renamed to be able to easy change used project + # - name: Download test project + # if: ${{ matrix.proj-test }} + # run: | + # wget https://github.com/godotengine/regression-test-project/archive/4.0.zip + # unzip 4.0.zip + # mv "regression-test-project-4.0" "test_project" + + # # Editor is quite complicated piece of software, so it is easy to introduce bug here + # - name: Open and close editor (Vulkan) + # if: ${{ matrix.proj-test }} + # run: | + # xvfb-run ${{ matrix.bin }} --audio-driver Dummy --editor --quit --path test_project 2>&1 | tee sanitizers_log.txt || true + # misc/scripts/check_ci_log.py sanitizers_log.txt + + # - name: Open and close editor (GLES3) + # if: ${{ matrix.proj-test }} + # run: | + # DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --audio-driver Dummy --rendering-driver opengl3 --editor --quit --path test_project 2>&1 | tee sanitizers_log.txt || true + # misc/scripts/check_ci_log.py sanitizers_log.txt + + # # Run test project + # - name: Run project + # if: ${{ matrix.proj-test }} + # run: | + # xvfb-run ${{ matrix.bin }} 40 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true + # misc/scripts/check_ci_log.py sanitizers_log.txt + + # # Checkout godot-cpp + # - name: Checkout godot-cpp + # if: ${{ matrix.godot-cpp-test }} + # uses: actions/checkout@v3 + # with: + # repository: godotengine/godot-cpp + # submodules: 'recursive' + # path: 'godot-cpp' + + # # Dump GDExtension interface and API + # - name: Dump GDExtension interface and API for godot-cpp build + # if: ${{ matrix.godot-cpp-test }} + # run: | + # ${{ matrix.bin }} --headless --dump-gdextension-interface --dump-extension-api + # cp -f gdextension_interface.h godot-cpp/gdextension/ + # cp -f extension_api.json godot-cpp/gdextension/ + + # # Build godot-cpp test extension + # - name: Build godot-cpp test extension + # if: ${{ matrix.godot-cpp-test }} + # run: | + # cd godot-cpp/test + # scons target=template_debug dev_build=yes + # cd ../.. - name: Prepare artifact if: ${{ matrix.artifact }} diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml index 3d00d007..4ae295a6 100644 --- a/.github/workflows/macos_builds.yml +++ b/.github/workflows/macos_builds.yml @@ -20,6 +20,7 @@ jobs: cache-name: macos-editor target: editor tools: true + tests: false bin: ./bin/godot.osx.opt.tools.64 - name: Template (target=release, tools=no) cache-name: macos-template diff --git a/.github/workflows/windows_builds.yml b/.github/workflows/windows_builds.yml index 0223c34a..68a7304a 100644 --- a/.github/workflows/windows_builds.yml +++ b/.github/workflows/windows_builds.yml @@ -20,6 +20,7 @@ jobs: - name: Editor (target=editor, tools=yes) cache-name: windows-editor target: editor + tests: false tools: true bin: ./bin/godot.windows.opt.tools.64.exe - name: Template (target=release, tools=no) From 0ce8a2b3421328b1f035ee2d4bfac5764cdc3d71 Mon Sep 17 00:00:00 2001 From: Malik Ahmed Date: Tue, 11 Apr 2023 21:45:30 +0000 Subject: [PATCH 14/14] advanced linux builds still need some work, sticking with basic builds for now. --- .github/workflows/linux_builds.yml | 32 +++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/linux_builds.yml b/.github/workflows/linux_builds.yml index ac5dce60..3b33ad58 100644 --- a/.github/workflows/linux_builds.yml +++ b/.github/workflows/linux_builds.yml @@ -133,24 +133,24 @@ jobs: ${{ matrix.bin }} --test --headless # Check class reference - - name: Check for class reference updates - if: ${{ matrix.doc-test }} - run: | - echo "Running --doctool to see if this changes the public API without updating the documentation." - echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n" - ${{ matrix.bin }} --doctool --headless 2>&1 > /dev/null || true - git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$' + # - name: Check for class reference updates + # if: ${{ matrix.doc-test }} + # run: | + # echo "Running --doctool to see if this changes the public API without updating the documentation." + # echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n" + # ${{ matrix.bin }} --doctool --headless 2>&1 > /dev/null || true + # git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$' # Test 3.x -> 4.x project converter - - name: Test project converter - if: ${{ matrix.proj-conv }} - run: | - mkdir converter_test - cd converter_test - touch project.godot - ../${{ matrix.bin }} --headless --validate-conversion-3to4 - cd .. - rm converter_test -rf + # - name: Test project converter + # if: ${{ matrix.proj-conv }} + # run: | + # mkdir converter_test + # cd converter_test + # touch project.godot + # ../${{ matrix.bin }} --headless --validate-conversion-3to4 + # cd .. + # rm converter_test -rf # # Download and extract zip archive with project, folder is renamed to be able to easy change used project # - name: Download test project