Skip to content

Commit 932d9f8

Browse files
committed
Merge pull request #99938 from Repiteo/ci/scons-flag-formatting
CI: Format SCons input flags & build action
2 parents 0d8f33a + d38bda7 commit 932d9f8

File tree

8 files changed

+105
-97
lines changed

8 files changed

+105
-97
lines changed

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

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,26 @@ inputs:
55
target:
66
description: Build target (editor, template_release, template_debug).
77
default: editor
8-
tests:
9-
description: Unit tests.
10-
default: false
11-
required: false
8+
type: choice
9+
options: [editor, template_debug, template_release]
1210
platform:
1311
description: Target platform.
14-
required: false
15-
sconsflags:
12+
type: string
13+
scons-flags:
1614
description: Additional SCons flags.
17-
default: ""
18-
required: false
15+
type: string
1916
scons-cache:
2017
description: The SCons cache path.
2118
default: ${{ github.workspace }}/.scons_cache/
19+
type: string
2220

2321
runs:
2422
using: composite
2523
steps:
2624
- name: SCons Build
2725
shell: sh
28-
env:
29-
SCONSFLAGS: ${{ inputs.sconsflags }}
3026
run: |
31-
echo "Building with flags:" platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }} "cache_path=${{ inputs.scons-cache }}" redirect_build_objects=no
27+
echo "Building with flags:" platform=${{ inputs.platform }} target=${{ inputs.target }} ${{ inputs.scons-flags }} "cache_path=${{ inputs.scons-cache }}" redirect_build_objects=no
3228
3329
if [ "${{ inputs.target }}" != "editor" ]; then
3430
# Ensure we don't include editor code in export template builds.
@@ -42,5 +38,5 @@ runs:
4238
export BUILD_NAME="gh"
4339
fi
4440
45-
scons platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }} "cache_path=${{ inputs.scons-cache }}" redirect_build_objects=no
41+
scons platform=${{ inputs.platform }} target=${{ inputs.target }} ${{ inputs.scons-flags }} "cache_path=${{ inputs.scons-cache }}" redirect_build_objects=no
4642
ls -l bin/

.github/actions/godot-cpp-build/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,4 @@ runs:
3535

3636
- name: SCons Build
3737
shell: sh
38-
env:
39-
SCONS_CACHE: ${{ inputs.scons-cache }}
4038
run: scons --directory=./godot-cpp/test "gdextension_dir=${{ github.workspace }}" ${{ inputs.scons-flags }}

.github/workflows/android_builds.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ on:
44

55
# Global Settings
66
env:
7-
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes strict_checks=yes
7+
SCONS_FLAGS: >-
8+
dev_mode=yes
9+
module_text_server_fb_enabled=yes
10+
tests=no
11+
swappy=yes
812
913
jobs:
1014
build-android:
@@ -18,20 +22,19 @@ jobs:
1822
- name: Editor (target=editor)
1923
cache-name: android-editor
2024
target: editor
21-
tests: false
22-
sconsflags: arch=arm64 production=yes swappy=yes
25+
scons-flags: >-
26+
arch=arm64
27+
production=yes
2328
2429
- name: Template arm32 (target=template_release, arch=arm32)
2530
cache-name: android-template-arm32
2631
target: template_release
27-
tests: false
28-
sconsflags: arch=arm32 swappy=yes
32+
scons-flags: arch=arm32
2933

3034
- name: Template arm64 (target=template_release, arch=arm64)
3135
cache-name: android-template-arm64
3236
target: template_release
33-
tests: false
34-
sconsflags: arch=arm64 swappy=yes
37+
scons-flags: arch=arm64
3538

3639
steps:
3740
- name: Checkout
@@ -68,10 +71,9 @@ jobs:
6871
- name: Compilation
6972
uses: ./.github/actions/godot-build
7073
with:
71-
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
74+
scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.scons-flags }}
7275
platform: android
7376
target: ${{ matrix.target }}
74-
tests: ${{ matrix.tests }}
7577

7678
- name: Save Godot build cache
7779
uses: ./.github/actions/godot-cache-save

.github/workflows/ios_builds.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ on:
44

55
# Global Settings
66
env:
7-
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes strict_checks=yes
7+
SCONS_FLAGS: >-
8+
dev_mode=yes
9+
module_text_server_fb_enabled=yes
10+
tests=no
11+
debug_symbols=no
812
913
jobs:
1014
ios-template:
@@ -28,10 +32,9 @@ jobs:
2832
- name: Compilation (arm64)
2933
uses: ./.github/actions/godot-build
3034
with:
31-
sconsflags: ${{ env.SCONSFLAGS }}
35+
scons-flags: ${{ env.SCONS_FLAGS }}
3236
platform: ios
3337
target: template_release
34-
tests: false
3538

3639
- name: Save Godot build cache
3740
uses: ./.github/actions/godot-cache-save

.github/workflows/linux_builds.yml

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ on:
44

