Skip to content

Commit

Permalink
Merge pull request #66242 from akien-mga/scons-unify-tools-target
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Sep 30, 2022
2 parents 67961d8 + 39facb3 commit f47979f
Show file tree
Hide file tree
Showing 42 changed files with 216 additions and 339 deletions.
17 changes: 7 additions & 10 deletions .github/actions/godot-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@ name: Build Godot
description: Build Godot with the provided options.
inputs:
target:
description: The scons target (debug/release_debug/release).
default: "debug"
tools:
description: If tools are to be built.
default: false
description: Build target (editor, template_release, template_debug).
default: "editor"
tests:
description: If tests are to be built.
description: Unit tests.
default: false
platform:
description: The Godot platform to build.
description: Target platform.
required: false
sconsflags:
default: ""
Expand All @@ -33,7 +30,7 @@ runs:
SCONS_CACHE: ${{ inputs.scons-cache }}
SCONS_CACHE_LIMIT: ${{ inputs.scons-cache-limit }}
run: |
echo "Building with flags:" ${{ env.SCONSFLAGS }}
if ! ${{ inputs.tools }}; then rm -rf editor; fi # Ensure we don't include editor code.
scons p=${{ inputs.platform }} target=${{ inputs.target }} tools=${{ inputs.tools }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
echo "Building with flags:" platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
if [ "${{ inputs.target }}" != "editor" ]; then rm -rf editor; fi # Ensure we don't include editor code.
scons platform=${{ inputs.platform }} target=${{ inputs.target }} tests=${{ inputs.tests }} ${{ env.SCONSFLAGS }}
ls -l bin/
8 changes: 3 additions & 5 deletions .github/workflows/android_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
jobs:
android-template:
runs-on: "ubuntu-20.04"
name: Template (target=release, tools=no)
name: Template (target=template_release)

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -44,17 +44,15 @@ jobs:
with:
sconsflags: ${{ env.SCONSFLAGS }} arch=arm32
platform: android
target: release
tools: false
target: template_release
tests: false

- name: Compilation (arm64)
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} arch=arm64
platform: android
target: release
tools: false
target: template_release
tests: false

- name: Generate Godot templates
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/ios_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
jobs:
ios-template:
runs-on: "macos-latest"
name: Template (target=release, tools=no)
name: Template (target=template_release)

steps:
- uses: actions/checkout@v3
Expand All @@ -31,8 +31,7 @@ jobs:
with:
sconsflags: ${{ env.SCONSFLAGS }}
platform: ios
target: release
tools: false
target: template_release
tests: false

- name: Upload artifact
Expand Down
42 changes: 18 additions & 24 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ env:
GODOT_BASE_BRANCH: master
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: false
DOTNET_CLI_TELEMETRY_OPTOUT: true

concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-linux
Expand All @@ -21,57 +21,52 @@ jobs:
fail-fast: false
matrix:
include:
- name: Editor w Mono (target=release_debug, tools=yes, tests=yes)
- name: Editor w/ Mono (target=editor)
cache-name: linux-editor-mono
target: release_debug
tools: true
target: editor
tests: false # Disabled due freeze caused by mix Mono build and CI
sconsflags: module_mono_enabled=yes
doc-test: true
bin: "./bin/godot.linuxbsd.opt.tools.x86_64.mono"
bin: "./bin/godot.linuxbsd.editor.x86_64.mono"
build-mono: true
proj-conv: true
artifact: true

- name: Editor with doubles and GCC sanitizers (target=debug, tools=yes, float=64, tests=yes, use_asan=yes, use_ubsan=yes, linker=gold)
- name: Editor with doubles and GCC sanitizers (target=editor, tests=yes, dev_build=yes, float=64, use_asan=yes, use_ubsan=yes, linker=gold)
cache-name: linux-editor-double-sanitizers
target: debug
tools: true
target: editor
tests: true
sconsflags: float=64 use_asan=yes use_ubsan=yes linker=gold
sconsflags: dev_build=yes float=64 use_asan=yes use_ubsan=yes linker=gold
proj-test: true
# Can be turned off for PRs that intentionally break compat with godot-cpp,
# until both the upstream PR and the matching godot-cpp changes are merged.
godot-cpp-test: true
bin: "./bin/godot.linuxbsd.double.tools.x86_64.san"
bin: "./bin/godot.linuxbsd.editor.dev.double.x86_64.san"
build-mono: false
# Skip 2GiB artifact speeding up action.
artifact: false

