From 65d493a07c183e29d19fca39e3ac1fc3d7c1f0e1 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Fri, 19 Jul 2024 16:25:13 -0500 Subject: [PATCH 1/5] Use Ubuntu 24.04 in Github Actions CI workflow Signed-off-by: Addisu Z. Taddese --- .github/workflows/ci.yml | 10 +++++++--- README.md | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ede0594..86e5f0fc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,12 +9,16 @@ on: - 'main' jobs: - jammy-ci: + noble-ci: runs-on: ubuntu-latest - name: Ubuntu Jammy CI + name: Ubuntu Noble CI steps: - name: Checkout uses: actions/checkout@v4 - name: Compile and test id: ci - uses: gazebo-tooling/action-gz-ci@jammy + uses: gazebo-tooling/action-gz-ci@noble + with: + codecov-enabled: true + cppcheck-enabled: true + cpplint-enabled: true 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/) From 7157514ef7f2b610747a4c6dc297865708dbabab Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Fri, 19 Jul 2024 16:37:03 -0500 Subject: [PATCH 2/5] Fix cpplint errors Signed-off-by: Addisu Z. Taddese --- src/FuelClient_TEST.cc | 14 +++++++++----- src/LocalCache.cc | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) 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) From 8933a58a221d8ce11c24a7fdb584d68dee93953d Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Tue, 30 Jul 2024 10:36:10 -0500 Subject: [PATCH 3/5] Disable codecov for now since it doesn't work on this repo Signed-off-by: Addisu Z. Taddese --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86e5f0fc..ae6fcc67 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,6 @@ jobs: id: ci uses: gazebo-tooling/action-gz-ci@noble with: - codecov-enabled: true + codecov-enabled: false cppcheck-enabled: true cpplint-enabled: true From 85e4178fd40262170a361bdf0bb6b47aaa66698a Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Wed, 31 Jul 2024 08:54:15 -0500 Subject: [PATCH 4/5] Keep Jammy CI, but enable codecov Signed-off-by: Addisu Z. Taddese --- .github/workflows/ci.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae6fcc67..4e91b4fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,16 +9,25 @@ on: - 'main' jobs: - noble-ci: + jammy-ci: runs-on: ubuntu-latest - name: Ubuntu Noble CI + name: Ubuntu Jammy CI steps: - name: Checkout uses: actions/checkout@v4 - name: Compile and test id: ci - uses: gazebo-tooling/action-gz-ci@noble + uses: gazebo-tooling/action-gz-ci@jammy with: codecov-enabled: false 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 From 8227ff450ce9cae7a64c9eec7d08b05e32b46b37 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Wed, 31 Jul 2024 14:30:23 -0500 Subject: [PATCH 5/5] Actually enable codecov Signed-off-by: Addisu Z. Taddese --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e91b4fd..2d0974ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: id: ci uses: gazebo-tooling/action-gz-ci@jammy with: - codecov-enabled: false + codecov-enabled: true cppcheck-enabled: true cpplint-enabled: true noble-ci: