Allow building debug builds #3

Closed
Falk David wants to merge 3 commits from filedescriptor/blender-bot:debug-builds into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
2 changed files with 14 additions and 7 deletions

View File

@ -4,11 +4,15 @@
Blender developers with commit access can start builds by typing commands in comments on projects.blender.org.
* `@blender-bot build [platform]`: build current pull request. A notification about the build progress / result is shown in the list of commits that make up this pull request.
* `@blender-bot build [config] [platform]`: build current pull request. A notification about the build progress / result is shown in the list of commits that make up this pull request.
* `@blender-bot package [platform]`: build current pull request and make package for download. The bot will post the link in a comment on the pull request.
* `@blender-bot build-branch branch [platform]`: build the given branch. The bot will post a link to the build in a comment on the issue / pull request.
* `@blender-bot package-branch branch [platform]`: build branch and make package for download. The bot will post the link in a comment on the issue / pull request.
`[config]` is optional. Possible values:
* `release` (default)
* `debug`: Builds in debug mode
`[platform]` is optional, and used to build for just one platform. Possible values:
* `windows` `macos` `linux` (for brevity)
* `windows-amd64` `macos-x86_64` `macos-arm64` `linux-x86_64` (to be specific)

View File

@ -118,7 +118,7 @@ def get_pull_commit_hash(repo: str, pull_id: str):
return result['head']['sha']
def build(repo: str, reply_url: str, html_url: str, build_type: str, build_id: str, username: str, package: bool, platform_args: Sequence[str]):
def build(repo: str, reply_url: str, html_url: str, build_type: str, build_id: str, build_config: str, username: str, package: bool, platform_args: Sequence[str]):
"""
Build blender on the buildbot.
"""
@ -132,7 +132,7 @@ def build(repo: str, reply_url: str, html_url: str, build_type: str, build_id: s
params = {"needs_package_delivery": package,
"platform_architectures": platforms,
"build_configuration": "release"}
"build_configuration": build_config}
elif repo == "blender/blender-manual":
coordinator_prefix = "vexp-doc-manual"
@ -234,13 +234,16 @@ def comment_event(data: Dict[str, Any]):
command = tokens[0]
args = tokens[1:]
if command == "build" and is_pull:
build(repo, reply_url, html_url, 'patch_id', issue_number, username, False, args)
if len(args) >= 1 and args[0] in {"release", "debug"}:
build(repo, reply_url, html_url, 'patch_id', args[0], issue_number, username, False, args[1:])
else:
build(repo, reply_url, html_url, 'patch_id', "release", issue_number, username, False, args)
elif command == "build-branch" and len(args) >= 1:
build(repo, reply_url, html_url, 'override_branch_id', args[0], username, False, args[1:])
build(repo, reply_url, html_url, 'override_branch_id', "release", args[0], username, False, args[1:])
elif command == "package" and is_pull:
build(repo, reply_url, html_url, 'patch_id', issue_number, username, True, args)
build(repo, reply_url, html_url, 'patch_id', "release", issue_number, username, True, args)
elif command == "package-branch" and len(args) >= 1:
build(repo, reply_url, html_url, 'override_branch_id', args[0], username, True, args[1:])
build(repo, reply_url, html_url, 'override_branch_id', "release", args[0], username, True, args[1:])
elif command == "ping":
post_comment(reply_url, "pong")
else: