Skip to content

Commit

Permalink
Merge pull request gazebosim#445 from gazebosim/scpeters/merge_10_main
Browse files Browse the repository at this point in the history
Merge gz-msgs10 ➡️  main
  • Loading branch information
iche033 authored May 30, 2024
2 parents cd39a9f + 3dad23f commit cdc2839
Show file tree
Hide file tree
Showing 22 changed files with 921 additions and 328 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/package_xml.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Validate package.xml

on:
pull_request:

jobs:
package-xml:
runs-on: ubuntu-latest
name: Validate package.xml
steps:
- uses: gazebo-tooling/action-gz-ci/validate_package_xml@jammy
185 changes: 153 additions & 32 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,41 @@ load(
"GZ_FEATURES",
"GZ_ROOT",
"GZ_VISIBILITY",
"gz_configure_file",
"gz_configure_header",
"gz_export_header",
"gz_include_header",
)
load(
"@gz//bazel/lint:lint.bzl",
"add_lint_tests",
)
load(
"@gz//msgs/tools:gz_msgs_generate.bzl",
"get_proto_headers",
"gz_msgs_generate",
"gz_proto_factory",
"gz_proto_library",
)
load("@rules_license//rules:license.bzl", "license")

package(
default_applicable_licenses = [GZ_ROOT + "msgs:license"],
default_visibility = GZ_VISIBILITY,
features = GZ_FEATURES,
)

licenses(["notice"]) # Apache-2.0
license(
name = "license",
package_name = "gz-msgs",
)

licenses(["notice"])

exports_files(["LICENSE"])

gz_configure_header(
name = "msgs_config_hh",
src = "include/gz/msgs/config.hh.in",
src = "core/include/gz/msgs/config.hh.in",
out = "include/gz/msgs/config.hh",
cmakelists = ["CMakeLists.txt"],
package = "msgs",
)
Expand All @@ -37,43 +50,29 @@ gz_export_header(
)

public_headers_no_gen = glob([
"include/gz/msgs/*.hh",
"include/gz/msgs/detail/*.hh",
"core/include/gz/msgs/*.hh",
"core/include/gz/msgs/convert/*.hh",
"core/include/gz/msgs/detail/*.hh",
])

protos = glob(["proto/gz/msgs/*.proto"])

gz_include_header(
name = "messagetypes_hh_genrule",
out = "include/gz/msgs/MessageTypes.hh",
hdrs = get_proto_headers(protos),
strip_prefix = ["gz_msgs"],
)

gz_include_header(
name = "msgs_hh_genrule",
out = "include/gz/msgs.hh",
hdrs = public_headers_no_gen + [
"include/gz/msgs/config.hh",
"include/gz/msgs/Export.hh",
"include/gz/msgs/MessageTypes.hh",
],
)

public_headers = public_headers_no_gen + [
"include/gz/msgs/config.hh",
"include/gz/msgs/Export.hh",
"include/gz/msgs/MessageTypes.hh",
"include/gz/msgs.hh",
]

