Skip to content

Commit 2f1e049

Browse files
authored
Enable 24.04 CI, remove distutils dependency (#587)
* Enable GitHub workflow on Ubuntu Noble * Require cmake version 3.22.1 Part of gazebosim/gz-cmake#350. * Remove old ruby cmake code * Remove old python cmake code Also don't need to install python3-distutils anymore. Signed-off-by: Steve Peters <[email protected]>
1 parent e0193a5 commit 2f1e049

File tree

6 files changed

+15
-20
lines changed

6 files changed

+15
-20
lines changed

.github/ci/packages.apt

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ libeigen3-dev
22
libgz-cmake4-dev
33
libgz-utils3-dev
44
libpython3-dev
5-
python3-distutils
65
python3-pybind11
76
python3-pytest
87
ruby-dev

.github/workflows/ci.yml

+9
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,12 @@ jobs:
1717
cppcheck-enabled: true
1818
cpplint-enabled: true
1919
doxygen-enabled: true
20+
noble-ci:
21+
runs-on: ubuntu-latest
22+
name: Ubuntu Noble CI
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v3
26+
- name: Compile and test
27+
id: ci
28+
uses: gazebo-tooling/action-gz-ci@noble

CMakeLists.txt

+1-1
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/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
1+
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
22

33
project(gz-math-examples)
44

src/python_pybind11/CMakeLists.txt

+3-12
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
7373
endif()
7474

7575
if(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION)
76-
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
77-
execute_process(
78-
COMMAND "${PYTHON_EXECUTABLE}" -c "if True:
79-
from distutils import sysconfig as sc
80-
print(sc.get_python_lib(plat_specific=True))"
81-
OUTPUT_VARIABLE Python3_SITEARCH
82-
OUTPUT_STRIP_TRAILING_WHITESPACE)
83-
else()
84-
# Get install variable from Python3 module
85-
# Python3_SITEARCH is available from 3.12 on, workaround if needed:
86-
find_package(Python3 COMPONENTS Interpreter)
87-
endif()
76+
# Get install variable from Python3 module
77+
# Python3_SITEARCH is available from 3.12 on, workaround if needed:
78+
find_package(Python3 COMPONENTS Interpreter)
8879

8980
if(USE_DIST_PACKAGES_FOR_PYTHON)
9081
string(REPLACE "site-packages" "dist-packages" GZ_PYTHON_INSTALL_PATH ${Python3_SITEARCH})

src/ruby/CMakeLists.txt

+1-5
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ if (RUBY_FOUND)
4444

4545
# Create the ruby library
4646
set(CMAKE_SWIG_OUTDIR "${CMAKE_BINARY_DIR}/lib/ruby")
47-
if(CMAKE_VERSION VERSION_GREATER 3.8.0)
48-
SWIG_ADD_LIBRARY(${SWIG_RB_LIB} LANGUAGE ruby SOURCES ruby.i ${swig_i_files})
49-
else()
50-
SWIG_ADD_MODULE(${SWIG_RB_LIB} ruby ruby.i ${swig_i_files})
51-
endif()
47+
SWIG_ADD_LIBRARY(${SWIG_RB_LIB} LANGUAGE ruby SOURCES ruby.i ${swig_i_files})
5248

5349
# Suppress warnings on SWIG-generated files
5450
target_compile_options(${SWIG_RB_LIB} PRIVATE

0 commit comments

Comments
 (0)