Skip to content

Commit

Permalink
Update github builds
Browse files Browse the repository at this point in the history
  • Loading branch information
WhalesState committed Sep 29, 2024
1 parent cc47178 commit 93f3397
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 61 deletions.
41 changes: 26 additions & 15 deletions .github/workflows/linux_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,24 @@ jobs:
matrix:
include:

- name: Editor with doubles (target=editor, optimize=speed, precision=double)
cache-name: linux-editor-double
target: editor
# Debug symbols disabled as they're huge on this build and we hit the 14 GB limit for runners.
sconsflags: optimize=speed precision=double
bin: "./bin/godot.linuxbsd.editor.double.x86_64"
# proj-test: true
# Generate an API dump for godot-cpp tests.
# api-dump: true
artifact: true

- name: Editor with doubles and GCC sanitizers (target=editor, dev_build=yes, scu_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=gold)
cache-name: linux-editor-double-sanitizers
target: editor
# Debug symbols disabled as they're huge on this build and we hit the 14 GB limit for runners.
sconsflags: dev_build=yes scu_build=yes debug_symbols=no precision=double use_asan=yes use_ubsan=yes linker=gold
bin: "./bin/godot.linuxbsd.e.dev.d.x64.san"
proj-test: true
bin: "./bin/godot.linuxbsd.editor.dev.double.x86_64.san"
# proj-test: true
# Generate an API dump for godot-cpp tests.
api-dump: true
# Skip 2GiB artifact speeding up action.
Expand All @@ -40,7 +51,7 @@ jobs:
cache-name: linux-editor-llvm-sanitizers
target: editor
sconsflags: dev_build=yes use_asan=yes use_ubsan=yes use_llvm=yes linker=lld
bin: "./bin/godot.linuxbsd.e.dev.x64.llvm.san"
bin: "./bin/godot.linuxbsd.editor.dev.x86_64.llvm.san"
# Skip 2GiB artifact speeding up action.
artifact: false
# Test our oldest supported SCons/Python versions on one arbitrary editor build.
Expand All @@ -50,29 +61,29 @@ jobs:
cache-name: linux-editor-thread-sanitizer
target: editor
sconsflags: dev_build=yes use_tsan=yes use_llvm=yes linker=lld
bin: "./bin/godot.linuxbsd.e.dev.x64.llvm.san"
bin: "./bin/godot.linuxbsd.editor.dev.x86_64.llvm.san"
# Skip 2GiB artifact speeding up action.
artifact: false

- name: Minimal template (target=template_release, everything disabled)
cache-name: linux-template-minimal
- name: Template Release with doubles (target=template_release, optimzie=speed, precision=double)
cache-name: linux-template-release-double
target: template_release
sconsflags: modules_enabled_by_default=no disable_advanced_gui=yes deprecated=no minizip=no
bin: "./bin/godot.linuxbsd.template_release.x64"
sconsflags: optimize=speed precision=double
bin: "./bin/godot.linuxbsd.template_release.double.x86_64"
artifact: true

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

# Need newer mesa for lavapipe to work properly.
- name: Linux dependencies for tests
if: ${{ matrix.proj-test }}
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EB8B81E14DA65431D7504EA8F63F0F2B90935439
sudo add-apt-repository "deb https://ppa.launchpadcontent.net/kisak/turtle/ubuntu focal main"
# # Need newer mesa for lavapipe to work properly.
# - name: Linux dependencies for tests
# if: ${{ matrix.proj-test }}
# run: |
# sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
# sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EB8B81E14DA65431D7504EA8F63F0F2B90935439
# sudo add-apt-repository "deb https://ppa.launchpadcontent.net/kisak/turtle/ubuntu focal main"

# TODO: Figure out somehow how to embed this one.
- name: wayland-scanner dependency
Expand Down
21 changes: 10 additions & 11 deletions .github/workflows/macos_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,17 @@ jobs:
fail-fast: false
matrix:
include:
- name: Editor (target=editor)
cache-name: macos-editor
- name: Editor with doubles (target=editor optimize=speed precision=double)
cache-name: macos-editor-double
target: editor
target_name: e
bin: "./bin/godot.macos.e.universal"
sconsflags: optimize=speed precision=double
bin: "./bin/godot.macos.editor.double.universal"

- name: Template (target=template_release)
cache-name: macos-template
- name: Template (target=template_release optimize=speed precision=double)
cache-name: macos-template-release-double
target: template_release
target_name: template_release
sconsflags: debug_symbols=no
bin: "./bin/godot.macos.template_release.universal"
sconsflags: optimize=speed precision=double
bin: "./bin/godot.macos.template_release.double.universal"

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -69,8 +68,8 @@ jobs:

- name: Prepare artifact
run: |
lipo -create ./bin/godot.macos.${{ matrix.target_name }}.d.x64 ./bin/godot.macos.${{ matrix.target_name }}.d.arm64 -output ./bin/godot.macos.${{ matrix.target_name }}.d.universal
rm ./bin/godot.macos.${{ matrix.target_name }}.d.x64 ./bin/godot.macos.${{ matrix.target_name }}.d.arm64
lipo -create ./bin/godot.macos.${{ matrix.target }}.double.x86_64 ./bin/godot.macos.${{ matrix.target }}.double.arm64 -output ./bin/godot.macos.${{ matrix.target }}.double.universal
rm ./bin/godot.macos.${{ matrix.target }}.double.x86_64 ./bin/godot.macos.${{ matrix.target }}.double.arm64
strip bin/godot.*
chmod +x bin/godot.*
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,25 @@ jobs:
fail-fast: false
matrix:
include:
- name: Editor (target=editor)
cache-name: windows-editor
- name: Editor (target=editor, optimize=speed, precision=double)
cache-name: windows-editor-double
target: editor
# Skip debug symbols, they're way too big with MSVC.
sconsflags: debug_symbols=no vsproj=yes vsproj_gen_only=no windows_subsystem=console
bin: "./bin/godot.win.e.x64.exe"
sconsflags: optimize=speed precision=double
bin: "./bin/godot.windows.editor.double.x86_64.exe"
artifact: true

- name: Editor w/ clang-cl (target=editor, use_llvm=yes)
cache-name: windows-editor-clang
- name: Editor w/ clang-cl double (target=editor,optimize=speed, use_llvm=yes)
cache-name: windows-editor-clang-double
target: editor
sconsflags: debug_symbols=no windows_subsystem=console use_llvm=yes
bin: ./bin/godot.win.e.x64.llvm.exe
sconsflags: optimize=speed precision=double use_llvm=yes
bin: ./bin/godot.windows.editor.double.x86_64.llvm.exe

- name: Template (target=template_release)
cache-name: windows-template
- name: Template (target=template_release, optimize=speed, precision=double)
cache-name: windows-template-double
target: template_release
sconsflags: debug_symbols=no
bin: "./bin/godot.win.template_release.x64.console.exe"
sconsflags: optimize=speed precision=double
bin: "./bin/godot.windows.template_release.double.x86_64.exe"
artifact: true

steps:
Expand Down
28 changes: 8 additions & 20 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ opts.Add(BoolVariable("threads", "Enable threading support", True))

# Components
opts.Add(BoolVariable("deprecated", "Enable compatibility code for deprecated and removed features", True))
opts.Add(EnumVariable("precision", "Set the floating-point precision level", "double", ("single", "double")))
opts.Add(EnumVariable("precision", "Set the floating-point precision level", "single", ("single", "double")))
opts.Add(BoolVariable("minizip", "Enable ZIP archive support using minizip", True))
opts.Add(BoolVariable("brotli", "Enable Brotli for decompresson and WOFF2 fonts support", True))
opts.Add(BoolVariable("opengl3", "Enable the OpenGL/GLES3 rendering driver", True))
Expand Down Expand Up @@ -867,34 +867,21 @@ else: # GCC, Clang
env.Append(CCFLAGS=["-Werror"])

if hasattr(detect, "get_program_suffix"):
if detect.get_program_suffix() == "windows":
suffix = ".win"
else:
suffix = "." + detect.get_program_suffix()
suffix = "." + detect.get_program_suffix()
else:
if env["platform"] == "windows":
suffix = ".win"
else:
suffix = "." + env["platform"]

if env["target"] == "editor":
suffix += ".e"
else:
suffix += "." + env["target"]
suffix = "." + env["platform"]

suffix += "." + env["target"]
if env.dev_build:
suffix += ".dev"

if env["precision"] == "double":
suffix += ".d"
suffix += ".double"

if env["arch"] == "x86_64":
suffix += ".x64"
else:
suffix += "." + env["arch"]
suffix += "." + env["arch"]

if not env["threads"]:
suffix += ".nt"
suffix += ".nothreads"

suffix += env.extra_suffix

Expand Down Expand Up @@ -1065,6 +1052,7 @@ if "check_c_headers" in env:
env.AppendUnique(CPPDEFINES=[headers[header]])


# FIXME: This method mixes both cosmetic progress stuff and cache handling...
methods.show_progress(env)
# TODO: replace this with `env.Dump(format="json")`
# once we start requiring SCons 4.0 as min version.
Expand Down
4 changes: 1 addition & 3 deletions platform/windows/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def get_doc_path():
def get_flags():
arch = detect_build_env_arch() or detect_arch()

return { "arch": arch, "supported": [] }
return {"arch": arch, "supported": []}


def build_res_file(target, source, env: "SConsEnvironment"):
Expand Down Expand Up @@ -349,8 +349,6 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config):
env.AppendUnique(CPPDEFINES=["R128_STDC_ONLY"])
env.extra_suffix = ".llvm" + env.extra_suffix

env["MAXLINELENGTH"] = 8192 # Windows Vista and beyond, so always applicable.

if env["silence_msvc"] and not env.GetOption("clean"):
from tempfile import mkstemp

Expand Down

0 comments on commit 93f3397

Please sign in to comment.