# Custom Gazebo Protoc plugin
cc_binary(
name = "gz_msgs_gen",
srcs = [
"src/Generator.cc",
"src/Generator.hh",
"src/generator_main.cc",
"core/generator_lite/Generator.cc",
"core/generator_lite/Generator.hh",
"core/generator_lite/generator_main.cc",
],
deps = [
"@com_google_protobuf//:protobuf",
Expand All @@ -91,26 +90,51 @@ proto_library(
],
)

gz_msgs_generate(
gz_proto_library(
name = "gzmsgs_cc_proto",
proto_deps = [":gzmsgs_proto"],
deps = [
":gzmsgs_proto",
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:protobuf",
],
)

gz_proto_factory(
name = "gzmsgs_proto_factory",
cc_output = "core/src/RegisterMsgs.cc",
hh_output = "include/gz/msgs/MessageTypes.hh",
deps = [":gzmsgs_proto"],
)

public_headers = public_headers_no_gen + [
"include/gz/msgs/config.hh",
"include/gz/msgs/Export.hh",
"include/gz/msgs.hh",
"include/gz/msgs/MessageTypes.hh",
]

cc_library(
name = "msgs",
srcs = [
"src/Factory.cc",
"src/Filesystem.cc",
"src/Utility.cc",
":gzmsgs_cc_proto",
"core/src/DynamicFactory.cc",
"core/src/DynamicFactory.hh",
"core/src/Factory.cc",
"core/src/MessageFactory.cc",
"core/src/RegisterMsgs.cc",
"core/src/impl/InstallationDirectories.cc",
],
hdrs = public_headers,
includes = ["include"],
copts = [
"-Wno-duplicate-decl-specifier",
"-fexceptions",
],
includes = [
"core/include",
"core/src",
"include",
],
deps = [
":gzmsgs_cc_proto",
":gzmsgs_proto_factory",
GZ_ROOT + "math",
"@com_google_protobuf//:protobuf",
"@tinyxml2",
Expand Down Expand Up @@ -138,3 +162,100 @@ test_sources = glob(
"@gtest//:gtest_main",
],
) for src in test_sources]

cc_test(
name = "INTEGRATION_headers",
srcs = ["test/integration/headers.cc"],
deps = [
":gzmsgs_cc_proto",
"@gtest",
"@gtest//:gtest_main",
],
)

cc_test(
name = "INTEGRATION_image_msg",
srcs = ["test/integration/image_msg.cc"],
deps = [
":gzmsgs_cc_proto",
"@gtest",
"@gtest//:gtest_main",
],
)

cc_test(
name = "INTEGRATION_Utility",
srcs = ["test/integration/Utility_TEST.cc"],
deps = [
":msgs",
GZ_ROOT + "common/testing",
"@gtest",
"@gtest//:gtest_main",
],
)

cc_test(
name = "INTEGRATION_Factory",
srcs = ["test/integration/Factory_TEST.cc"],
data = ["test/desc/stringmsg.desc"],
defines = [
'GZ_MSGS_TEST_PATH=\\"msgs/test\\"',
],
deps = [
":msgs",
GZ_ROOT + "common/testing",
"@gtest",
"@gtest//:gtest_main",
],
)

cc_test(
name = "INTEGRATION_descriptors",
srcs = ["test/integration/descriptors.cc"],
data = ["test/desc"],
defines = [
'GZ_MSGS_TEST_PATH=\\"msgs/test\\"',
],
deps = [
":msgs",
GZ_ROOT + "common/testing",
"@gtest",
"@gtest//:gtest_main",
],
)

gz_configure_file(
name = "msgs_yaml",
src = "conf/msgs.yaml.in",
out = "msgs.yaml",
defines = [
"PROJECT_NAME_NO_VERSION_LOWER=msgs",
"gz_library_path=msgs/cmdmsgs",
],
package = "msgs",
)

gz_configure_file(
name = "msgs_rb",
src = "core/src/cmd/cmdmsgs.rb.in",
out = "cmdmsgs.rb",
defines = [
"library_location=libgz-msgs.so",
],
package = "msgs",
)

cc_binary(
name = "gz-msgs",
srcs = ["core/src/gz.cc"],
data = [
"cmdmsgs.rb",
"msgs.yaml",
":gzmsgs_proto",
],
linkshared = True,
linkstatic = True,
deps = [":msgs"],
)

add_lint_tests()
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ file(
# Install cmake support files
install(
DIRECTORY cmake/
DESTINATION "${PROJECT_CMAKE_EXTRAS_INSTALL_DIR}"
DESTINATION "${PROJECT_CMAKE_EXTRAS_RELATIVE_INSTALL_DIR}"
)

#============================================================================
Expand Down
45 changes: 45 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,51 @@

## Gazebo Msgs 10.x

### Gazebo Msgs 10.2.0 (2024-05-17)

1. CameraTrack message for advanced tracking and following.
* [Pull request #440](https://github.com/gazebosim/gz-msgs/pull/440)

1. Update minimum version of gz-cmake3
* [Pull request #439](https://github.com/gazebosim/gz-msgs/pull/439)

1. bazel: lint
* [Pull request #438](https://github.com/gazebosim/gz-msgs/pull/438)

1. Add package.xml
* [Pull request #432](https://github.com/gazebosim/gz-msgs/pull/432)

### Gazebo Msgs 10.1.2 (2024-04-08)

1. Use relative install paths for gz tool data and extra cmake files
* [Pull request #436](https://github.com/gazebosim/gz-msgs/pull/436)

1. Bazel updates for Harmonic
* [Pull request #397](https://github.com/gazebosim/gz-msgs/pull/397)

1. Fix MSVC "possible loss of data" warning
* [Pull request #434](https://github.com/gazebosim/gz-msgs/pull/434)

### Gazebo Msgs 10.1.1 (2024-03-14)

1. Allow topic and service to construct messages from description files
* [Pull request #428](https://github.com/gazebosim/gz-msgs/pull/428)

1. Conditionally use cmake_path on cmake < 3.20
* [Pull request #424](https://github.com/gazebosim/gz-msgs/pull/424)

1. Remove duplicate find_package(Python3) call
* [Pull request #420](https://github.com/gazebosim/gz-msgs/pull/420)

1. Bazel: Fix py_binary location
* [Pull request #406](https://github.com/gazebosim/gz-msgs/pull/406)

1. Fix compiler warning in `generator.cc`
* [Pull request #403](https://github.com/gazebosim/gz-msgs/pull/403)

1. Set GZ_TOOLS_VER to 2 for consistency with rest of Garden and Harmonic libraries
* [Pull request #391](https://github.com/gazebosim/gz-msgs/pull/391)

### Gazebo Msgs 10.1.0 (2024-01-22)

1. Add proto message for MaterialColor.
Expand Down
2 changes: 1 addition & 1 deletion conf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ configure_file(

# Install the yaml configuration files in an unversioned location.
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${GZ_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml
DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/)
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/gz/)
Loading

0 comments on commit cdc2839

Please sign in to comment.