55
# Global Settings
66
env:
7+
SCONS_FLAGS: >-
8+
dev_mode=yes
9+
module_text_server_fb_enabled=yes
10+
"accesskit_sdk_path=${{ github.workspace }}/accesskit-c-0.15.1/"
711
GODOT_CPP_BRANCH: 4.4
8-
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes strict_checks=yes "accesskit_sdk_path=${{ github.workspace }}/accesskit-c-0.15.1/"
912
DOTNET_NOLOGO: true
1013
DOTNET_CLI_TELEMETRY_OPTOUT: true
1114
TSAN_OPTIONS: suppressions=${{ github.workspace }}/misc/error_suppressions/tsan.txt
@@ -24,75 +27,82 @@ jobs:
2427
- name: Editor w/ Mono (target=editor)
2528
cache-name: linux-editor-mono
2629
target: editor
27-
sconsflags: module_mono_enabled=yes
30+
scons-flags: module_mono_enabled=yes
2831
bin: ./bin/godot.linuxbsd.editor.x86_64.mono
2932
build-mono: true
30-
tests: false # Disabled due freeze caused by mix Mono build and CI
3133
doc-test: true
3234
proj-conv: true
3335
api-compat: true
3436
artifact: true
3537
# Validate godot-cpp compatibility on one arbitrary editor build.
3638
godot-cpp: true
3739

38-
- name: Editor with doubles and GCC sanitizers (target=editor, tests=yes, dev_build=yes, scu_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=mold)
40+
- name: Editor with doubles and GCC sanitizers (target=editor, dev_build=yes, scu_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=mold)
3941
cache-name: linux-editor-double-sanitizers
4042
target: editor
4143
# Debug symbols disabled as they're huge on this build and we hit the 14 GB limit for runners.
42-
sconsflags: dev_build=yes scu_build=yes debug_symbols=no precision=double use_asan=yes use_ubsan=yes linker=mold
44+
scons-flags: >-
45+
dev_build=yes
46+
scu_build=yes
47+
debug_symbols=no
48+
precision=double
49+
use_asan=yes
50+
use_ubsan=yes
51+
linker=mold
4352
bin: ./bin/godot.linuxbsd.editor.dev.double.x86_64.san
44-
build-mono: false
45-
tests: true
4653
proj-test: true
47-
# Skip 2GiB artifact speeding up action.
48-
artifact: false
4954

50-
- name: Editor with clang sanitizers (target=editor, tests=yes, dev_build=yes, use_asan=yes, use_ubsan=yes, use_llvm=yes, linker=lld)
55+
- name: Editor with clang sanitizers (target=editor, dev_build=yes, use_asan=yes, use_ubsan=yes, use_llvm=yes, linker=lld)
5156
cache-name: linux-editor-llvm-sanitizers
5257
target: editor
53-
sconsflags: dev_build=yes use_asan=yes use_ubsan=yes use_llvm=yes linker=lld
58+
scons-flags: >-
59+
dev_build=yes
60+
use_asan=yes
61+
use_ubsan=yes
62+
use_llvm=yes
63+
linker=lld
5464
bin: ./bin/godot.linuxbsd.editor.dev.x86_64.llvm.san
55-
build-mono: false
56-
tests: true
57-
# Skip 2GiB artifact speeding up action.
58-
artifact: false
5965
# Test our oldest supported SCons/Python versions on one arbitrary editor build.
6066
legacy-scons: true
6167

62-
- name: Editor with ThreadSanitizer (target=editor, tests=yes, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)
68+
- name: Editor with ThreadSanitizer (target=editor, dev_build=yes, use_tsan=yes, use_llvm=yes, linker=lld)
6369
cache-name: linux-editor-thread-sanitizer
6470
target: editor
65-
tests: true
66-
sconsflags: dev_build=yes use_tsan=yes use_llvm=yes linker=lld
71+
scons-flags: >-
72+
dev_build=yes
73+
use_tsan=yes
74+
use_llvm=yes
75+
linker=lld
6776
bin: ./bin/godot.linuxbsd.editor.dev.x86_64.llvm.san
68-
build-mono: false
69-
# Skip 2GiB artifact speeding up action.
70-
artifact: false
7177

72-
- name: Template w/ Mono, release (target=template_release, tests=yes)
78+
- name: Template w/ Mono, release (target=template_release)
7379
cache-name: linux-template-mono
7480
target: template_release
75-
sconsflags: module_mono_enabled=yes
81+
scons-flags: module_mono_enabled=yes
7682
bin: ./bin/godot.linuxbsd.template_release.x86_64.mono
77-
build-mono: false
78-
tests: true
7983
artifact: true
8084

81-
- name: Template w/ Mono, debug (target=template_debug, tests=yes)
85+
- name: Template w/ Mono, debug (target=template_debug)
8286
cache-name: linux-template-mono-debug
8387
target: template_debug
84-
sconsflags: module_mono_enabled=yes
88+
scons-flags: module_mono_enabled=yes
8589
bin: ./bin/godot.linuxbsd.template_debug.x86_64.mono
86-
build-mono: false
87-
tests: true
8890
artifact: true
8991

