Skip to content

Commit

Permalink
Merge pull request #559 from gazebosim/azeey/3_to_4
Browse files Browse the repository at this point in the history
Merge ign-common3 ➡️  ign-common4
  • Loading branch information
azeey authored Dec 15, 2023
2 parents 1243852 + bdfa408 commit 98fce61
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 16 deletions.
12 changes: 9 additions & 3 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-common[0-9]'
- 'gz-common[0-9]'
- 'main'

jobs:
bionic-ci:
runs-on: ubuntu-latest
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
Expand All @@ -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
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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 }}
35 changes: 35 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion include/gz/common/Filesystem.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions profiler/src/ProfilerImpl.hh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <cstdint>
#include <string>
#include <cstdint>

namespace ignition
{
Expand Down
1 change: 1 addition & 0 deletions profiler/src/RemoteryProfilerImpl.hh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define GZ_COMMON_REMOTERYPROFILERIMPL_HH_

#include <string>
#include <cstdint>

#include "RemoteryConfig.h"
#include "Remotery.h"
Expand Down
11 changes: 8 additions & 3 deletions src/Console.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -275,7 +275,12 @@ void FileLogger::Init(const std::string &_directory,
auto* buf = dynamic_cast<FileLogger::Buffer*>(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);

Expand Down
2 changes: 1 addition & 1 deletion src/EnumIface_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
15 changes: 13 additions & 2 deletions src/Filesystem.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand All @@ -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;
}
}
Expand Down

0 comments on commit 98fce61

Please sign in to comment.