Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[backport] Assorted CI fixes and changes #181

Merged
merged 17 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/windows_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ jobs:
continue-on-error: true

- name: Prepare artifact
if: ${{ matrix.artifact }}
if: matrix.compiler == 'msvc'
run: |
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force

- name: Upload artifact
if: ${{ matrix.artifact }}
if: matrix.compiler == 'msvc'
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}
Expand Down
4 changes: 4 additions & 0 deletions drivers/d3d12/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@ else:
extra_defines += [
"HAVE_STRUCT_TIMESPEC",
]
if methods.using_gcc(env) and methods.get_compiler_version(env)["major"] < 13:
# `region` & `endregion` not recognized as valid pragmas.
env_d3d12_rdd.Append(CCFLAGS=["-Wno-unknown-pragmas"])
env.Append(CCFLAGS=["-Wno-unknown-pragmas"])

if methods.using_gcc(env) and methods.get_compiler_version(env)["major"] < 13:
# `region` & `endregion` not recognized as valid pragmas.
Expand Down
26 changes: 8 additions & 18 deletions methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,16 +474,6 @@ def use_windows_spawn_fix(self, platform=None):
if os.name != "nt":
return # not needed, only for windows

# On Windows, due to the limited command line length, when creating a static library
# from a very high number of objects SCons will invoke "ar" once per object file;
# that makes object files with same names to be overwritten so the last wins and
# the library loses symbols defined by overwritten objects.
# By enabling quick append instead of the default mode (replacing), libraries will
# got built correctly regardless the invocation strategy.
# Furthermore, since SCons will rebuild the library from scratch when an object file
# changes, no multiple versions of the same object file will be present.
self.Replace(ARFLAGS="q")

def mySubProcess(cmdline, env):
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
Expand All @@ -502,22 +492,22 @@ def mySubProcess(cmdline, env):
rv = proc.wait()
if rv:
print_error(err)
elif len(err) > 0 and not err.isspace():
print(err)
return rv

def mySpawn(sh, escape, cmd, args, env):
# Used by TEMPFILE.
if cmd == "del":
os.remove(args[1])
return 0

newargs = " ".join(args[1:])
cmdline = cmd + " " + newargs

rv = 0
env = {str(key): str(value) for key, value in iter(env.items())}
if len(cmdline) > 32000 and cmd.endswith("ar"):
cmdline = cmd + " " + args[1] + " " + args[2] + " "
for i in range(3, len(args)):
rv = mySubProcess(cmdline + args[i], env)
if rv:
break
else:
rv = mySubProcess(cmdline, env)
rv = mySubProcess(cmdline, env)

return rv

Expand Down
12 changes: 9 additions & 3 deletions modules/mono/godotsharp_dirs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,15 @@ class _GodotSharpDirs {
}
}
if (!has_data) {
// 3. Extract the data to a temporary location to load from there.
Ref<DirAccess> da = DirAccess::create_for_path(packed_path);
ERR_FAIL_NULL(da);
// 3. Extract the data to a temporary location to load from there, delete old data if it exists but is not up-to-date.
Ref<DirAccess> da;
if (DirAccess::exists(data_dir_root)) {
da = DirAccess::open(data_dir_root);
ERR_FAIL_NULL(da);
ERR_FAIL_COND(da->erase_contents_recursive() != OK);
}
da = DirAccess::create_for_path(packed_path);
ERR_FAIL_COND(da.is_null());
ERR_FAIL_COND(da->copy_dir(packed_path, data_dir_root) != OK);
}
api_assemblies_dir = data_dir_root;
Expand Down
Loading
Loading