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.
First-time contributor

This PR attempts to allow the user to specify a build config (e.g. debug) when running a build.

Example:

@blender-bot build debug

This would build a debug build and also run the tests in debug mode.

This PR attempts to allow the user to specify a build config (e.g. `debug`) when running a build. Example: ``` @blender-bot build debug ``` This would build a debug build and also run the tests in debug mode.
Falk David added 1 commit 2023-12-04 12:50:01 +01:00
Falk David requested review from Brecht Van Lommel 2023-12-04 12:50:12 +01:00
Falk David added 2 commits 2023-12-04 13:20:43 +01:00

Can you clarify the purpose of this?

We've been wanting to run tests with asserts enabled, which I think makes sense. Debug mode does that but also a lot more. We would not want to run tests in debug mode regularly because that's going to be too slow and take up too many resources.

So if the intent would be for developers to frequently use @blender-bot build debug in their pull requests, I don't think this is the solution.

Can you clarify the purpose of this? We've been wanting to run tests with asserts enabled, which I think makes sense. Debug mode does that but also a lot more. We would not want to run tests in debug mode regularly because that's going to be too slow and take up too many resources. So if the intent would be for developers to frequently use `@blender-bot build debug` in their pull requests, I don't think this is the solution.
Author
First-time contributor

We've been wanting to run tests with asserts enabled, which I think makes sense.

Yes that would be the usecase for me. Basically, as a developer, I would want to run debug tests on a PR (could be my own, could be someone else) so that I know e.g. that there are no memory issues (with ASAN) or that no asserts are hit. I would want this to happen on the build-bot so that I can continue working while the tests run (running debug tests takes up a lot of time).

that's going to be too slow and take up too many resources.

Do we know this? I don't think this would be used that frequently. For a lot of PR's, a @blender-bot build will suffice imo.

> We've been wanting to run tests with asserts enabled, which I think makes sense. Yes that would be the usecase for me. Basically, as a developer, I would want to run debug tests on a PR (could be my own, could be someone else) so that I know e.g. that there are no memory issues (with ASAN) or that no asserts are hit. I would want this to happen on the build-bot so that I can continue working while the tests run (running debug tests takes up a lot of time). > that's going to be too slow and take up too many resources. Do we know this? I don't think this would be used that frequently. For a lot of PR's, a `@blender-bot build` will suffice imo.

To me it seems you can't really predict when an assert might trigger, so it doesn't make much sense to sometimes build with asserts. Note also that debug builds do not enable ASAN.

The plan was to complete blender/blender#115071 so we can build asserts in release mode, and make that the default behavior for @blender-bot build. For package builds and nightly builds it would continue to build without asserts probably.

Enabling ASAN by default on @blender-bot build we should also, in addition to that.

To me it seems you can't really predict when an assert might trigger, so it doesn't make much sense to sometimes build with asserts. Note also that debug builds do not enable ASAN. The plan was to complete blender/blender#115071 so we can build asserts in release mode, and make that the default behavior for `@blender-bot build`. For package builds and nightly builds it would continue to build without asserts probably. Enabling ASAN by default on `@blender-bot build` we should also, in addition to that.
Author
First-time contributor

That sounds good! If enabling ASAN has a big impact on build times though, I would make it an option to the command.
Closing this since it doesn't have a use now.

That sounds good! If enabling ASAN has a big impact on build times though, I would make it an option to the command. Closing this since it doesn't have a use now.
Falk David closed this pull request 2023-12-05 08:43:20 +01:00

Asserts are now enabled on the buildbot for non-package builds.

An "sanitizer" build configuration was added as well, though various failures and impact on build time need to be investigated before we can really start using that.

Asserts are now enabled on the buildbot for non-package builds. An "sanitizer" build configuration was added as well, though various failures and impact on build time need to be investigated before we can really start using that.

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: infrastructure/blender-bot#3
No description provided.