godot-module-template/engine/.github/workflows/web_builds.yml
Sara c3f9669b10 Add 'engine/' from commit 'a8e37fc010'
git-subtree-dir: engine
git-subtree-mainline: b74841629e
git-subtree-split: a8e37fc010
2026-03-13 11:22:19 +01:00

77 lines
2 KiB
YAML

name: 🌐 Web Builds
on:
workflow_call:
workflow_dispatch:
# Global Settings
env:
SCONS_FLAGS: >-
dev_mode=yes
debug_symbols=no
use_closure_compiler=yes
EM_VERSION: 4.0.11
jobs:
web-template:
runs-on: ubuntu-24.04
name: ${{ matrix.name }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- name: Template w/ threads, 64-bit (target=template_release, threads=yes, arch=wasm64)
cache-name: web-template
target: template_release
scons-flags: threads=yes arch=wasm64
artifact: true
- name: Template w/o threads, 32-bit (target=template_release, threads=no, arch=wasm32)
cache-name: web-nothreads-template
target: template_release
scons-flags: threads=no arch=wasm32
artifact: true
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Emscripten latest
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{ env.EM_VERSION }}
no-cache: true
- name: Verify Emscripten setup
run: |
emcc -v
- name: Restore Godot build cache
uses: ./.github/actions/godot-cache-restore
with:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true
- name: Setup Python and SCons
uses: ./.github/actions/godot-deps
- name: Compilation
uses: ./.github/actions/godot-build
with:
scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.scons-flags }}
platform: web
target: ${{ matrix.target }}
- name: Save Godot build cache
uses: ./.github/actions/godot-cache-save
with:
cache-name: ${{ matrix.cache-name }}
continue-on-error: true
- name: Upload artifact
uses: ./.github/actions/upload-artifact
if: matrix.artifact
with:
name: ${{ matrix.cache-name }}