Skip to content

Commit 7f38a25

Browse files
committed
github: Remove wasm32...custom target
Removes the -custom target in favor of passing args to the wasm32 build Pipelines the Wasm testing better Adds a Wasm32 Xbox build too
1 parent 2f7adbd commit 7f38a25

3 files changed

Lines changed: 62 additions & 28 deletions

File tree

.cmake/CMakePresets.wasm.json

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,6 @@
6363
"displayName": "Wasm32 for Web + WebGL2 (SDL2)",
6464
"inherits": ["vcpkg-base-emscripten"]
6565
},
66-
{
67-
"name": "web-wasm32-emscripten-webgl2-custom",
68-
"displayName": "Wasm32 for Web + WebGL2 (SDL2)",
69-
"inherits": ["vcpkg-base-emscripten"],
70-
"cacheVariables": {
71-
"BLAM_HALO_VERSION": "custom_version_t"
72-
}
73-
},
7466
{
7567
"name": "web-wasm64-emscripten-webgl2",
7668
"displayName": "Wasm64 for Web + WebGL2 (SDL2)",
@@ -96,18 +88,6 @@
9688
"configurePreset": "web-wasm32-emscripten-webgl2",
9789
"inherits": "base-linux"
9890
},
99-
{
100-
"name": "web-wasm32-emscripten-webgl2-custom-dbg",
101-
"environment": {"BUILD_TYPE":"Debug"},
102-
"configurePreset": "web-wasm32-emscripten-webgl2-custom",
103-
"inherits": "base-linux"
104-
},
105-
{
106-
"name": "web-wasm32-emscripten-webgl2-custom-rel",
107-
"environment": {"BUILD_TYPE":"Release"},
108-
"configurePreset": "web-wasm32-emscripten-webgl2-custom",
109-
"inherits": "base-linux"
110-
},
11191
{
11292
"name": "web-wasm64-emscripten-webgl2-dbg",
11393
"environment": {"BUILD_TYPE":"Debug"},

.github/actions/build-project/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,18 @@ inputs:
1111
description: Optional URL passed as EMBEDDED_REPORT_URL to the build
1212
required: false
1313
default: ''
14+
args:
15+
description: Additional CMake build args
16+
required: false
17+
default: ''
1418
runs:
1519
using: composite
1620
steps:
1721
- name: Building project
1822
id: buildProject
1923
continue-on-error: true
2024
shell: bash
21-
run: source/cb build ${{ inputs.variant }}/install
25+
run: source/cb build ${{ inputs.variant }}/install -- ${{ inputs.args }}
2226
env:
2327
BUILD_HOST_TOOLS: no
2428
EMBEDDED_REPORT_URL: ${{ inputs.embedded_report_url }}

.github/workflows/10-compile.yml

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ jobs:
6565
artifact: desktop-x86_64-buildroot-linux-gnu-multi
6666
- variant: desktop:x86_64-w64-mingw32:posix:rel
6767
artifact: desktop-x86_64-w64-mingw32-posix
68-
- variant: web:wasm32-emscripten:webgl2:rel
69-
artifact: web-wasm32-emscripten-webgl2
70-
- variant: web:wasm32-emscripten:webgl2-custom:rel
71-
artifact: web-wasm32-emscripten-webgl2-custom
72-
- variant: web:wasm64-emscripten:webgl2:rel
73-
artifact: web-wasm64-emscripten-webgl2
7468
env:
7569
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7670
MAP_ACCESS_TOKEN: ${{ secrets.MAP_ACCESS_TOKEN }}
@@ -124,6 +118,62 @@ jobs:
124118
!source/multi_build/${{matrix.artifact}}/install/lib/*.a
125119
source/multi_build/${{matrix.artifact}}/install/packaged
126120
if-no-files-found: error
121+
WebAssembly:
122+
runs-on: ubuntu-latest
123+
needs: Linux_HostTools
124+
strategy:
125+
fail-fast: false
126+
matrix:
127+
include:
128+
- variant: web:wasm32-emscripten:webgl2:rel
129+
build: web-wasm32-emscripten-webgl2
130+
args: ''
131+
artifact: web-wasm32-emscripten-webgl2
132+
- variant: web:wasm32-emscripten:webgl2:rel
133+
build: web-wasm32-emscripten-webgl2
134+
args: '-DBLAM_HALO_VERSION=custom_version_t'
135+
artifact: web-wasm32-emscripten-webgl2-custom
136+
- variant: web:wasm32-emscripten:webgl2:rel
137+
build: web-wasm32-emscripten-webgl2
138+
args: '-DBLAM_HALO_VERSION=xbox_version_t'
139+
artifact: web-wasm32-emscripten-webgl2-xbox
140+
- variant: web:wasm64-emscripten:webgl2:rel
141+
build: web-wasm64-emscripten-webgl2
142+
args: ''
143+
artifact: web-wasm64-emscripten-webgl2
144+
env:
145+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
146+
MAP_ACCESS_TOKEN: ${{ secrets.MAP_ACCESS_TOKEN }}
147+
name: ${{ matrix.variant }}
148+
steps:
149+
- uses: actions/checkout@v6
150+
with:
151+
submodules: true
152+
path: source
153+
- uses: ./source/.github/actions/cmake-setup
154+
- name: Installing build-essential
155+
run: |
156+
sudo rm /etc/apt/sources.list.d/microsoft-prod.list
157+
sudo apt-get update
158+
sudo apt install build-essential inkscape nasm
159+
- name: Host tools cache
160+
uses: actions/cache@v5
161+
with:
162+
path: source/multi_build/host-x64-linux-native
163+
key: host-tools-${{ runner.os }}-${{ hashFiles('source/tools','toolchain/building.py','vcpkg.json','vcpkg-configuration.json') }}
164+
fail-on-cache-miss: true
165+
- uses: ./source/.github/actions/build-project
166+
with:
167+
variant: ${{ matrix.variant }}
168+
artifact: ${{ matrix.artifact }}
169+
args: ${{ matrix.args }}
170+
embedded_report_url: "https://reports.speen.dev"
171+
- name: Uploading artifacts
172+
uses: actions/upload-artifact@v7
173+
with:
174+
name: ${{matrix.artifact}}
175+
path: source/multi_build/${{matrix.build}}/install/bin
176+
if-no-files-found: error
127177
macOS_HostTools:
128178
runs-on: macos-latest
129179
needs: Release
@@ -256,7 +306,7 @@ jobs:
256306
Test_wasm_swiftshader:
257307
if: ${{ always() }}
258308
name: "Software render test (SwiftShader, ${{ matrix.variant }}-emscripten, WebGL2)"
259-
needs: Linux
309+
needs: WebAssembly
260310
runs-on: ubuntu-latest
261311
permissions:
262312
actions: read

0 commit comments

Comments
 (0)