Skip to content

Commit 98fce61

Browse files
authored
Merge pull request #559 from gazebosim/azeey/3_to_4
Merge ign-common3 ➡️ ign-common4
2 parents 1243852 + bdfa408 commit 98fce61

File tree

9 files changed

+78
-16
lines changed

9 files changed

+78
-16
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
name: Ubuntu CI
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- 'ign-common[0-9]'
8+
- 'gz-common[0-9]'
9+
- 'main'
410

511
jobs:
612
bionic-ci:
713
runs-on: ubuntu-latest
814
name: Ubuntu Bionic CI
915
steps:
1016
- name: Checkout
11-
uses: actions/checkout@v3
17+
uses: actions/checkout@v4
1218
- name: Compile and test
1319
id: ci
1420
uses: ignition-tooling/action-ignition-ci@bionic
@@ -19,7 +25,7 @@ jobs:
1925
name: Ubuntu Focal CI
2026
steps:
2127
- name: Checkout
22-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
2329
- name: Compile and test
2430
id: ci
2531
uses: ignition-tooling/action-ignition-ci@focal

.github/workflows/triage.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Add ticket to inbox
13-
uses: technote-space/create-project-card-action@v1
13+
uses: actions/[email protected]
1414
with:
15-
PROJECT: Core development
16-
COLUMN: Inbox
17-
GITHUB_TOKEN: ${{ secrets.TRIAGE_TOKEN }}
18-
CHECK_ORG_PROJECT: true
19-
15+
project-url: https://github.com/orgs/gazebosim/projects/7
16+
github-token: ${{ secrets.TRIAGE_TOKEN }}

Changelog.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,41 @@
292292

293293
## Gazebo Common 3.x
294294

295+
## Gazebo Common 3.16.0 (2023-06-05)
296+
297+
1. Include cstdint to build with GCC 13
298+
* [Pull request #517](https://github.com/gazebosim/gz-common/pull/517)
299+
300+
1. Fix missing cstdint header in latest gcc build
301+
* [Pull request #513](https://github.com/gazebosim/gz-common/pull/513)
302+
303+
1. Fix for ffmpeg v6
304+
* [Pull request #497](https://github.com/gazebosim/gz-common/pull/497)
305+
306+
1. Include cstring for memcpy
307+
* [Pull request #501](https://github.com/gazebosim/gz-common/pull/501)
308+
309+
1. Fixed MeshManager Singleton
310+
* [Pull request #451](https://github.com/gazebosim/gz-common/pull/451)
311+
312+
1. Rename COPYING to LICENSE
313+
* [Pull request #494](https://github.com/gazebosim/gz-common/pull/494)
314+
315+
1. Add marcoag as codeowner
316+
* [Pull request #493](https://github.com/gazebosim/gz-common/pull/493)
317+
318+
1. CI workflow: use checkout v3
319+
* [Pull request #490](https://github.com/gazebosim/gz-common/pull/490)
320+
321+
1. Improved coverage remotery
322+
* [Pull request #467](https://github.com/gazebosim/gz-common/pull/467)
323+
324+
1. Added BVH and STL loader tests
325+
* [Pull request #466](https://github.com/gazebosim/gz-common/pull/466)
326+
327+
1. Increased Image coverage
328+
* [Pull request #465](https://github.com/gazebosim/gz-common/pull/465)
329+
295330
## Gazebo Common 3.15.1 (2022-10-11)
296331

297332
1. Fix build on case-insensitive filesystems

include/gz/common/Filesystem.hh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,13 @@ namespace ignition
6464
/// \return True if directory creation was successful, false otherwise.
6565
bool IGNITION_COMMON_VISIBLE createDirectory(const std::string &_path);
6666

67-
/// \brief Create directories for the given path
67+
/// \brief Create directories for the given path errors are printed to the given stream
68+
/// \param[in] _path Path to create directories from
69+
/// \param[in] _errorOut Stream for error output
70+
/// \return true on success
71+
bool IGNITION_COMMON_VISIBLE createDirectories(const std::string &_path, std::ostream &_errorOut);
72+
73+
/// \brief Create directories for the given path errors are printed on ignerr
6874
/// \param[in] _path Path to create directories from
6975
/// \return true on success
7076
bool IGNITION_COMMON_VISIBLE createDirectories(const std::string &_path);

profiler/src/ProfilerImpl.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
#include <cstdint>
2222
#include <string>
23+
#include <cstdint>
2324

2425
namespace ignition
2526
{

profiler/src/RemoteryProfilerImpl.hh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#define GZ_COMMON_REMOTERYPROFILERIMPL_HH_
2020

2121
#include <string>
22+
#include <cstdint>
2223

2324
#include "RemoteryConfig.h"
2425
#include "Remotery.h"

src/Console.cc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ void FileLogger::Init(const std::string &_directory,
261261
{
262262
if (!env(IGN_HOMEDIR, logPath))
263263
{
264-
ignerr << "Missing HOME environment variable."
265-
<< "No log file will be generated.";
264+
std::cerr << "Missing HOME environment variable. "
265+
<< "No log file will be generated.";
266266
return;
267267
}
268268
logPath = joinPaths(logPath, _directory);
@@ -275,7 +275,12 @@ void FileLogger::Init(const std::string &_directory,
275275
auto* buf = dynamic_cast<FileLogger::Buffer*>(this->rdbuf());
276276

277277
// Create the directory if it doesn't exist.
278-
createDirectories(logPath);
278+
if(!createDirectories(logPath, std::cerr))
279+
{
280+
std::cerr << "Failed to generate log directories. "
281+
<< "No log file will be generated.";
282+
return;
283+
}
279284

280285
logPath = joinPaths(logPath, _filename);
281286

src/EnumIface_TEST.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ IGN_ENUM(myTypeIface, MyType, MY_TYPE_BEGIN, MY_TYPE_END,
4141
/////////////////////////////////////////////////
4242
TEST_F(EnumIfaceTest, StringCoversion)
4343
{
44-
MyType type;
44+
MyType type = MyType::TYPE2;
4545

4646
// Set value from string
4747
myTypeIface.Set(type, "TYPE1");

src/Filesystem.cc

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,17 @@ bool common::copyDirectory(const std::string &_existingDirname,
464464

465465
/////////////////////////////////////////////////
466466
bool common::createDirectories(const std::string &_path)
467+
{
468+
std::ostringstream ss;
469+
auto ret = createDirectories(_path, ss);
470+
if (!ret)
471+
ignerr << ss.str();
472+
return ret;
473+
}
474+
475+
/////////////////////////////////////////////////
476+
bool common::createDirectories(
477+
const std::string &_path, std::ostream &_errorOut)
467478
{
468479
size_t index = 0;
469480
while (index < _path.size())
@@ -481,8 +492,8 @@ bool common::createDirectories(const std::string &_path)
481492
if (mkdir(dir.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH) != 0)
482493
{
483494
#endif
484-
ignerr << "Failed to create directory [" + dir + "]: "
485-
<< std::strerror(errno) << std::endl;
495+
_errorOut << "Failed to create directory [" + dir + "]: "
496+
<< std::strerror(errno) << std::endl;
486497
return false;
487498
}
488499
}

0 commit comments

Comments
 (0)