Skip to content

Commit 0a888c2

Browse files
authored
chore: enable web-dlink builds for release (#159)
* chore: enable web-dlink builds for release chore: only build one target for main and PRs chore: rename web builds for nothreads * fix: bad yml syntax * fix: wrong inputs for release * fix: issue with fromJSON for workflows
1 parent 6b653f0 commit 0a888c2

9 files changed

Lines changed: 66 additions & 48 deletions

.github/workflows/build_android.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: 🤖 Android Builds
22
on:
33
workflow_call:
44
inputs:
5+
release:
6+
required: true
7+
type: boolean
58
version:
69
required: true
710
type: string
@@ -39,9 +42,8 @@ jobs:
3942
strategy:
4043
fail-fast: false
4144
matrix:
42-
engine: [v8, qjs-ng]
43-
target: [template_release, template_debug]
44-
45+
engine: [ v8, qjs-ng ]
46+
target: ${{ inputs.release && fromJSON('["template_release","template_debug"]') || fromJSON('["template_debug"]') }}
4547
steps:
4648
- name: Checkout Godot
4749
uses: actions/checkout@v4

.github/workflows/build_engine_version.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ on:
1010
description: "Godot engine commit reference"
1111
required: true
1212
type: string
13-
tests:
13+
release:
1414
type: boolean
15-
default: true
15+
default: false
1616

1717
jobs:
1818
android-build:
@@ -21,44 +21,47 @@ jobs:
2121
with:
2222
version: ${{ inputs.version }}
2323
version_ref: ${{ inputs.version_ref }}
24+
release: ${{ inputs.release }}
2425

2526
ios-build:
2627
name: 🍏 iOS
2728
uses: ./.github/workflows/build_ios.yml
2829
with:
2930
version: ${{ inputs.version }}
3031
version_ref: ${{ inputs.version_ref }}
32+
release: ${{ inputs.release }}
3133

3234
linux-build:
3335
name: 🐧 Linux
3436
uses: ./.github/workflows/build_linux.yml
3537
with:
3638
version: ${{ inputs.version }}
3739
version_ref: ${{ inputs.version_ref }}
38-
tests: ${{ inputs.tests }}
40+
release: ${{ inputs.release }}
3941

4042
macos-build:
4143
name: 🍎 macOS
4244
uses: ./.github/workflows/build_macos.yml
4345
with:
4446
version: ${{ inputs.version }}
4547
version_ref: ${{ inputs.version_ref }}
46-
tests: ${{ inputs.tests }}
48+
release: ${{ inputs.release }}
4749

4850
windows-build:
4951
name: 🏁 Windows
5052
uses: ./.github/workflows/build_windows.yml
5153
with:
5254
version: ${{ inputs.version }}
5355
version_ref: ${{ inputs.version_ref }}
54-
tests: ${{ inputs.tests }}
56+
release: ${{ inputs.release }}
5557

5658
web-build:
5759
name: 🌐 Web
5860
uses: ./.github/workflows/build_web.yml
5961
with:
6062
version: ${{ inputs.version }}
6163
version_ref: ${{ inputs.version_ref }}
64+
release: ${{ inputs.release }}
6265

6366
checks-done:
6467
if: ${{ always() }}

.github/workflows/build_ios.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: 🍏 iOS Builds
22
on:
33
workflow_call:
44
inputs:
5+
release:
6+
required: true
7+
type: boolean
58
version:
69
required: true
710
type: string
@@ -37,8 +40,7 @@ jobs:
3740
# JSC isn't working at the moment
3841
# engine: [ v8, qjs-ng, jsc ]
3942
engine: [ v8, qjs-ng ]
40-
target: [ template_release, template_debug ]
41-
43+
target: ${{ inputs.release && fromJSON('["template_release","template_debug"]') || fromJSON('["template_debug"]') }}
4244
steps:
4345
- name: Checkout Godot
4446
uses: actions/checkout@v4

.github/workflows/build_linux.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: 🐧 Linux Builds
22
on:
33
workflow_call:
44
inputs:
5+
release:
6+
required: true
7+
type: boolean
58
version:
69
required: true
710
type: string
811
version_ref:
912
description: "Godot engine commit reference"
1013
required: true
1114
type: string
12-
tests:
13-
type: boolean
14-
default: true
1515

1616
# Global Settings
1717
env:
@@ -41,9 +41,8 @@ jobs:
4141
strategy:
4242
fail-fast: false
4343
matrix:
44-
engine: [v8, qjs-ng]
45-
target: [editor, template_release, template_debug]
46-
44+
engine: [ v8, qjs-ng ]
45+
target: ${{ inputs.release && fromJSON('["editor","template_release","template_debug"]') || fromJSON('["editor"]') }}
4746
steps:
4847
- name: Checkout Godot
4948
uses: actions/checkout@v4
@@ -83,7 +82,7 @@ jobs:
8382
path: ${{github.workspace}}/modules/GodotJS/scripts/out
8483

8584
- name: Download tests/project
86-
if: ${{ inputs.tests && matrix.target == 'editor' }}
85+
if: ${{ !inputs.release && matrix.target == 'editor' }}
8786
uses: actions/download-artifact@v4
8887
with:
8988
name: tests-project
@@ -113,7 +112,7 @@ jobs:
113112
${{ env.SCONSFLAGS }}
114113
${{ matrix.target != 'editor' && 'debug_symbols=no' || '' }}
115114
${{ matrix.engine == 'qjs-ng' && 'use_quickjs_ng=yes' || '' }}
116-
${{ inputs.tests && matrix.target == 'editor' && 'tests=yes' || '' }}
115+
${{ !inputs.release && matrix.target == 'editor' && 'tests=yes' || '' }}
117116
platform: linuxbsd
118117
target: ${{ matrix.target }}
119118
scons-cache-limit: ${{ matrix.target == 'editor' && 2 || 1 }}
@@ -126,7 +125,7 @@ jobs:
126125
${{ env.SCONS_FLAGS }}
127126
${{ matrix.target != 'editor' && 'debug_symbols=no' || '' }}
128127
${{ matrix.engine == 'qjs-ng' && 'use_quickjs_ng=yes' || '' }}
129-
${{ inputs.tests && matrix.target == 'editor' && 'tests=yes' || '' }}
128+
${{ !inputs.release && matrix.target == 'editor' && 'tests=yes' || '' }}
130129
platform: linuxbsd
131130

132131
- name: Save Godot build cache
@@ -146,7 +145,7 @@ jobs:
146145
name: linux-${{ matrix.target }}-${{inputs.version}}-${{ matrix.engine }}
147146

148147
- name: Unit tests
149-
if: ${{ inputs.tests && matrix.target == 'editor' }}
148+
if: ${{ !inputs.release && matrix.target == 'editor' }}
150149
env:
151150
BIN: ./bin/godot.linuxbsd.editor.x86_64
152151
run: |

.github/workflows/build_macos.yml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ name: 🍎 macOS Builds
22
on:
33
workflow_call:
44
inputs:
5+
release:
6+
required: true
7+
type: boolean
58
version:
69
required: true
710
type: string
811
version_ref:
912
description: "Godot engine commit reference"
1013
required: true
1114
type: string
12-
tests:
13-
type: boolean
14-
default: true
1515

1616
# Global Settings
1717
env:
@@ -37,8 +37,7 @@ jobs:
3737
fail-fast: false
3838
matrix:
3939
engine: [v8, qjs-ng]
40-
target: [editor, template_release, template_debug]
41-
40+
target: ${{ inputs.release && fromJSON('["editor","template_release","template_debug"]') || fromJSON('["editor"]') }}
4241
steps:
4342
- name: Select Xcode 16
4443
run: sudo xcode-select -s /Applications/Xcode_16.2.app
@@ -97,7 +96,7 @@ jobs:
9796
path: ${{github.workspace}}/modules/GodotJS/scripts/out
9897

9998
- name: Download tests/project
100-
if: ${{ inputs.tests && matrix.target == 'editor' }}
99+
if: ${{ !inputs.release && matrix.target == 'editor' }}
101100
uses: actions/download-artifact@v4
102101
with:
103102
name: tests-project
@@ -113,7 +112,7 @@ jobs:
113112
${{ matrix.engine == 'qjs-ng' && 'use_quickjs_ng=yes' || '' }}
114113
arch=x86_64
115114
vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }}
116-
${{ inputs.tests && matrix.target == 'editor' && 'tests=yes' || '' }}
115+
${{ !inputs.release && matrix.target == 'editor' && 'tests=yes' || '' }}
117116
platform: macos
118117
target: ${{ matrix.target }}
119118
scons-cache-limit: 0 # Only cap on second run to avoid purging unnecessarily
@@ -128,7 +127,7 @@ jobs:
128127
${{ matrix.engine == 'qjs-ng' && 'use_quickjs_ng=yes' || '' }}
129128
arch=x86_64
130129
vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }}
131-
${{ inputs.tests && matrix.target == 'editor' && 'tests=yes' || '' }}
130+
${{ !inputs.release && matrix.target == 'editor' && 'tests=yes' || '' }}
132131
platform: macos
133132
target: ${{ matrix.target }}
134133

