From 61403c5971537f327870712649a9666fc116f4c9 Mon Sep 17 00:00:00 2001 From: Steve Peters Date: Wed, 14 Aug 2024 14:32:42 -0700 Subject: [PATCH] Enable 24.04 CI, require cmake 3.22.1 (#1037) * Part of gazebosim/gz-cmake#350. * Fix push branch regex to support multi-digit versions. * Fix README CI badges * Remove logic for outdated cmake version * Add packages-noble.apt for ogre-next-2.3, vulcan * waves.cc: fix msvc warnings Signed-off-by: Steve Peters Signed-off-by: Ian Chen Co-authored-by: Ian Chen --- .github/ci/packages-noble.apt | 2 ++ .github/workflows/ci.yml | 14 ++++++++++++-- CMakeLists.txt | 4 ++-- README.md | 6 +++--- examples/actor_animation/CMakeLists.txt | 2 +- examples/boundingbox_camera/CMakeLists.txt | 2 +- examples/camera_tracking/CMakeLists.txt | 2 +- examples/custom_scene_viewer/CMakeLists.txt | 2 +- examples/custom_shaders/CMakeLists.txt | 2 +- examples/custom_shaders_uniforms/CMakeLists.txt | 2 +- examples/depth_camera/CMakeLists.txt | 2 +- examples/global_illumination/CMakeLists.txt | 2 +- examples/heightmap/CMakeLists.txt | 2 +- examples/hello_world_plugin/CMakeLists.txt | 2 +- examples/lidar_visual/CMakeLists.txt | 2 +- examples/lux_core_engine/CMakeLists.txt | 2 +- examples/mesh_viewer/CMakeLists.txt | 2 +- examples/mouse_picking/CMakeLists.txt | 2 +- examples/ogre2_demo/CMakeLists.txt | 2 +- examples/particles_demo/CMakeLists.txt | 2 +- examples/projector/CMakeLists.txt | 2 +- examples/render_pass/CMakeLists.txt | 2 +- examples/segmentation_camera/CMakeLists.txt | 2 +- examples/simple_demo/CMakeLists.txt | 2 +- examples/simple_demo_qml/CMakeLists.txt | 2 +- examples/text_geom/CMakeLists.txt | 2 +- examples/thermal_camera/CMakeLists.txt | 2 +- examples/transform_control/CMakeLists.txt | 2 +- examples/view_control/CMakeLists.txt | 2 +- examples/visualization_demo/CMakeLists.txt | 2 +- examples/waves/CMakeLists.txt | 2 +- examples/wide_angle_camera/CMakeLists.txt | 2 +- test/integration/waves.cc | 4 ++-- 33 files changed, 49 insertions(+), 37 deletions(-) create mode 100644 .github/ci/packages-noble.apt diff --git a/.github/ci/packages-noble.apt b/.github/ci/packages-noble.apt new file mode 100644 index 000000000..0b0aae20f --- /dev/null +++ b/.github/ci/packages-noble.apt @@ -0,0 +1,2 @@ +libogre-next-2.3-dev +libvulkan-dev diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a8b59821d..255e5ad29 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: push: branches: - 'ign-rendering[0-9]' - - 'gz-rendering[0-9]?' + - 'gz-rendering[1-9]?[0-9]' - 'main' jobs: @@ -20,6 +20,16 @@ jobs: uses: gazebo-tooling/action-gz-ci@jammy with: codecov-enabled: true + doxygen-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 + with: cppcheck-enabled: true cpplint-enabled: true - doxygen-enabled: true diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f9b4a918..790178574 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) #============================================================================ # Initialize the project @@ -53,7 +53,7 @@ set(GZ_UTILS_VER ${gz-utils3_VERSION_MAJOR}) #-------------------------------------- # Find OpenGL # See CMP0072 for more details (cmake --help-policy CMP0072) -if ((NOT ${CMAKE_VERSION} VERSION_LESS 3.11) AND (NOT OpenGL_GL_PREFERENCE)) +if (NOT OpenGL_GL_PREFERENCE) set(OpenGL_GL_PREFERENCE "GLVND") endif() diff --git a/README.md b/README.md index 218c13502..92506a21f 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,10 @@ Build | Status -- | -- -Test coverage | [![codecov](https://codecov.io/gh/gazebosim/gz-rendering/tree/main/graph/badge.svg)](https://codecov.io/gh/gazebosim/gz-rendering/tree/main) -Ubuntu Jammy | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_rendering-ci-main-jammy-amd64)](https://build.osrfoundation.org/job/gz_rendering-ci-main-jammy-amd64) +Test coverage | [![codecov](https://codecov.io/gh/gazebosim/gz-rendering/branch/main/graph/badge.svg)](https://codecov.io/gh/gazebosim/gz-rendering/branch/main) +Ubuntu Noble | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_rendering-ci-main-noble-amd64)](https://build.osrfoundation.org/job/gz_rendering-ci-main-noble-amd64) Homebrew | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_rendering-ci-main-homebrew-amd64)](https://build.osrfoundation.org/job/gz_rendering-ci-main-homebrew-amd64) -Windows | [![Build Status](https://build.osrfoundation.org/job/gz_rendering-main-win/badge/icon)](https://build.osrfoundation.org/job/gz_rendering-main-win/) +Windows | [![Build Status](https://build.osrfoundation.org/buildStatus/icon?job=gz_rendering-main-win)](https://build.osrfoundation.org/job/gz_rendering-main-win) Gazebo Rendering is a C++ library designed to provide an abstraction for different rendering engines. It offers unified APIs for creating diff --git a/examples/actor_animation/CMakeLists.txt b/examples/actor_animation/CMakeLists.txt index 8a7a67570..d47126e70 100644 --- a/examples/actor_animation/CMakeLists.txt +++ b/examples/actor_animation/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-actor-animation) find_package(gz-rendering9 REQUIRED) diff --git a/examples/boundingbox_camera/CMakeLists.txt b/examples/boundingbox_camera/CMakeLists.txt index 9d8cb5fc1..2e7ce8b85 100644 --- a/examples/boundingbox_camera/CMakeLists.txt +++ b/examples/boundingbox_camera/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-boundingbox-camera) find_package(gz-rendering9 REQUIRED) diff --git a/examples/camera_tracking/CMakeLists.txt b/examples/camera_tracking/CMakeLists.txt index 1801d873c..a84dcaf62 100644 --- a/examples/camera_tracking/CMakeLists.txt +++ b/examples/camera_tracking/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-camera-tracking) find_package(gz-rendering9 REQUIRED) diff --git a/examples/custom_scene_viewer/CMakeLists.txt b/examples/custom_scene_viewer/CMakeLists.txt index e9c6ccddb..3bb932a4d 100644 --- a/examples/custom_scene_viewer/CMakeLists.txt +++ b/examples/custom_scene_viewer/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-custom-scene-viewer) find_package(gz-rendering9 REQUIRED) diff --git a/examples/custom_shaders/CMakeLists.txt b/examples/custom_shaders/CMakeLists.txt index 25ec06e18..065778aed 100644 --- a/examples/custom_shaders/CMakeLists.txt +++ b/examples/custom_shaders/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-custom-shaders) include_directories(SYSTEM diff --git a/examples/custom_shaders_uniforms/CMakeLists.txt b/examples/custom_shaders_uniforms/CMakeLists.txt index 21f1803b0..16ca48496 100644 --- a/examples/custom_shaders_uniforms/CMakeLists.txt +++ b/examples/custom_shaders_uniforms/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-custom_shaders_uniforms) include_directories(SYSTEM diff --git a/examples/depth_camera/CMakeLists.txt b/examples/depth_camera/CMakeLists.txt index 8427e04e4..a29651028 100644 --- a/examples/depth_camera/CMakeLists.txt +++ b/examples/depth_camera/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-depth-camera) find_package(gz-rendering9 REQUIRED) diff --git a/examples/global_illumination/CMakeLists.txt b/examples/global_illumination/CMakeLists.txt index 7fecdd013..717fa4ae6 100644 --- a/examples/global_illumination/CMakeLists.txt +++ b/examples/global_illumination/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-global_illumination) find_package(gz-rendering9) diff --git a/examples/heightmap/CMakeLists.txt b/examples/heightmap/CMakeLists.txt index a01cb96b1..c40dd33f8 100644 --- a/examples/heightmap/CMakeLists.txt +++ b/examples/heightmap/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-heightmap) find_package(gz-rendering9 REQUIRED) diff --git a/examples/hello_world_plugin/CMakeLists.txt b/examples/hello_world_plugin/CMakeLists.txt index cbb653370..c8df1fbcb 100644 --- a/examples/hello_world_plugin/CMakeLists.txt +++ b/examples/hello_world_plugin/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) find_package(gz-rendering9 REQUIRED) set(GZ_RENDERING_VER ${gz-rendering9_VERSION_MAJOR}) diff --git a/examples/lidar_visual/CMakeLists.txt b/examples/lidar_visual/CMakeLists.txt index c93b1f417..1f7a06d41 100644 --- a/examples/lidar_visual/CMakeLists.txt +++ b/examples/lidar_visual/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-lidar_visual) find_package(gz-rendering9 REQUIRED) diff --git a/examples/lux_core_engine/CMakeLists.txt b/examples/lux_core_engine/CMakeLists.txt index a9a544ff3..007ca5347 100644 --- a/examples/lux_core_engine/CMakeLists.txt +++ b/examples/lux_core_engine/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) set(GZ_PLUGIN_VER 2) set(GZ_COMMON_VER 5) diff --git a/examples/mesh_viewer/CMakeLists.txt b/examples/mesh_viewer/CMakeLists.txt index a0fd0c2b3..875df453d 100644 --- a/examples/mesh_viewer/CMakeLists.txt +++ b/examples/mesh_viewer/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-mesh-viewer) find_package(gz-rendering9 REQUIRED) diff --git a/examples/mouse_picking/CMakeLists.txt b/examples/mouse_picking/CMakeLists.txt index 6ffd71055..a0dc637d7 100644 --- a/examples/mouse_picking/CMakeLists.txt +++ b/examples/mouse_picking/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-mouse-picking) find_package(gz-rendering9 REQUIRED) diff --git a/examples/ogre2_demo/CMakeLists.txt b/examples/ogre2_demo/CMakeLists.txt index ba309d6c4..35b305a3e 100644 --- a/examples/ogre2_demo/CMakeLists.txt +++ b/examples/ogre2_demo/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-ogre2-demo) find_package(gz-rendering9) diff --git a/examples/particles_demo/CMakeLists.txt b/examples/particles_demo/CMakeLists.txt index 55fa8b8ac..cfe7d93cd 100644 --- a/examples/particles_demo/CMakeLists.txt +++ b/examples/particles_demo/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-particles-demo) find_package(gz-rendering9 REQUIRED) diff --git a/examples/projector/CMakeLists.txt b/examples/projector/CMakeLists.txt index 73f4c1740..4561fea50 100644 --- a/examples/projector/CMakeLists.txt +++ b/examples/projector/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-projector) find_package(gz-rendering9 REQUIRED) diff --git a/examples/render_pass/CMakeLists.txt b/examples/render_pass/CMakeLists.txt index 53433a8d6..082440d3c 100644 --- a/examples/render_pass/CMakeLists.txt +++ b/examples/render_pass/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-render-pass) find_package(gz-rendering9) diff --git a/examples/segmentation_camera/CMakeLists.txt b/examples/segmentation_camera/CMakeLists.txt index c4544e8c3..5f2be8214 100644 --- a/examples/segmentation_camera/CMakeLists.txt +++ b/examples/segmentation_camera/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-segmentation-camera) find_package(gz-rendering9 REQUIRED) diff --git a/examples/simple_demo/CMakeLists.txt b/examples/simple_demo/CMakeLists.txt index 85861f9e2..973ff5059 100644 --- a/examples/simple_demo/CMakeLists.txt +++ b/examples/simple_demo/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-simple-demo) find_package(gz-rendering9) diff --git a/examples/simple_demo_qml/CMakeLists.txt b/examples/simple_demo_qml/CMakeLists.txt index cd8cc4640..f5a369369 100644 --- a/examples/simple_demo_qml/CMakeLists.txt +++ b/examples/simple_demo_qml/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-simple-demo-qml) #------------------------------------------------------------------------ diff --git a/examples/text_geom/CMakeLists.txt b/examples/text_geom/CMakeLists.txt index 95969e5ba..8cacdccaa 100644 --- a/examples/text_geom/CMakeLists.txt +++ b/examples/text_geom/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-text-geom) find_package(gz-rendering9) diff --git a/examples/thermal_camera/CMakeLists.txt b/examples/thermal_camera/CMakeLists.txt index e34bf0926..d75c89ad8 100644 --- a/examples/thermal_camera/CMakeLists.txt +++ b/examples/thermal_camera/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-thermal-camera) find_package(gz-rendering9 REQUIRED) diff --git a/examples/transform_control/CMakeLists.txt b/examples/transform_control/CMakeLists.txt index 22f6ff810..e181cc5a9 100644 --- a/examples/transform_control/CMakeLists.txt +++ b/examples/transform_control/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-transform-control) find_package(gz-rendering9 REQUIRED) diff --git a/examples/view_control/CMakeLists.txt b/examples/view_control/CMakeLists.txt index 54a6a513c..c82255016 100644 --- a/examples/view_control/CMakeLists.txt +++ b/examples/view_control/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-view-control) find_package(gz-rendering9 REQUIRED) diff --git a/examples/visualization_demo/CMakeLists.txt b/examples/visualization_demo/CMakeLists.txt index 15ef82e38..432536b96 100644 --- a/examples/visualization_demo/CMakeLists.txt +++ b/examples/visualization_demo/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-visualization-demo) find_package(gz-rendering9) diff --git a/examples/waves/CMakeLists.txt b/examples/waves/CMakeLists.txt index 95d9b494d..c0d404ee8 100644 --- a/examples/waves/CMakeLists.txt +++ b/examples/waves/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-waves) include_directories(SYSTEM diff --git a/examples/wide_angle_camera/CMakeLists.txt b/examples/wide_angle_camera/CMakeLists.txt index 9de70b5f8..d6e125586 100644 --- a/examples/wide_angle_camera/CMakeLists.txt +++ b/examples/wide_angle_camera/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR) project(gz-rendering-wide-angle-camera) find_package(gz-rendering9 REQUIRED) diff --git a/test/integration/waves.cc b/test/integration/waves.cc index ac24edda7..7a2018b9c 100644 --- a/test/integration/waves.cc +++ b/test/integration/waves.cc @@ -168,11 +168,11 @@ TEST_F(WavesTest, Waves) (*vsParams)["dir0"].InitializeBuffer(2); (*vsParams)["dir0"].UpdateBuffer(dir0); - float dir1[2] = {-0.7, 0.7}; + float dir1[2] = {-0.7f, 0.7f}; (*vsParams)["dir1"].InitializeBuffer(2); (*vsParams)["dir1"].UpdateBuffer(dir1); - float dir2[2] = {0.7, 0.7}; + float dir2[2] = {0.7f, 0.7f}; (*vsParams)["dir2"].InitializeBuffer(2); (*vsParams)["dir2"].UpdateBuffer(dir2);