Skip to content

Commit

Permalink
Merge branch 'main' into embeddedsdf_refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
scpeters authored May 2, 2022
2 parents 934cac5 + 8a3e5a8 commit 2fad929
Show file tree
Hide file tree
Showing 221 changed files with 16,929 additions and 468 deletions.
7 changes: 6 additions & 1 deletion .github/ci/before_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,17 @@ BUILD_DIR=`pwd`
cd /tmp

# check that we can compile USD from sources (only Focal)
# see https://github.com/ignitionrobotics/sdformat/issues/869
return_code=0
if [ "$(lsb_release -r -s)" != "20.04" ]; then
return_code=$(($return_code + 1))
fi

mkdir cmake_test
cd cmake_test

echo "cmake_minimum_required(VERSION 3.12)" > CMakeLists.txt

return_code=0
cmake . || return_code=$(($return_code + $?))
if [ $return_code -eq 0 ]
then
Expand Down
12 changes: 8 additions & 4 deletions .github/ci/packages.apt
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
libignition-cmake2-dev
libignition-cmake3-dev
libignition-common5-dev
libignition-math7-dev
libignition-tools-dev
libignition-utils1-dev
libignition-utils1-cli-dev
libignition-tools2-dev
libignition-utils2-dev
libignition-utils2-cli-dev
libtinyxml2-dev
liburdfdom-dev
libxml2-utils
python3-dev
python3-distutils
python3-ignition-math7
python3-psutil
python3-pybind11
ruby-dev
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,12 @@ jobs:
codecov-enabled: true
cppcheck-enabled: true
cpplint-enabled: true
jammy-ci:
runs-on: ubuntu-latest
name: Ubuntu Jammy CI
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@jammy
4 changes: 3 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ jobs:
- run: mkdir build
- name: cmake
working-directory: build
run: cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/${PACKAGE}/HEAD
run: |
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/${PACKAGE}/HEAD
- run: make
working-directory: build
- run: make test
Expand Down
45 changes: 39 additions & 6 deletions 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.12 FATAL_ERROR)

if(COMMAND CMAKE_POLICY)
CMAKE_POLICY(SET CMP0003 NEW)
Expand All @@ -18,8 +18,18 @@ set (BUILD_SDF ON CACHE INTERNAL "Build SDF" FORCE)

#################################################
# Find ign-cmake
find_package(ignition-cmake2 2.10 REQUIRED)
set(IGN_CMAKE_VER ${ignition-cmake2_VERSION_MAJOR})
find_package(ignition-cmake3 REQUIRED)
set(IGN_CMAKE_VER ${ignition-cmake3_VERSION_MAJOR})

########################################
# Python interfaces vars
option(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION
"Install python modules in standard system paths in the system"
OFF)

option(USE_DIST_PACKAGES_FOR_PYTHON
"Use dist-packages instead of site-package to install python modules"
OFF)

if (BUILD_SDF)
ign_configure_project(
Expand Down Expand Up @@ -70,7 +80,7 @@ if (BUILD_SDF)
# A module's location is usually a directory, but for
# binary modules
# it's a .so file.
execute_process(COMMAND "${PYTHON_EXECUTABLE}" "-c" "import re, ${module}; print(re.compile('/__init__.py.*').sub('',${module}.__file__))"
execute_process(COMMAND "${Python3_EXECUTABLE}" "-c" "import re, ${module}; print(re.compile('/__init__.py.*').sub('',${module}.__file__))"
RESULT_VARIABLE _${module}_status
OUTPUT_VARIABLE _${module}_location
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
Expand Down Expand Up @@ -106,14 +116,34 @@ if (BUILD_SDF)

########################################
# Find ignition utils
ign_find_package(ignition-utils1 VERSION REQUIRED)
set(IGN_UTILS_VER ${ignition-utils1_VERSION_MAJOR})
ign_find_package(ignition-utils2 REQUIRED COMPONENTS cli)
set(IGN_UTILS_VER ${ignition-utils2_VERSION_MAJOR})

########################################
# Find ignition common
ign_find_package(ignition-common5 COMPONENTS graphics REQUIRED_BY usd)
set(IGN_COMMON_VER ${ignition-common5_VERSION_MAJOR})

########################################
# Python interfaces
if (NOT PYTHON3_FOUND)
IGN_BUILD_WARNING("Python is missing: Python interfaces are disabled.")
message (STATUS "Searching for Python - not found.")
else()
message (STATUS "Searching for Python - found version ${Python3_VERSION}.")

set(PYBIND11_PYTHON_VERSION 3)
find_package(pybind11 2.4 QUIET)

if (${pybind11_FOUND})
find_package(Python3 ${IGN_PYTHON_VERSION} REQUIRED COMPONENTS Development)
message (STATUS "Searching for pybind11 - found version ${pybind11_VERSION}.")
else()
IGN_BUILD_WARNING("pybind11 is missing: Python interfaces are disabled.")
message (STATUS "Searching for pybind11 - not found.")
endif()
endif()

########################################
# Find PXR
ign_find_package(pxr QUIET REQUIRED_BY usd PKGCONFIG pxr)
Expand All @@ -126,6 +156,9 @@ if (BUILD_SDF)
add_subdirectory(sdf)
add_subdirectory(conf)
add_subdirectory(doc)
if (${pybind11_FOUND})
add_subdirectory(python)
endif()
endif(BUILD_SDF)

########################################
Expand Down
Loading

0 comments on commit 2fad929

Please sign in to comment.