WIP: Merge changes from upstream #4

Draft
Bart van der Braak wants to merge 1 commits from bartvdbraak/blender-devops:main into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
6 changed files with 20 additions and 19 deletions

View File

@ -717,8 +717,8 @@ def populate(devops_env_id):
]
if needs_nightly_schedulers and (track_id in code_track_ids):
nighlty_scheduler_name = (
f"{track_id}-code-{pipeline_type}-coordinator-nighlty"
nightly_scheduler_name = (
f"{track_id}-code-{pipeline_type}-coordinator-nightly"
)
nightly_properties = {
"revision": "HEAD",
@ -729,7 +729,7 @@ def populate(devops_env_id):
"build_configuration": "release",
"platform_architectures": code_all_platform_architectures[track_id],
}
nighlty_codebases = {
nightly_codebases = {
"blender.git": {
"repository": "",
"branch": code_tracked_branch_ids[track_id],
@ -738,9 +738,9 @@ def populate(devops_env_id):
}
schedulers += [
plugins_schedulers.Nightly(
name=nighlty_scheduler_name,
name=nightly_scheduler_name,
builderNames=[coordinator_builder_name],
codebases=nighlty_codebases,
codebases=nightly_codebases,
properties=nightly_properties,
onlyIfChanged=False,
hour=1,

View File

@ -209,11 +209,11 @@ def populate(devops_env_id):
]
if needs_nightly_schedulers and (track_id in track_ids):
nighlty_scheduler_name = f"{track_id}-code-store-coordinator-nighlty"
nightly_scheduler_name = f"{track_id}-code-store-coordinator-nightly"
nightly_properties = {
"revision": "HEAD",
}
nighlty_codebases = {
nightly_codebases = {
"blender.git": {
"repository": "",
"branch": tracked_branch_ids[track_id],
@ -222,9 +222,9 @@ def populate(devops_env_id):
}
schedulers += [
plugins_schedulers.Nightly(
name=nighlty_scheduler_name,
name=nightly_scheduler_name,
builderNames=[coordinator_builder_name],
codebases=nighlty_codebases,
codebases=nightly_codebases,
properties=nightly_properties,
onlyIfChanged=False,
hour=5,

View File

@ -312,19 +312,19 @@ def create_pipeline(
]
if needs_nightly_schedulers and (track_id in track_ids):
nighlty_codebases = {
nightly_codebases = {
codebase: {
"repository": "",
"branch": tracked_branch_ids[track_id],
"revision": None,
}
}
nighlty_scheduler_name = f"{track_id}-{artifact_id}-coordinator-nighlty"
nightly_scheduler_name = f"{track_id}-{artifact_id}-coordinator-nightly"
schedulers += [
plugins_schedulers.Nightly(
name=nighlty_scheduler_name,
name=nightly_scheduler_name,
builderNames=[coordinator_builder_name],
codebases=nighlty_codebases,
codebases=nightly_codebases,
properties=nightly_properties,
onlyIfChanged=False,
hour=hour,

View File

@ -12,8 +12,6 @@ import worker.utils
def make_format(builder: worker.blender.CodeBuilder) -> bool:
os.chdir(builder.blender_dir)
makefile = "make.bat" if builder.platform == "windows" else "GNUmakefile"
# Always run formatting with scripts from main, for security on unverified patches.
# TODO: how secure is this? How to test formatting issues in the scripts themselves?
# main_files = [makefile, "tools/utils_maintenance", "build_files/windows"]
@ -21,7 +19,10 @@ def make_format(builder: worker.blender.CodeBuilder) -> bool:
# worker.utils.call(['git', 'checkout', 'origin/main', '--', main_file])
# Run format
builder.call(["make", "-f", makefile, "format"])
if builder.platform == "windows":
builder.call(["make.bat", "format"])
else:
builder.call(["make", "-f", "GNUmakefile", "format"])
# Check for changes
diff = worker.utils.check_output(["git", "diff"])

View File

@ -48,7 +48,7 @@ def update(builder: ManualBuilder) -> None:
def check(builder: ManualBuilder) -> None:
os.chdir(builder.track_path)
worker.utils.call_pipenv(["install", "--requirements", builder.code_path / "requirements.txt"])
worker.utils.call_pipenv(["install", "--pre", "--requirements", builder.code_path / "requirements.txt"])
os.chdir(builder.code_path)
@ -61,7 +61,7 @@ def check(builder: ManualBuilder) -> None:
def compile_doc(builder: ManualBuilder) -> None:
# Install requirements.
os.chdir(builder.track_path)
worker.utils.call_pipenv(["install", "--requirements", builder.code_path / "requirements.txt"])
worker.utils.call_pipenv(["install", "--pre", "--requirements", builder.code_path / "requirements.txt"])
# Determine format and locales
locales = builder.get_locales()

View File

@ -104,7 +104,7 @@ def _log_cmd(msg: str) -> None:
_warnings += [msg]
return
print(msg, flush=True)
print(msg.encode('utf-8', errors='replace'), flush=True)
# Command execution