2022-08-29 02:27:45 +08:00
|
|
|
name: 🌐 Web Builds
|
2023-04-04 21:56:53 +08:00
|
|
|
on:
|
|
|
|
workflow_call:
|
2020-07-24 05:21:26 +08:00
|
|
|
|
2020-10-10 04:18:51 +08:00
|
|
|
# Global Settings
|
2020-07-24 05:21:26 +08:00
|
|
|
env:
|
2023-05-18 22:22:25 +08:00
|
|
|
# Used for the cache key. Add version suffix to force clean build.
|
2020-07-24 14:20:42 +08:00
|
|
|
GODOT_BASE_BRANCH: master
|
2024-08-29 23:33:29 +08:00
|
|
|
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no use_closure_compiler=yes strict_checks=yes
|
2024-08-08 17:17:35 +08:00
|
|
|
EM_VERSION: 3.1.64
|
2020-07-24 05:21:26 +08:00
|
|
|
|
2021-08-25 02:49:06 +08:00
|
|
|
concurrency:
|
2024-07-08 23:41:20 +08:00
|
|
|
group: ci-${{ github.actor }}-${{ github.head_ref || github.run_number }}-${{ github.ref }}-web
|
2021-08-25 02:49:06 +08:00
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-07-24 05:21:26 +08:00
|
|
|
jobs:
|
2022-08-29 02:27:45 +08:00
|
|
|
web-template:
|
2024-11-06 23:42:02 +08:00
|
|
|
runs-on: ubuntu-24.04
|
2023-12-02 02:39:09 +08: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-24 05:21:26 +08:00
|
|
|
|
|
|
|
steps:
|
2024-07-08 23:41:20 +08:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
2024-03-16 10:52:47 +08:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2020-07-24 05:21:26 +08:00
|
|
|
|
|
|
|
- name: Set up Emscripten latest
|
2024-01-25 19:13:22 +08:00
|
|
|
uses: mymindstorm/setup-emsdk@v14
|
2020-07-24 05:21:26 +08:00
|
|
|
with:
|
2024-07-08 23:41:20 +08:00
|
|
|
version: ${{ env.EM_VERSION }}
|
2024-11-08 21:22:21 +08:00
|
|
|
no-cache: true
|
2020-07-24 05:21:26 +08:00
|
|
|
|
|
|
|
- name: Verify Emscripten setup
|
|
|
|
run: |
|
|
|
|
emcc -v
|
|
|
|
|
2024-07-13 21:50:30 +08:00
|
|
|
- name: Restore Godot build cache
|
|
|
|
uses: ./.github/actions/godot-cache-restore
|
2023-12-02 02:39:09 +08:00
|
|
|
with:
|
|
|
|
cache-name: ${{ matrix.cache-name }}
|
2021-09-01 23:26:01 +08:00
|
|
|
continue-on-error: true
|
|
|
|
|
2024-05-17 15:28:56 +08:00
|
|
|
- name: Setup Python and SCons
|
2021-09-01 23:26:01 +08:00
|
|
|
uses: ./.github/actions/godot-deps
|
2020-09-30 05:42:41 +08:00
|
|
|
|
2021-09-01 23:26:01 +08:00
|
|
|
- name: Compilation
|
|
|
|
uses: ./.github/actions/godot-build
|
2020-09-30 05:42:41 +08:00
|
|
|
with:
|
2023-12-02 02:39:09 +08:00
|
|
|
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
|
2022-08-29 02:27:45 +08:00
|
|
|
platform: web
|
2023-12-02 02:39:09 +08:00
|
|
|
target: ${{ matrix.target }}
|
|
|
|
tests: ${{ matrix.tests }}
|
2021-09-01 23:26:01 +08:00
|
|
|
|
2024-07-13 21:50:30 +08:00
|
|
|
- name: Save Godot build cache
|
|
|
|
uses: ./.github/actions/godot-cache-save
|
|
|
|
with:
|
|
|
|
cache-name: ${{ matrix.cache-name }}
|
|
|
|
continue-on-error: true
|
|
|
|
|
2021-09-01 23:26:01 +08:00
|
|
|
- name: Upload artifact
|
|
|
|
uses: ./.github/actions/upload-artifact
|
2024-07-08 23:41:20 +08:00
|
|
|
if: matrix.artifact
|
2023-12-02 02:39:09 +08:00
|
|
|
with:
|
|
|
|
name: ${{ matrix.cache-name }}
|