Skip to content

Commit f31d1ff

Browse files
committed
Add web build to build.yml
1 parent 1099339 commit f31d1ff

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ env:
1212
TARGET_NAME: libgdsqlite
1313
VAR_PATH: .github/workflows/build_var.json
1414
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
15+
EM_VERSION: 3.1.39
16+
EM_CACHE_FOLDER: "emsdk-cache"
1517

1618
jobs:
1719
matrix:
@@ -65,6 +67,13 @@ jobs:
6567
ndk-version: r23c
6668
link-to-sdk: true
6769

70+
- name: Web dependencies
71+
if: ${{ matrix.platform == 'web' }}
72+
uses: mymindstorm/setup-emsdk@v13
73+
with:
74+
version: ${{ env.EM_VERSION }}
75+
actions-cache-folder: ${{ env.EM_CACHE_FOLDER }}-${{ matrix.target }}
76+
6877
# Setup scons, print python version and scons version info, so if anything is broken it won't run the build.
6978
- name: Configuring Python packages
7079
run: |

.github/workflows/build_var.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,13 @@
5050
"artifact-extension": "dylib",
5151
"flags": "arch=arm64",
5252
"cache-name": "ios-arm64"
53+
},
54+
{
55+
"name": "Web (wasm32)",
56+
"os": "ubuntu-20.04",
57+
"platform": "web",
58+
"artifact-extension": "wasm",
59+
"cache-name": "web-wasm32"
5360
}
5461
]
5562
}

demo/addons/godot-sqlite/gdsqlite.gdextension

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ android.arm64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_debu
1515
android.template_release.arm64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_release.arm64.so"
1616
android.x86_64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_debug.x86_64.so"
1717
android.template_release.x86_64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_release.x86_64.so"
18+
web.wasm32 = "res://addons/godot-sqlite/bin/libgdsqlite.web.template_debug.wasm32.wasm"
19+
web.template_release.wasm32 = "res://addons/godot-sqlite/bin/libgdsqlite.web.template_release.wasm32.wasm"
1820

1921
[dependencies]
2022

@@ -27,4 +29,6 @@ linux.template_release.x86_64 = {}
2729
android.arm64 = {}
2830
android.template_release.arm64 = {}
2931
android.x86_64 = {}
30-
android.template_release.x86_64 = {}
32+
android.template_release.x86_64 = {}
33+
web.wasm32 = {}
34+
web.template_release.wasm32 = {}

demo/project.godot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ config_version=5
1212

1313
config/name="SQLite Demo"
1414
run/main_scene="res://Main.tscn"
15-
config/features=PackedStringArray("4.1")
15+
config/features=PackedStringArray("4.2")
1616
config/icon="res://icon.png"
1717

1818
[debug]

0 commit comments

Comments
 (0)