From e3f55e91fc4d2e2bac66d9236d8cbc08bdd41dc2 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Thu, 1 Aug 2024 14:03:21 -0500 Subject: [PATCH] Use Ubuntu 24.04 in Github Actions CI workflow (#427) Signed-off-by: Addisu Z. Taddese --- .github/workflows/ci.yml | 13 +++++++++++++ README.md | 2 +- src/FuelClient_TEST.cc | 14 +++++++++----- src/LocalCache.cc | 4 ++-- 4 files changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ede0594..2d0974ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,3 +18,16 @@ jobs: - name: Compile and test id: ci uses: gazebo-tooling/action-gz-ci@jammy + with: + codecov-enabled: true + cppcheck-enabled: true + cpplint-enabled: true + noble-ci: + runs-on: ubuntu-latest + name: Ubuntu Noble CI + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Compile and test + id: ci + uses: gazebo-tooling/action-gz-ci@noble diff --git a/README.md b/README.md index fe40bb12..d8c30fa7 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Build | Status -- | -- Test coverage | [![codecov](https://codecov.io/gh/gazebosim/gz-fuel-tools/tree/main/graph/badge.svg)](https://codecov.io/gh/gazebosim/gz-fuel-tools/tree/main) -Ubuntu Jammy | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_fuel_tools-ci-main-jammy-amd64)](https://build.osrfoundation.org/job/gz_fuel_tools-ci-main-jammy-amd64) +Ubuntu Noble | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_fuel_tools-ci-main-noble-amd64)](https://build.osrfoundation.org/job/gz_fuel_tools-ci-main-noble-amd64) Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_fuel_tools-ci-main-homebrew-amd64)](https://build.osrfoundation.org/job/gz_fuel_tools-ci-main-homebrew-amd64) Windows | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_fuel_tools-main-win)](https://build.osrfoundation.org/job/gz_fuel_tools-main-win/) diff --git a/src/FuelClient_TEST.cc b/src/FuelClient_TEST.cc index 8b223e1a..fce34a0d 100644 --- a/src/FuelClient_TEST.cc +++ b/src/FuelClient_TEST.cc @@ -721,7 +721,8 @@ TEST_F(FuelClientTest, CachedModel) // Cached model (tip) { - common::URI url{"http://localhost:8007/1.0/alice/models/My Model/tip", true}; + common::URI url{"http://localhost:8007/1.0/alice/models/My Model/tip", + true}; std::string path; auto result = client.CachedModel(url, path); EXPECT_TRUE(result); @@ -744,7 +745,8 @@ TEST_F(FuelClientTest, CachedModel) // Cached model file (tip) { common::URI url{ - "http://localhost:8007/1.0/alice/models/My Model/tip/files/model.sdf", true}; + "http://localhost:8007/1.0/alice/models/My Model/tip/files/model.sdf", + true}; std::string path; auto result = client.CachedModelFile(url, path); EXPECT_TRUE(result); @@ -776,7 +778,8 @@ TEST_F(FuelClientTest, CachedModel) // Non-cached model (when looking for file) { - common::URI url{"http://localhost:8007/1.0/alice/models/Banana/model.sdf", true}; + common::URI url{"http://localhost:8007/1.0/alice/models/Banana/model.sdf", + true}; std::string path; auto result = client.CachedModelFile(url, path); EXPECT_FALSE(result); @@ -1186,7 +1189,8 @@ TEST_F(FuelClientTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(CachedWorld)) // Cached world (tip) { - common::URI url{"http://localhost:8007/1.0/banana/worlds/My World/tip", true}; + common::URI url{"http://localhost:8007/1.0/banana/worlds/My World/tip", + true}; std::string path; auto result = client.CachedWorld(url, path); EXPECT_TRUE(result); @@ -1516,7 +1520,7 @@ TEST_F(FuelClientTest, GZ_UTILS_TEST_DISABLED_ON_WIN32(PatchModelFail)) // Bad model.config result = client.PatchModel(modelId, headers, - common::joinPaths(common::cwd(), "test_cache", + common::joinPaths(common::cwd(), "test_cache", sanitizeAuthority("localhost:8007"), "alice", "models", "My Model", "3")); EXPECT_EQ(ResultType::UPLOAD_ERROR, result.Type()); diff --git a/src/LocalCache.cc b/src/LocalCache.cc index 32e15efa..bbb81254 100644 --- a/src/LocalCache.cc +++ b/src/LocalCache.cc @@ -286,7 +286,7 @@ Model LocalCache::MatchingModel(const ModelIdentifier &_id) this->dataPtr->config->CacheLocation(), uriToPath(_id.Server().Url())); auto srvModels = this->dataPtr->ModelsInServer(path); - for (auto &model: srvModels) + for (auto &model : srvModels) { model.dataPtr->id.SetServer(_id.Server()); auto id = model.Identification(); @@ -316,7 +316,7 @@ bool LocalCache::MatchingWorld(WorldIdentifier &_id) const this->dataPtr->config->CacheLocation(), uriToPath(_id.Server().Url())); auto srvWorlds = this->dataPtr->WorldsInServer(path); - for (auto id: srvWorlds) + for (auto id : srvWorlds) { id.SetServer(_id.Server()); if (_id == id)