diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 619ee94a5..23714cfef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,12 @@ name: Ubuntu CI -on: [push, pull_request] +on: + pull_request: + push: + branches: + - 'ign-common[0-9]' + - 'gz-common[0-9]' + - 'main' jobs: bionic-ci: @@ -8,7 +14,7 @@ jobs: name: Ubuntu Bionic CI steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Compile and test id: ci uses: ignition-tooling/action-ignition-ci@bionic @@ -19,7 +25,7 @@ jobs: name: Ubuntu Focal CI steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Compile and test id: ci uses: ignition-tooling/action-ignition-ci@focal diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 736670e0e..2332244bf 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -10,10 +10,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Add ticket to inbox - uses: technote-space/create-project-card-action@v1 + uses: actions/add-to-project@v0.5.0 with: - PROJECT: Core development - COLUMN: Inbox - GITHUB_TOKEN: ${{ secrets.TRIAGE_TOKEN }} - CHECK_ORG_PROJECT: true - + project-url: https://github.com/orgs/gazebosim/projects/7 + github-token: ${{ secrets.TRIAGE_TOKEN }} diff --git a/Changelog.md b/Changelog.md index c7b112e37..c4cb195c5 100644 --- a/Changelog.md +++ b/Changelog.md @@ -292,6 +292,41 @@ ## Gazebo Common 3.x +## Gazebo Common 3.16.0 (2023-06-05) + +1. Include cstdint to build with GCC 13 + * [Pull request #517](https://github.com/gazebosim/gz-common/pull/517) + +1. Fix missing cstdint header in latest gcc build + * [Pull request #513](https://github.com/gazebosim/gz-common/pull/513) + +1. Fix for ffmpeg v6 + * [Pull request #497](https://github.com/gazebosim/gz-common/pull/497) + +1. Include cstring for memcpy + * [Pull request #501](https://github.com/gazebosim/gz-common/pull/501) + +1. Fixed MeshManager Singleton + * [Pull request #451](https://github.com/gazebosim/gz-common/pull/451) + +1. Rename COPYING to LICENSE + * [Pull request #494](https://github.com/gazebosim/gz-common/pull/494) + +1. Add marcoag as codeowner + * [Pull request #493](https://github.com/gazebosim/gz-common/pull/493) + +1. CI workflow: use checkout v3 + * [Pull request #490](https://github.com/gazebosim/gz-common/pull/490) + +1. Improved coverage remotery + * [Pull request #467](https://github.com/gazebosim/gz-common/pull/467) + +1. Added BVH and STL loader tests + * [Pull request #466](https://github.com/gazebosim/gz-common/pull/466) + +1. Increased Image coverage + * [Pull request #465](https://github.com/gazebosim/gz-common/pull/465) + ## Gazebo Common 3.15.1 (2022-10-11) 1. Fix build on case-insensitive filesystems diff --git a/include/gz/common/Filesystem.hh b/include/gz/common/Filesystem.hh index a9017427a..283bffac8 100644 --- a/include/gz/common/Filesystem.hh +++ b/include/gz/common/Filesystem.hh @@ -64,7 +64,13 @@ namespace ignition /// \return True if directory creation was successful, false otherwise. bool IGNITION_COMMON_VISIBLE createDirectory(const std::string &_path); - /// \brief Create directories for the given path + /// \brief Create directories for the given path errors are printed to the given stream + /// \param[in] _path Path to create directories from + /// \param[in] _errorOut Stream for error output + /// \return true on success + bool IGNITION_COMMON_VISIBLE createDirectories(const std::string &_path, std::ostream &_errorOut); + + /// \brief Create directories for the given path errors are printed on ignerr /// \param[in] _path Path to create directories from /// \return true on success bool IGNITION_COMMON_VISIBLE createDirectories(const std::string &_path); diff --git a/profiler/src/ProfilerImpl.hh b/profiler/src/ProfilerImpl.hh index 02d4a3769..907b4efb5 100644 --- a/profiler/src/ProfilerImpl.hh +++ b/profiler/src/ProfilerImpl.hh @@ -20,6 +20,7 @@ #include #include +#include namespace ignition { diff --git a/profiler/src/RemoteryProfilerImpl.hh b/profiler/src/RemoteryProfilerImpl.hh index 90acd261f..bbb4b89bb 100644 --- a/profiler/src/RemoteryProfilerImpl.hh +++ b/profiler/src/RemoteryProfilerImpl.hh @@ -19,6 +19,7 @@ #define GZ_COMMON_REMOTERYPROFILERIMPL_HH_ #include +#include #include "RemoteryConfig.h" #include "Remotery.h" diff --git a/src/Console.cc b/src/Console.cc index 88bfa0767..e8968dec4 100644 --- a/src/Console.cc +++ b/src/Console.cc @@ -261,8 +261,8 @@ void FileLogger::Init(const std::string &_directory, { if (!env(IGN_HOMEDIR, logPath)) { - ignerr << "Missing HOME environment variable." - << "No log file will be generated."; + std::cerr << "Missing HOME environment variable. " + << "No log file will be generated."; return; } logPath = joinPaths(logPath, _directory); @@ -275,7 +275,12 @@ void FileLogger::Init(const std::string &_directory, auto* buf = dynamic_cast(this->rdbuf()); // Create the directory if it doesn't exist. - createDirectories(logPath); + if(!createDirectories(logPath, std::cerr)) + { + std::cerr << "Failed to generate log directories. " + << "No log file will be generated."; + return; + } logPath = joinPaths(logPath, _filename); diff --git a/src/EnumIface_TEST.cc b/src/EnumIface_TEST.cc index 69a70b77b..852e2b7dd 100644 --- a/src/EnumIface_TEST.cc +++ b/src/EnumIface_TEST.cc @@ -41,7 +41,7 @@ IGN_ENUM(myTypeIface, MyType, MY_TYPE_BEGIN, MY_TYPE_END, ///////////////////////////////////////////////// TEST_F(EnumIfaceTest, StringCoversion) { - MyType type; + MyType type = MyType::TYPE2; // Set value from string myTypeIface.Set(type, "TYPE1"); diff --git a/src/Filesystem.cc b/src/Filesystem.cc index 5f70ad1fb..679b4c024 100644 --- a/src/Filesystem.cc +++ b/src/Filesystem.cc @@ -464,6 +464,17 @@ bool common::copyDirectory(const std::string &_existingDirname, ///////////////////////////////////////////////// bool common::createDirectories(const std::string &_path) +{ + std::ostringstream ss; + auto ret = createDirectories(_path, ss); + if (!ret) + ignerr << ss.str(); + return ret; +} + +///////////////////////////////////////////////// +bool common::createDirectories( + const std::string &_path, std::ostream &_errorOut) { size_t index = 0; while (index < _path.size()) @@ -481,8 +492,8 @@ bool common::createDirectories(const std::string &_path) if (mkdir(dir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0) { #endif - ignerr << "Failed to create directory [" + dir + "]: " - << std::strerror(errno) << std::endl; + _errorOut << "Failed to create directory [" + dir + "]: " + << std::strerror(errno) << std::endl; return false; } }