90-
- name: Minimal template (target=template_release, tests=yes, everything disabled)
92+
- name: Minimal template (target=template_release, everything disabled)
9193
cache-name: linux-template-minimal
9294
target: template_release
93-
sconsflags: modules_enabled_by_default=no disable_3d=yes disable_advanced_gui=yes disable_physics_2d=yes disable_physics_3d=yes deprecated=no minizip=no
95+
scons-flags: >-
96+
modules_enabled_by_default=no
97+
module_text_server_fb_enabled=no
98+
disable_3d=yes
99+
disable_advanced_gui=yes
100+
disable_physics_2d=yes
101+
disable_physics_3d=yes
102+
deprecated=no
103+
minizip=no
104+
brotli=no
94105
bin: ./bin/godot.linuxbsd.template_release.x86_64
95-
tests: true
96106
artifact: true
97107

98108
steps:
@@ -166,10 +176,9 @@ jobs:
166176
- name: Compilation
167177
uses: ./.github/actions/godot-build
168178
with:
169-
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
179+
scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.scons-flags }}
170180
platform: linuxbsd
171181
target: ${{ matrix.target }}
172-
tests: ${{ matrix.tests }}
173182

174183
- name: Compilation (godot-cpp)
175184
uses: ./.github/actions/godot-cpp-build
@@ -209,7 +218,6 @@ jobs:
209218
name: ${{ matrix.cache-name }}
210219

211220
- name: Unit tests
212-
if: matrix.tests
213221
run: |
214222
${{ matrix.bin }} --version
215223
${{ matrix.bin }} --help

.github/workflows/macos_builds.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ on:
44

55
# Global Settings
66
env:
7-
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes strict_checks=yes "accesskit_sdk_path=${{ github.workspace }}/accesskit-c-0.15.1/"
7+
SCONS_FLAGS: >-
8+
dev_mode=yes
9+
module_text_server_fb_enabled=yes
10+
"accesskit_sdk_path=${{ github.workspace }}/accesskit-c-0.15.1/"
811
912
jobs:
1013
build-macos:
@@ -15,17 +18,15 @@ jobs:
1518
fail-fast: false
1619
matrix:
1720
include:
18-
- name: Editor (target=editor, tests=yes)
21+
- name: Editor (target=editor)
1922
cache-name: macos-editor
2023
target: editor
21-
tests: true
2224
bin: ./bin/godot.macos.editor.universal
2325

24-
- name: Template (target=template_release, tests=yes)
26+
- name: Template (target=template_release)
2527
cache-name: macos-template
2628
target: template_release
27-
tests: true
28-
sconsflags: debug_symbols=no
29+
scons-flags: debug_symbols=no
2930
bin: ./bin/godot.macos.template_release.universal
3031

3132
steps:
@@ -68,18 +69,16 @@ jobs:
6869
- name: Compilation (x86_64)
6970
uses: ./.github/actions/godot-build
7071
with:
71-
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} arch=x86_64 vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }}
72+
scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.scons-flags }} arch=x86_64 vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }}
7273
platform: macos
7374
target: ${{ matrix.target }}
74-
tests: ${{ matrix.tests }}
7575

7676
- name: Compilation (arm64)
7777
uses: ./.github/actions/godot-build
7878
with:
79-
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }} arch=arm64 vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }}
79+
scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.scons-flags }} arch=arm64 vulkan=${{ steps.vulkan-sdk.outputs.VULKAN_ENABLED }}
8080
platform: macos
8181
target: ${{ matrix.target }}
82-
tests: ${{ matrix.tests }}
8382

8483
- name: Save Godot build cache
8584
uses: ./.github/actions/godot-cache-save
@@ -100,7 +99,6 @@ jobs:
10099
name: ${{ matrix.cache-name }}
101100

102101
- name: Unit tests
103-
if: matrix.tests
104102
run: |
105103
${{ matrix.bin }} --version
106104
${{ matrix.bin }} --help

.github/workflows/web_builds.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ on:
44

55
# Global Settings
66
env:
7-
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no use_closure_compiler=yes strict_checks=yes
7+
SCONS_FLAGS: >-
8+
dev_mode=yes
9+
tests=no
10+
debug_symbols=no
11+
use_closure_compiler=yes
812
EM_VERSION: 3.1.64
913

1014
jobs:
@@ -19,15 +23,13 @@ jobs:
1923
- name: Template w/ threads (target=template_release, threads=yes)
2024
cache-name: web-template
2125
target: template_release
22-
sconsflags: threads=yes
23-
tests: false
26+
scons-flags: threads=yes
2427
artifact: true
2528

2629
- name: Template w/o threads (target=template_release, threads=no)
2730
cache-name: web-nothreads-template
2831
target: template_release
29-
sconsflags: threads=no
30-
tests: false
32+
scons-flags: threads=no
3133
artifact: true
3234

3335
steps:
@@ -58,10 +60,9 @@ jobs:
5860
- name: Compilation
5961
uses: ./.github/actions/godot-build
6062
with:
61-
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
63+
scons-flags: ${{ env.SCONS_FLAGS }} ${{ matrix.scons-flags }}
6264
platform: web
6365
target: ${{ matrix.target }}
64-
tests: ${{ matrix.tests }}
6566

6667
- name: Save Godot build cache
6768
uses: ./.github/actions/godot-cache-save

0 commit comments

Comments
 (0)