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

Add package.xml #413

Merged
merged 11 commits into from
Apr 17, 2024
20 changes: 20 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="2">
<name>gz-cmake3</name>
<version>3.5.0</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should have a plan for how to keep this version tag in sync with the version in the CMakeLists.txt.

Some options:

  1. Manually update version numbers in both places and add a CI check to verify consistency (presumably with a shared github action that we will use in other packages)
  2. Make this package.xml version string the single source of truth and add cmake logic to parse the package.xml file to get it (presumably using the existing code that ROS / ament is already using)

I won't block this pull request on that change, but I'd like to at least have an issue open where we continue this conversation

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think option 1 would be easier to implement

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add cmake logic to parse the package.xml file to get it (presumably using the existing code that ROS / ament is already using)

I believe the following ament_cmake macro is used to invoke the ament_package python scripts:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just hacked up a crude github workflow check for consistent versions in the CMakeLists.txt and package.xml file in branch package_xml...package_xml_ci_test

@j-rivero where would you like to see this CI configuration stored?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should have mentioned I've added a workflow in some of the other package.xml PRs. See https://github.com/gazebosim/gz-sim/actions/runs/8334724361

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added an Action in gazebo-tooling/action-gz-ci#70 and updated this PR to use it.

<description>Gazebo CMake : CMake Modules for Gazebo Projects</description>

<maintainer email="[email protected]">Steve Peters</maintainer>

<license>Apache License 2.0</license>

<url type="website">https://github.com/gazebosim/gz-cmake</url>

<buildtool_depend>cmake</buildtool_depend>
azeey marked this conversation as resolved.
Show resolved Hide resolved
<buildtool_depend>pkg-config</buildtool_depend>
azeey marked this conversation as resolved.
Show resolved Hide resolved

<export>
<build_type>cmake</build_type>
</export>
</package>