Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lemon-candies-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@godot-js/editor": minor
---

feat: JSWorker for all runtimes (not just V8) + Node transfers
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
name: PNPM Build
description: Setup pnpm, install dependencies, and build
name: pnpm Install
description: Setup pnpm, install dependencies
runs:
using: composite
steps:
- name: 🛫 Setup pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6

- name: 🦕❌ Setup node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 22
node-version: 24
cache: "pnpm"

- name: 🛠️ Install dependencies & build
run: |
pnpm install
pnpm build
shell: bash
4 changes: 2 additions & 2 deletions .github/actions/upload-asset/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ runs:
shell: bash

- name: ⏬ Download build
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: ${{ steps.name.outputs.name }}
path: ${{ steps.name.outputs.name }}
Expand All @@ -39,7 +39,7 @@ runs:
shell: bash

- name: ⏫ Upload Release Asset
uses: actions/github-script@v6
uses: actions/github-script@v9
with:
github-token: ${{ inputs.token }}
result-encoding: json
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
continue-on-error: true

- name: Download scripts/out
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: scripts-out
path: ${{github.workspace}}/modules/GodotJS/scripts/out
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/build_ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# JSC isn't working at the moment
# engine: [ v8, qjs-ng, jsc ]
engine: [ v8, qjs-ng ]
engine: [ v8, qjs-ng, jsc ]
target: ${{ inputs.release && fromJSON('["template_release","template_debug"]') || fromJSON('["template_debug"]') }}
steps:
- name: Checkout Godot
Expand Down Expand Up @@ -66,7 +64,7 @@ jobs:
cache-name: ios-${{ matrix.target }}-${{inputs.version}}-${{ matrix.engine }}

- name: Download scripts/out
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: scripts-out
path: ${{github.workspace}}/modules/GodotJS/scripts/out
Expand All @@ -80,6 +78,7 @@ jobs:
scons-flags: >-
${{ env.SCONS_FLAGS }}
${{ matrix.engine == 'qjs-ng' && 'use_quickjs_ng=yes' || '' }}
${{ matrix.engine == 'jsc' && 'use_jsc=yes' || '' }}
platform: ios
target: ${{ matrix.target }}

Expand Down
29 changes: 21 additions & 8 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,11 @@ jobs:
continue-on-error: true

- name: Download scripts/out
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: scripts-out
path: ${{github.workspace}}/modules/GodotJS/scripts/out

- name: Download tests/project
if: ${{ !inputs.release && matrix.target == 'editor' }}
uses: actions/download-artifact@v4
with:
name: tests-project
path: ${{github.workspace}}/modules/GodotJS/tests/project/.godot/GodotJS

- name: Setup Python and SCons
uses: ./.github/actions/godot-deps

Expand Down Expand Up @@ -129,6 +122,26 @@ jobs:
${{ !inputs.release && matrix.target == 'editor' && 'tests=yes' || '' }}
platform: linuxbsd

- name: Setup pnpm
if: ${{ !inputs.release && matrix.target == 'editor' }}
uses: pnpm/action-setup@v6
with:
version: 10.11.0

- name: Setup Node.js
if: ${{ !inputs.release && matrix.target == 'editor' }}
uses: actions/setup-node@v5
with:
node-version: 24

- name: Build tests/project
if: ${{ !inputs.release && matrix.target == 'editor' }}
shell: bash
run: |
set -euo pipefail
pnpm -C "${{ github.workspace }}/modules/GodotJS/tests/project" install --ignore-workspace
GODOT="${{ github.workspace }}/bin/godot.linuxbsd.editor.x86_64" pnpm -C "${{ github.workspace }}/modules/GodotJS/tests/project" build

- name: Save Godot build cache
uses: ./.github/actions/godot-cache-save
with:
Expand Down
50 changes: 35 additions & 15 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
matrix:
engine: [v8, qjs-ng]
engine: [v8, qjs-ng, jsc]
target: ${{ inputs.release && fromJSON('["editor","template_release","template_debug"]') || fromJSON('["editor"]') }}
steps:
# From https://github.com/actions/runner-images/blob/main/images/macos
Expand Down Expand Up @@ -96,32 +96,29 @@ jobs:
run: |
if sh misc/scripts/install_vulkan_sdk_macos.sh; then
echo "VULKAN_ENABLED=yes" >> "$GITHUB_OUTPUT"
latest_sdk="$(ls -dt "$HOME"/VulkanSDK/* 2>/dev/null | head -n1 || true)"
echo "VULKAN_SDK_PATH=$latest_sdk" >> "$GITHUB_OUTPUT"
else
echo "::warning::macOS: Vulkan SDK installation failed, building without Vulkan support."
echo "VULKAN_ENABLED=no" >> "$GITHUB_OUTPUT"
echo "VULKAN_SDK_PATH=" >> "$GITHUB_OUTPUT"
fi
continue-on-error: true

- name: Download scripts/out
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: scripts-out
path: ${{github.workspace}}/modules/GodotJS/scripts/out

- name: Download tests/project
if: ${{ !inputs.release && matrix.target == 'editor' }}
uses: actions/download-artifact@v4
with:
name: tests-project
path: ${{github.workspace}}/modules/GodotJS/tests/project/.godot/GodotJS

- name: Compilation (x86_64)
uses: ./.github/actions/godot-build
with:
scons-flags: >-
${{ env.SCONS_FLAGS }}
${{ matrix.target != 'editor' && 'debug_symbols=no' || '' }}
${{ matrix.engine == 'qjs-ng' && 'use_quickjs_ng=yes' || '' }}
${{ matrix.engine == 'jsc' && 'use_jsc=yes' || '' }}
arch=x86_64
vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }}
${{ !inputs.release && matrix.target == 'editor' && 'tests=yes' || '' }}
Expand All @@ -135,6 +132,7 @@ jobs:
${{ env.SCONS_FLAGS }}
${{ matrix.target != 'editor' && 'debug_symbols=no' || '' }}
${{ matrix.engine == 'qjs-ng' && 'use_quickjs_ng=yes' || '' }}
${{ matrix.engine == 'jsc' && 'use_jsc=yes' || '' }}
arch=arm64
vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }}
${{ !inputs.release && matrix.target == 'editor' && 'tests=yes' || '' }}
Expand All @@ -160,6 +158,28 @@ jobs:
strip bin/godot.*
chmod +x bin/godot.*

- name: Setup pnpm
if: ${{ !inputs.release && matrix.target == 'editor' }}
uses: pnpm/action-setup@v6
with:
version: 10.11.0

- name: Setup Node.js
if: ${{ !inputs.release && matrix.target == 'editor' }}
uses: actions/setup-node@v5
with:
node-version: 24

- name: Build tests/project
if: ${{ !inputs.release && matrix.target == 'editor' }}
shell: bash
env:
VULKAN_SDK_PATH: ${{ steps.vulkan-sdk.outputs.VULKAN_SDK_PATH }}
run: |
set -euo pipefail
pnpm -C "${{ github.workspace }}/modules/GodotJS/tests/project" install --ignore-workspace
GODOT="${{ github.workspace }}/bin/godot.macos.editor.universal" pnpm -C "${{ github.workspace }}/modules/GodotJS/tests/project" build

- name: Upload artifact
uses: ./.github/actions/upload-artifact
with:
Expand All @@ -181,7 +201,7 @@ jobs:
strategy:
fail-fast: false
matrix:
engine: [v8, qjs-ng]
engine: [v8, qjs-ng, jsc]
steps:
- name: Checkout Godot
uses: actions/checkout@v6
Expand All @@ -191,7 +211,7 @@ jobs:
submodules: recursive

- name: ⏬ Download editor
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: macos-editor-${{inputs.version}}-${{ matrix.engine }}
path: macos-editor-${{inputs.version}}-${{ matrix.engine }}
Expand All @@ -205,20 +225,20 @@ jobs:
chmod +x editor-app/Godot.app/Contents/MacOS/Godot

- name: ⏫ Upload editor app
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: macos-editor-app-${{inputs.version}}-${{ matrix.engine }}
path: editor-app

- name: ⏬ Download template-release
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
if: ${{ inputs.release }}
with:
name: macos-template_release-${{inputs.version}}-${{ matrix.engine }}
path: macos-template_release-${{inputs.version}}-${{ matrix.engine }}

- name: ⏬ Download template-debug
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
if: ${{ inputs.release }}
with:
name: macos-template_debug-${{inputs.version}}-${{ matrix.engine }}
Expand All @@ -236,7 +256,7 @@ jobs:

- name: ⏫ Upload template app
if: ${{ inputs.release }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: macos-template-app-${{inputs.version}}-${{ matrix.engine }}
path: template-app
4 changes: 2 additions & 2 deletions .github/workflows/build_web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ jobs:
submodules: recursive

- name: Download scripts/out
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: scripts-out
path: ${{github.workspace}}/modules/GodotJS/scripts/out

- name: Download impl/web/js
if: matrix.engine == 'browser'
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: impl-web-js
path: ${{github.workspace}}/modules/GodotJS/impl/web/js
Expand Down
29 changes: 21 additions & 8 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,18 +66,11 @@ jobs:
continue-on-error: true

- name: Download scripts/out
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: scripts-out
path: ${{github.workspace}}/modules/GodotJS/scripts/out

- name: Download tests/project
if: ${{ !inputs.release && matrix.target == 'editor' }}
uses: actions/download-artifact@v4
with:
name: tests-project
path: ${{github.workspace}}/modules/GodotJS/tests/project/.godot/GodotJS

- name: Setup Python and SCons
uses: ./.github/actions/godot-deps

Expand Down Expand Up @@ -151,6 +144,26 @@ jobs:
run: |
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force

- name: Setup pnpm
if: ${{ !inputs.release && matrix.target == 'editor' }}
uses: pnpm/action-setup@v6
with:
version: 10.11.0

- name: Setup Node.js
if: ${{ !inputs.release && matrix.target == 'editor' }}
uses: actions/setup-node@v5
with:
node-version: 24

- name: Build tests/project
if: ${{ !inputs.release && matrix.target == 'editor' }}
shell: pwsh
run: |
$env:GODOT = "${{ github.workspace }}/bin/godot.windows.editor.x86_64.exe"
pnpm -C "${{ github.workspace }}/modules/GodotJS/tests/project" install --ignore-workspace
pnpm -C "${{ github.workspace }}/modules/GodotJS/tests/project" build

- name: Upload artifact
uses: ./.github/actions/upload-artifact
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/misc_changesets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
uses: actions/checkout@v6

- name: 🛫 Setup pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6

- name: 🦕❌ Setup node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 20
node-version: 24
cache: "pnpm"

- name: 🛠️ Install dependencies
Expand Down
20 changes: 9 additions & 11 deletions .github/workflows/misc_environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,23 @@ jobs:
- name: ⏬ Checkout repository
uses: actions/checkout@v6

- name: 🛠️ pnpm and build
uses: ./.github/actions/pnpm-build
- name: 🛠️ pnpm install
uses: ./.github/actions/pnpm-install

- name: 🛠️ pnpm build
run: |
pnpm build
shell: bash

- name: ⬆️ Upload scripts/out
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: scripts-out
path: ${{github.workspace}}/scripts/out
retention-days: 10

- name: ⬆️ Upload tests/project
uses: actions/upload-artifact@v4
with:
name: tests-project
path: ${{github.workspace}}/tests/project/.godot/GodotJS
retention-days: 10

- name: ⬆️ Upload impl/web/js
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: impl-web-js
path: ${{github.workspace}}/impl/web/js
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/misc_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
uses: actions/checkout@v6

- name: 🛫 Setup pnpm
uses: pnpm/action-setup@v4
uses: pnpm/action-setup@v6

- name: 🦕❌ Setup node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: 22
node-version: 25
cache: "pnpm"

- name: 🔄️ Install dependencies
Expand Down
Loading
Loading