Skip to content

Commit

Permalink
Enable 24.04 CI, require cmake 3.22.1 (gazebosim#444)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
scpeters authored May 28, 2024
1 parent 7e9ac91 commit cd39a9f
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 15 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
name: Ubuntu CI

on: [push, pull_request]
on:
pull_request:
push:
branches:
- 'ign-msgs[0-9]?'
- 'gz-msgs[0-9]?'
- 'main'

jobs:
jammy-ci:
runs-on: ubuntu-latest
name: Ubuntu Jammy CI
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Compile and test
id: ci
uses: gazebo-tooling/action-gz-ci@jammy
Expand All @@ -17,3 +23,12 @@ jobs:
cppcheck-enabled: true
cpplint-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
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/generating_custom_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion examples/using_gz_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 1 addition & 8 deletions gz-msgs-extras.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,7 @@ include(${@PROJECT_NAME@_DIR}/gz_msgs_factory.cmake)
include(${@PROJECT_NAME@_DIR}/gz_msgs_generate.cmake)

set(@PROJECT_NAME@_INSTALL_PATH "${@PROJECT_NAME@_DIR}/@PROJECT_CMAKE_EXTRAS_PATH_TO_PREFIX@")

if(CMAKE_VERSION VERSION_LESS "3.20.0")
file(TO_CMAKE_PATH @PROJECT_NAME@_INSTALL_PATH NORMALIZED_PATH) # Converts native path to CMake style with forward slashes.
get_filename_component(ABSOLUTE_PATH "${NORMALIZED_PATH}" ABSOLUTE) # Extracts the absolute path component.
set(@PROJECT_NAME@_INSTALL_PATH "${ABSOLUTE_PATH}") # Stores the normalized absolute path back to the original variable.
else()
cmake_path(NORMAL_PATH @PROJECT_NAME@_INSTALL_PATH OUTPUT_VARIABLE @PROJECT_NAME@_INSTALL_PATH)
endif()
cmake_path(NORMAL_PATH @PROJECT_NAME@_INSTALL_PATH OUTPUT_VARIABLE @PROJECT_NAME@_INSTALL_PATH)

set(PROTOC_NAME "$<TARGET_FILE_NAME:@PROJECT_NAME@_protoc_plugin>")
set(PROTO_SCRIPT_NAME "@PROJECT_NAME@_generate.py")
Expand Down
2 changes: 1 addition & 1 deletion tutorials/cppgetstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ int main()
To compile the code create a `CMakeLists.txt`:

```
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
# Find the Gazebo msgs library
find_package(gz-msgs11 QUIET REQUIRED)
Expand Down
2 changes: 1 addition & 1 deletion tutorials/message_generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The `cmake` functionality is exported from the `gz-msgs` library, via the `gz-cm
To make the functions available, simply `find_package(gz-msgs11)` in your `CMakeLists.txt`:

```cmake
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
project(my_custom_package VERSION 0.0.1)
find_package(gz-cmake4 REQUIRED)
find_package(gz-msgs11 REQUIRED)
Expand Down

0 comments on commit cd39a9f

Please sign in to comment.