Skip to content

Commit cd39a9f

Browse files
authored
Enable 24.04 CI, require cmake 3.22.1 (#444)
* Only run workflows on pull requests or release / main branches. * Use checkout@v4. * Require cmake version 3.22.1, remove old cmake code Part of gazebosim/gz-cmake#350. Signed-off-by: Steve Peters <scpeters@openrobotics.org>
1 parent 7e9ac91 commit cd39a9f

File tree

7 files changed

+23
-15
lines changed

7 files changed

+23
-15
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 2 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-msgs[0-9]?'
8+
- 'gz-msgs[0-9]?'
9+
- 'main'
410

511
jobs:
612
jammy-ci:
713
runs-on: ubuntu-latest
814
name: Ubuntu Jammy 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: gazebo-tooling/action-gz-ci@jammy
@@ -17,3 +23,12 @@ jobs:
1723
cppcheck-enabled: true
1824
cpplint-enabled: true
1925
doxygen-enabled: true
26+
noble-ci:
27+
runs-on: ubuntu-latest
28+
name: Ubuntu Noble CI
29+
steps:
30+
- name: Checkout
31+
uses: actions/checkout@v4
32+
- name: Compile and test
33+
id: ci
34+
uses: gazebo-tooling/action-gz-ci@noble

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
22

33
#============================================================================
44
# Initialize the project

examples/generating_custom_msgs/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
22

33
#============================================================================
44
# Initialize the project

examples/using_gz_msgs/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
22

33
#============================================================================
44
# Initialize the project

gz-msgs-extras.cmake.in

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,7 @@ include(${@PROJECT_NAME@_DIR}/gz_msgs_factory.cmake)
2222
include(${@PROJECT_NAME@_DIR}/gz_msgs_generate.cmake)
2323

2424
set(@PROJECT_NAME@_INSTALL_PATH "${@PROJECT_NAME@_DIR}/@PROJECT_CMAKE_EXTRAS_PATH_TO_PREFIX@")
25-
26-
if(CMAKE_VERSION VERSION_LESS "3.20.0")
27-
file(TO_CMAKE_PATH @PROJECT_NAME@_INSTALL_PATH NORMALIZED_PATH) # Converts native path to CMake style with forward slashes.
28-
get_filename_component(ABSOLUTE_PATH "${NORMALIZED_PATH}" ABSOLUTE) # Extracts the absolute path component.
29-
set(@PROJECT_NAME@_INSTALL_PATH "${ABSOLUTE_PATH}") # Stores the normalized absolute path back to the original variable.
30-
else()
31-
cmake_path(NORMAL_PATH @PROJECT_NAME@_INSTALL_PATH OUTPUT_VARIABLE @PROJECT_NAME@_INSTALL_PATH)
32-
endif()
25+
cmake_path(NORMAL_PATH @PROJECT_NAME@_INSTALL_PATH OUTPUT_VARIABLE @PROJECT_NAME@_INSTALL_PATH)
3326

3427
set(PROTOC_NAME "$<TARGET_FILE_NAME:@PROJECT_NAME@_protoc_plugin>")
3528
set(PROTO_SCRIPT_NAME "@PROJECT_NAME@_generate.py")

tutorials/cppgetstarted.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ int main()
5959
To compile the code create a `CMakeLists.txt`:
6060

6161
```
62-
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
62+
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
6363
6464
# Find the Gazebo msgs library
6565
find_package(gz-msgs11 QUIET REQUIRED)

tutorials/message_generation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ The `cmake` functionality is exported from the `gz-msgs` library, via the `gz-cm
127127
To make the functions available, simply `find_package(gz-msgs11)` in your `CMakeLists.txt`:
128128

129129
```cmake
130-
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
130+
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
131131
project(my_custom_package VERSION 0.0.1)
132132
find_package(gz-cmake4 REQUIRED)
133133
find_package(gz-msgs11 REQUIRED)

0 commit comments

Comments
 (0)