- name: Editor with clang sanitizers (target=debug, tools=yes, use_asan=yes, use_ubsan=yes, use_llvm=yes, linker=lld)
- name: Editor with clang sanitizers (target=editor, tests=yes, dev_build=yes, use_asan=yes, use_ubsan=yes, use_llvm=yes, linker=lld)
cache-name: linux-editor-llvm-sanitizers
target: debug
tools: true
target: editor
tests: true
sconsflags: use_asan=yes use_ubsan=yes use_llvm=yes linker=lld
bin: "./bin/godot.linuxbsd.tools.x86_64.llvm.san"
sconsflags: dev_build=yes use_asan=yes use_ubsan=yes use_llvm=yes linker=lld
bin: "./bin/godot.linuxbsd.editor.dev.x86_64.llvm.san"
build-mono: false
# Skip 2GiB artifact speeding up action.
artifact: false

- name: Template w/ Mono (target=release, tools=no)
- name: Template w/ Mono (target=template_release)
cache-name: linux-template-mono
target: release
tools: false
target: template_release
tests: false
sconsflags: module_mono_enabled=yes debug_symbols=no
sconsflags: module_mono_enabled=yes
build-mono: false
artifact: true

- name: Minimal Template (target=release, tools=no, everything disabled)
- name: Minimal template (target=template_release, everything disabled)
cache-name: linux-template-minimal
target: release
tools: false
target: template_release
tests: false
sconsflags: modules_enabled_by_default=no disable_3d=yes disable_advanced_gui=yes deprecated=no minizip=no
artifact: true
Expand Down Expand Up @@ -113,7 +108,6 @@ jobs:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
platform: linuxbsd
target: ${{ matrix.target }}
tools: ${{ matrix.tools }}
tests: ${{ matrix.tests }}

- name: Generate C# glue
Expand Down Expand Up @@ -221,7 +215,7 @@ jobs:
if: ${{ matrix.godot-cpp-test }}
run: |
cd godot-cpp/test
scons target=${{ matrix.target }}
scons target=debug
cd ../..
- name: Prepare artifact
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@ jobs:
fail-fast: false
matrix:
include:
- name: Editor (target=release_debug, tools=yes, tests=yes)
- name: Editor (target=editor, tests=yes)
cache-name: macos-editor
target: release_debug
tools: true
target: editor
tests: true
bin: "./bin/godot.macos.opt.tools.x86_64"
bin: "./bin/godot.macos.editor.x86_64"

- name: Template (target=release, tools=no)
- name: Template (target=template_release)
cache-name: macos-template
target: release
tools: false
target: template_release
tests: false
sconsflags: debug_symbols=no

Expand All @@ -55,7 +53,6 @@ jobs:
sconsflags: ${{ env.SCONSFLAGS }}
platform: macos
target: ${{ matrix.target }}
tools: ${{ matrix.tools }}
tests: ${{ matrix.tests }}

# Execute unit tests for the editor
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/web_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
jobs:
web-template:
runs-on: "ubuntu-20.04"
name: Template (target=release, tools=no)
name: Template (target=template_release)

steps:
- uses: actions/checkout@v3
Expand All @@ -43,8 +43,7 @@ jobs:
with:
sconsflags: ${{ env.SCONSFLAGS }}
platform: web
target: release
tools: false
target: template_release
tests: false

- name: Upload artifact
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,17 @@ jobs:
fail-fast: false
matrix:
include:
- name: Editor (target=release_debug, tools=yes, tests=yes)
- name: Editor (target=editor, tests=yes)
cache-name: windows-editor
target: release_debug
tools: true
target: editor
tests: true
# Skip debug symbols, they're way too big with MSVC.
sconsflags: debug_symbols=no
bin: "./bin/godot.windows.opt.tools.x86_64.exe"
bin: "./bin/godot.windows.editor.x86_64.exe"

- name: Template (target=release, tools=no)
- name: Template (target=template_release, tools=no)
cache-name: windows-template
target: release
tools: false
target: template_release
tests: false
sconsflags: debug_symbols=no

Expand All @@ -57,7 +55,6 @@ jobs:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
platform: windows
target: ${{ matrix.target }}
tools: ${{ matrix.tools }}
tests: ${{ matrix.tests }}

# Execute unit tests for the editor
Expand Down
Loading

0 comments on commit f47979f

Please sign in to comment.