Skip to content

Commit

Permalink
Add web build to build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
2shady4u committed Jan 29, 2024
1 parent 1099339 commit f31d1ff
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ env:
TARGET_NAME: libgdsqlite
VAR_PATH: .github/workflows/build_var.json
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
EM_VERSION: 3.1.39
EM_CACHE_FOLDER: "emsdk-cache"

jobs:
matrix:
Expand Down Expand Up @@ -65,6 +67,13 @@ jobs:
ndk-version: r23c
link-to-sdk: true

- name: Web dependencies
if: ${{ matrix.platform == 'web' }}
uses: mymindstorm/setup-emsdk@v13
with:
version: ${{ env.EM_VERSION }}
actions-cache-folder: ${{ env.EM_CACHE_FOLDER }}-${{ matrix.target }}

# Setup scons, print python version and scons version info, so if anything is broken it won't run the build.
- name: Configuring Python packages
run: |
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/build_var.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@
"artifact-extension": "dylib",
"flags": "arch=arm64",
"cache-name": "ios-arm64"
},
{
"name": "Web (wasm32)",
"os": "ubuntu-20.04",
"platform": "web",
"artifact-extension": "wasm",
"cache-name": "web-wasm32"
}
]
}
6 changes: 5 additions & 1 deletion demo/addons/godot-sqlite/gdsqlite.gdextension
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ android.arm64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_debu
android.template_release.arm64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_release.arm64.so"
android.x86_64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_debug.x86_64.so"
android.template_release.x86_64 = "res://addons/godot-sqlite/bin/libgdsqlite.android.template_release.x86_64.so"
web.wasm32 = "res://addons/godot-sqlite/bin/libgdsqlite.web.template_debug.wasm32.wasm"
web.template_release.wasm32 = "res://addons/godot-sqlite/bin/libgdsqlite.web.template_release.wasm32.wasm"

[dependencies]

Expand All @@ -27,4 +29,6 @@ linux.template_release.x86_64 = {}
android.arm64 = {}
android.template_release.arm64 = {}
android.x86_64 = {}
android.template_release.x86_64 = {}
android.template_release.x86_64 = {}
web.wasm32 = {}
web.template_release.wasm32 = {}
2 changes: 1 addition & 1 deletion demo/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ config_version=5

config/name="SQLite Demo"
run/main_scene="res://Main.tscn"
config/features=PackedStringArray("4.1")
config/features=PackedStringArray("4.2")
config/icon="res://icon.png"

[debug]
Expand Down

0 comments on commit f31d1ff

Please sign in to comment.