2022-08-28 20:27:45 +02:00
|
|
|
name: 🌐 Web Builds
|
2023-04-04 15:56:53 +02:00
|
|
|
on:
|
|
|
|
workflow_call:
|
2020-07-23 23:21:26 +02:00
|
|
|
|
2020-10-09 22:18:51 +02:00
|
|
|
# Global Settings
|
2020-07-23 23:21:26 +02:00
|
|
|
env:
|
2023-05-18 16:22:25 +02:00
|
|
|
# Used for the cache key. Add version suffix to force clean build.
|
2020-07-24 08:20:42 +02:00
|
|
|
GODOT_BASE_BRANCH: master
|
2021-09-01 17:26:01 +02:00
|
|
|
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no
|
2024-05-08 01:10:23 +02:00
|
|
|
EM_VERSION: 3.1.59
|
2021-09-01 17:26:01 +02:00
|
|
|
EM_CACHE_FOLDER: "emsdk-cache"
|
2020-07-23 23:21:26 +02:00
|
|
|
|
2021-08-24 20:49:06 +02:00
|
|
|
concurrency:
|
2022-08-28 20:27:45 +02:00
|
|
|
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-web
|
2021-08-24 20:49:06 +02:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-07-23 23:21:26 +02:00
|
|
|
jobs:
|
2022-08-28 20:27:45 +02:00
|
|
|
web-template:
|
2023-09-05 14:56:53 +02:00
|
|
|
runs-on: "ubuntu-22.04"
|
2023-12-01 19:39:09 +01:00
|
|
|
name: ${{ matrix.name }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- name: Template w/ threads (target=template_release, threads=yes)
|
|
|
|
cache-name: web-template
|
|
|
|
target: template_release
|
|
|
|
sconsflags: threads=yes
|
|
|
|
tests: false
|
|
|
|
artifact: true
|
|
|
|
|
|
|
|
- name: Template w/o threads (target=template_release, threads=no)
|
|
|
|
cache-name: web-nothreads-template
|
|
|
|
target: template_release
|
|
|
|
sconsflags: threads=no
|
|
|
|
tests: false
|
|
|
|
artifact: true
|
2020-07-23 23:21:26 +02:00
|
|
|
|
|
|
|
steps:
|
2023-09-04 16:05:38 +02:00
|
|
|
- uses: actions/checkout@v4
|
2024-03-16 03:52:47 +01:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2020-07-23 23:21:26 +02:00
|
|
|
|
|
|
|
- name: Set up Emscripten latest
|
2024-01-25 12:13:22 +01:00
|
|
|
uses: mymindstorm/setup-emsdk@v14
|
2020-07-23 23:21:26 +02:00
|
|
|
with:
|
|
|
|
version: ${{env.EM_VERSION}}
|
|
|
|
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
|
2024-01-25 12:13:22 +01:00
|
|
|
cache-key: emsdk-${{ matrix.cache-name }}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
2020-07-23 23:21:26 +02:00
|
|
|
|
|
|
|
- name: Verify Emscripten setup
|
|
|
|
run: |
|
|
|
|
emcc -v
|
|
|
|
|
2021-09-01 17:26:01 +02:00
|
|
|
- name: Setup Godot build cache
|
|
|
|
uses: ./.github/actions/godot-cache
|
2023-12-01 19:39:09 +01:00
|
|
|
with:
|
|
|
|
cache-name: ${{ matrix.cache-name }}
|
2021-09-01 17:26:01 +02:00
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
- name: Setup python and scons
|
|
|
|
uses: ./.github/actions/godot-deps
|
2020-09-29 23:42:41 +02:00
|
|
|
|
2021-09-01 17:26:01 +02:00
|
|
|
- name: Compilation
|
|
|
|
uses: ./.github/actions/godot-build
|
2020-09-29 23:42:41 +02:00
|
|
|
with:
|
2023-12-01 19:39:09 +01:00
|
|
|
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
|
2022-08-28 20:27:45 +02:00
|
|
|
platform: web
|
2023-12-01 19:39:09 +01:00
|
|
|
target: ${{ matrix.target }}
|
|
|
|
tests: ${{ matrix.tests }}
|
2021-09-01 17:26:01 +02:00
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: ./.github/actions/upload-artifact
|
2023-12-01 19:39:09 +01:00
|
|
|
if: ${{ matrix.artifact }}
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.cache-name }}
|