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

Disable building examples by default #377

Merged
merged 2 commits into from
Aug 22, 2023

Conversation

mjcarroll
Copy link
Contributor

🦟 Bug fix

Introduced by: #301
Fixes gazebosim/gz-math#539

Summary

While the new cmake-native mechanism for building examples allows it to work on Windows, it also regresses on non-colcon builds.

When colcon builds run, each package is called with cmake && make && make install during the colcon build phase, and then make test is called during the colcon test phase. This guarantees that the package is installed somewhere before attempting to run the tests, which is what the examples need.

In builds like the deb-builder, this sequence is instead make && make test to verify that the package has been correctly built before creating the deb.

This PR makes building examples off by default, and can be enabled by adding -DBUILD_EXAMPLES:bool=True to the cmake args for local and CI builds.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@mjcarroll
Copy link
Contributor Author

As part of this, we probably want to also update documentation to reflect that a make install is needed for examples, as well as enabling this in CI.

@github-actions github-actions bot added 🌱 garden Ignition Garden 🎵 harmonic Gazebo Harmonic labels Aug 8, 2023
@azeey azeey added the beta Targeting beta release of upcoming collection label Aug 8, 2023
@iche033
Copy link
Contributor

iche033 commented Aug 8, 2023

add a note to migration guide?

mjcarroll and others added 2 commits August 21, 2023 18:11
Signed-off-by: Michael Carroll <[email protected]>
Co-authored-by: Jose Luis Rivero <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
@mjcarroll
Copy link
Contributor Author

Updated migration guide

@mjcarroll mjcarroll force-pushed the mjcarroll/disable_examples_by_default branch from 7385279 to f294f8d Compare August 21, 2023 18:16
@mjcarroll mjcarroll merged commit 93c2059 into gz-cmake3 Aug 22, 2023
6 checks passed
@mjcarroll mjcarroll deleted the mjcarroll/disable_examples_by_default branch August 22, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Targeting beta release of upcoming collection 🌱 garden Ignition Garden 🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

EXAMPLES_*_TEST require a system installation of gz-math code to work
4 participants