Skip to content

Commit

Permalink
Merge pull request #145 from gazebosim/scpeters/merge_2_main
Browse files Browse the repository at this point in the history
Merge gz-plugin2 ➡️  main
  • Loading branch information
scpeters authored May 24, 2024
2 parents f729ca0 + b68ef31 commit 9ab8376
Show file tree
Hide file tree
Showing 13 changed files with 89 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# More info:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners

* @mxgrey @ahcorde
* @ahcorde
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: Ubuntu CI

on: [push, pull_request]
on:
pull_request:
push:
branches:
- 'ign-plugin[0-9]'
- 'gz-plugin[0-9]'
- 'main'

jobs:
jammy-ci:
runs-on: ubuntu-latest
name: Ubuntu Jammy CI
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@jammy
Expand Down
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
1 change: 0 additions & 1 deletion .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@ jobs:
with:
project-url: https://github.com/orgs/gazebosim/projects/7
github-token: ${{ secrets.TRIAGE_TOKEN }}

11 changes: 7 additions & 4 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
load(
"@gz//bazel/skylark:build_defs.bzl",
"GZ_FEATURES",
"GZ_ROOT",
"GZ_VISIBILITY",
"gz_configure_header",
Expand All @@ -10,7 +9,6 @@ load(

package(
default_visibility = GZ_VISIBILITY,
features = GZ_FEATURES,
)

licenses(["notice"]) # Apache-2.0
Expand Down Expand Up @@ -43,8 +41,8 @@ gz_include_header(
name = "pluginhh_genrule",
out = "core/include/gz/plugin.hh",
hdrs = public_headers_no_gen + [
"core/include/gz/plugin/config.hh",
"core/include/gz/plugin/Export.hh",
"core/include/gz/plugin/config.hh",
],
)

Expand Down Expand Up @@ -93,6 +91,7 @@ cc_library(
],
deps = [
":core",
":loader",
],
)

Expand Down Expand Up @@ -126,11 +125,15 @@ cc_library(

cc_test(
name = "Loader_TEST",
srcs = ["loader/src/Loader_TEST.cc"],
srcs = [
"loader/src/Loader_TEST.cc",
":config",
],
defines = [
'GzDummyPlugins_LIB=\\"./plugin/test/libGzDummyPlugins.so\\"',
],
deps = [
":core",
":loader",
GZ_ROOT + "plugin/test:test_plugins",
"@gtest",
Expand Down
21 changes: 21 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,27 @@

## Gazebo Plugin 2.x

### Gazebo Plugin 2.0.3 (2024-04-08)

1. Use relative install path for gz tool data
* [Pull request #140](https://github.com/gazebosim/gz-plugin/pull/140)

1. Remove @mxgrey as codeowner and assign maintainership to @ahcorde
* [Pull request #137](https://github.com/gazebosim/gz-plugin/pull/137)

1. Update CI badges in README
* [Pull request #134](https://github.com/gazebosim/gz-plugin/pull/134)

1. Infrastructure
* [Pull request #132](https://github.com/gazebosim/gz-plugin/pull/132)

1. Enable and fix gz test on windows
* [Pull request #128](https://github.com/gazebosim/gz-plugin/pull/128)
* [Pull request #131](https://github.com/gazebosim/gz-plugin/pull/131)

1. Do not install CMakeLists.txt in loader/register
* [Pull request #123](https://github.com/gazebosim/gz-plugin/pull/123)

### Gazebo Plugin 2.0.2 (2023-09-26)

1. Add explicit dependency on plugin library
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gazebo Plugin

**Maintainer:** grey [AT] openrobotics [DOT] org
**Maintainer:** ahcorde [AT] gmail [DOT] com

[![GitHub open issues](https://img.shields.io/github/issues-raw/gazebosim/gz-plugin.svg)](https://github.com/gazebosim/gz-plugin/issues)
[![GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/gazebosim/gz-plugin.svg)](https://github.com/gazebosim/gz-plugin/pulls)
Expand All @@ -9,13 +9,14 @@

Build | Status
-- | --
Test coverage | [![codecov](https://codecov.io/gh/gazebosim/gz-plugin/branch/main/graph/badge.svg)](https://codecov.io/gh/gazebosim/gz-plugin/branch/main)
Ubuntu Focal | [![Build Status](https://build.osrfoundation.org/job/ignition_plugin-ci-main-focal-amd64/badge/icon)](https://build.osrfoundation.org/job/ignition_plugin-ci-main-focal-amd64/)
Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=ignition_plugin-ci-main-homebrew-amd64)](https://build.osrfoundation.org/job/ignition_plugin-ci-main-homebrew-amd64)
Windows | [![Build Status](https://build.osrfoundation.org/view/ign-garden/job/ign_plugin-gz-2-win/badge/icon)](https://build.osrfoundation.org/view/ign-garden/job/ign_plugin-gz-2-win/)
Test coverage | [![codecov](https://codecov.io/gh/gazebosim/gz-plugin/tree/main/graph/badge.svg)](https://codecov.io/gh/gazebosim/gz-plugin/tree/main)
Ubuntu Jammy | [![Build Status](https://build.osrfoundation.org/job/gz_plugin-ci-main-jammy-amd64/badge/icon)](https://build.osrfoundation.org/job/gz_plugin-ci-main-jammy-amd64/)
Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_plugin-ci-main-homebrew-amd64)](https://build.osrfoundation.org/job/gz_plugin-ci-main-homebrew-amd64)
Windows | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_plugin-main-win)](https://build.osrfoundation.org/job/gz_plugin-main-win)


Gazebo Plugin is a component in the [Gazebo](http://gazebosim.org) framework, a set
of libraries designed to rapidly develop robot applications.
of libraries designed to rapidly develop robot applications.
It is used to register plugin libraries and load them dynamically at runtime.

[http://gazebosim.org](http://gazebosim.org)
Expand Down
6 changes: 4 additions & 2 deletions loader/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@

# Collect source files into the "sources" variable and unit test files into the
# "tests" variable
gz_get_libsources_and_unittests(sources tests)

# Disable gz_TEST if gz-tools is not found
if (MSVC OR NOT GZ_TOOLS_PROGRAM)
if (NOT GZ_TOOLS_PROGRAM)
list(REMOVE_ITEM tests src/gz_TEST.cc)
endif()

Expand Down Expand Up @@ -53,7 +54,8 @@ endif()

install(
DIRECTORY include/
DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL})
DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL}
PATTERN "CMakeLists.txt" EXCLUDE)

#============================================================================
# gz command line support
Expand Down
4 changes: 2 additions & 2 deletions loader/conf/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ 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/)

# Tack version onto and install the bash completion script
configure_file(
Expand All @@ -34,4 +34,4 @@ install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/plugin${PROJECT_VERSION_MAJOR}.bash_completion.sh
DESTINATION
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/gz${GZ_TOOLS_VER}.completion.d)
${CMAKE_INSTALL_DATAROOTDIR}/gz/gz${GZ_TOOLS_VER}.completion.d)
6 changes: 2 additions & 4 deletions loader/src/cmd/cmdplugin.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# limitations under the License.

require 'open3'
require 'pathname'

# Constants.
LIBRARY_VERSION = '@PROJECT_VERSION_FULL@'
Expand All @@ -30,10 +31,7 @@ class Cmd
command = args[0]
exe_name = COMMANDS[command]

if exe_name[0] == '/'
# If the first character is a slash, we'll assume that we've been given an
# absolute path to the executable. This is only used during test mode.
else
unless Pathname.new(exe_name).absolute?
# We're assuming that the library path is relative to the current
# location of this script.
exe_name = File.expand_path(File.join(File.dirname(__FILE__), exe_name))
Expand Down
4 changes: 3 additions & 1 deletion loader/src/gz_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
#include <iostream>
#include <string>

#include <gz/utils/ExtraTestMacros.hh>

#include "gtest/gtest.h"
#include "gz/plugin/Loader.hh"

Expand Down Expand Up @@ -211,7 +213,7 @@ TEST(gzTest, PluginInfoVerboseDummyPlugins)

//////////////////////////////////////////////////
/// \brief Check --help message and bash completion script for consistent flags
TEST(gzTest, PluginHelpVsCompletionFlags)
TEST(gzTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(PluginHelpVsCompletionFlags))
{
// Path to gz executable
std::string gz = std::string(GZ_PATH);
Expand Down
21 changes: 21 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?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-plugin3</name>
<version>3.0.0</version>
<description>Gazebo Plugin : Cross-platform C++ library for dynamically loading plugins.</description>
<maintainer email="[email protected]">Alejandro Hernández Cordero</maintainer>
<license>Apache License 2.0</license>
<url type="website">https://github.com/gazebosim/gz-plugin</url>

<buildtool_depend>cmake</buildtool_depend>

<build_depend>gz-cmake4</build_depend>

<depend>gz-tools2</depend>
<depend>gz-utils3</depend>

<export>
<build_type>cmake</build_type>
</export>
</package>
3 changes: 2 additions & 1 deletion register/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ gz_add_component(register INTERFACE)

install(
DIRECTORY include/
DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL})
DESTINATION ${GZ_INCLUDE_INSTALL_DIR_FULL}
PATTERN "CMakeLists.txt" EXCLUDE)

0 comments on commit 9ab8376

Please sign in to comment.