@@ -142,7 +141,7 @@ jobs:
142141
${{ matrix.engine == 'qjs-ng' && 'use_quickjs_ng=yes' || '' }}
143142
arch=arm64
144143
vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }}
145-
${{ inputs.tests && matrix.target == 'editor' && 'tests=yes' || '' }}
144+
${{ !inputs.release && matrix.target == 'editor' && 'tests=yes' || '' }}
146145
platform: macos
147146
target: ${{ matrix.target }}
148147
scons-cache-limit: ${{ matrix.target == 'editor' && 2 || 1 }}
@@ -157,7 +156,7 @@ jobs:
157156
${{ matrix.engine == 'qjs-ng' && 'use_quickjs_ng=yes' || '' }}
158157
arch=arm64
159158
vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }}
160-
${{ inputs.tests && matrix.target == 'editor' && 'tests=yes' || '' }}
159+
${{ !inputs.release && matrix.target == 'editor' && 'tests=yes' || '' }}
161160
platform: macos
162161
target: ${{ matrix.target }}
163162

@@ -185,7 +184,7 @@ jobs:
185184
name: macos-${{ matrix.target }}-${{inputs.version}}-${{ matrix.engine }}
186185

187186
- name: Unit tests
188-
if: ${{ inputs.tests && matrix.target == 'editor' }}
187+
if: ${{ !inputs.release && matrix.target == 'editor' }}
189188
env:
190189
BIN: ./bin/godot.macos.editor.universal
191190
run: |
@@ -231,17 +230,20 @@ jobs:
231230

232231
- name: ⏬ Download template-release
233232
uses: actions/download-artifact@v4
233+
if: ${{ inputs.release }}
234234
with:
235235
name: macos-template_release-${{inputs.version}}-${{ matrix.engine }}
236236
path: macos-template_release-${{inputs.version}}-${{ matrix.engine }}
237237

238238
- name: ⏬ Download template-debug
239239
uses: actions/download-artifact@v4
240+
if: ${{ inputs.release }}
240241
with:
241242
name: macos-template_debug-${{inputs.version}}-${{ matrix.engine }}
242243
path: macos-template_debug-${{inputs.version}}-${{ matrix.engine }}
243244

244245
- name: ⚒️ Build Template App
246+
if: ${{ inputs.release }}
245247
run: |
246248
mkdir template-app
247249
cp -r misc/dist/macos_template.app template-app/macos_template.app
@@ -251,6 +253,7 @@ jobs:
251253
chmod +x template-app/macos_template.app/Contents/MacOS/godot_macos*
252254
253255
- name: ⏫ Upload template app
256+
if: ${{ inputs.release }}
254257
uses: actions/upload-artifact@v4
255258
with:
256259
name: macos-template-app-${{inputs.version}}-${{ matrix.engine }}

.github/workflows/build_web.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: 🌐 Web Builds
22
on:
33
workflow_call:
44
inputs:
5+
release:
6+
required: true
7+
type: boolean
58
version:
69
required: true
710
type: string
@@ -34,16 +37,22 @@ env:
3437
jobs:
3538
web-template:
3639
runs-on: ubuntu-24.04
37-
name: Web (${{ matrix.target }}, ${{ matrix.engine }}, threads=${{ matrix.threads }})
40+
name: Web (${{ matrix.target }}, ${{ matrix.engine }}, threads=${{ matrix.threads }}, dlink=${{ matrix.dlink }})
3841
timeout-minutes: 60
3942
strategy:
4043
fail-fast: false
4144
matrix:
4245
engine: [ browser, qjs-ng ]
43-
target: [ template_release, template_debug ]
44-
threads: [ yes, no ]
45-
46+
target: ${{ inputs.release && fromJSON('["template_release","template_debug"]') || fromJSON('["template_debug"]') }}
47+
threads: ${{ inputs.release && fromJSON('["yes","no"]') || fromJSON('["yes"]') }}
48+
dlink: ${{ inputs.release && fromJSON('["yes","no"]') || fromJSON('["no"]') }}
4649
steps:
50+
- name: 🧬 Generate Name
51+
id: name
52+
run: |
53+
echo "name=web${{ matrix.dlink == 'yes' && '-dlink' || '' }}${{ matrix.threads == 'no' && '-nothreads' || '' }}-${{ matrix.target }}-${{inputs.version}}-${{ matrix.engine }}" >> $GITHUB_OUTPUT
54+
shell: bash
55+
4756
- name: Checkout Godot
4857
uses: actions/checkout@v4
4958
with:
@@ -95,7 +104,7 @@ jobs:
95104
- name: Restore Godot build cache
96105
uses: ./.github/actions/godot-cache-restore
97106
with:
98-
cache-name: web-${{ matrix.threads }}-${{ matrix.target }}-${{inputs.version}}-${{ matrix.engine }}
107+
cache-name: ${{ steps.name.outputs.name }}
99108
continue-on-error: true
100109

101110
- name: Setup Python and SCons
@@ -125,10 +134,10 @@ jobs:
125134
- name: Save Godot build cache
126135
uses: ./.github/actions/godot-cache-save
127136
with:
128-
cache-name: web-${{ matrix.threads }}-${{ matrix.target }}-${{inputs.version}}-${{ matrix.engine }}
137+
cache-name: ${{ steps.name.outputs.name }}
129138
continue-on-error: true
130139

131140
- name: Upload artifact
132141
uses: ./.github/actions/upload-artifact
133142
with:
134-
name: web-${{ matrix.threads }}-${{ matrix.target }}-${{inputs.version}}-${{ matrix.engine }}
143+
name: ${{ steps.name.outputs.name }}

0 commit comments

Comments
 (0)