Unverified Commit e2e377cb authored by Justin Carpentier's avatar Justin Carpentier Committed by GitHub
Browse files

Merge pull request #1541 from wxmerkt/topic/turn-off-automatic-documentation-generation

Turn off automatic documentation generation
parents 0ec6921d 3bb196d3
...@@ -6,16 +6,22 @@ jobs: ...@@ -6,16 +6,22 @@ jobs:
build: build:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
os: [ubuntu-20.04,ubuntu-18.04] os: [ubuntu-20.04,ubuntu-18.04]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
with: with:
fetch-depth: 0 fetch-depth: 0
submodules: recursive submodules: recursive
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.os }}-${{ matrix.type }}
max-size: 1G
# extract branch name # extract branch name
- name: Get branch name (merge) - name: Get branch name (merge)
...@@ -34,7 +40,7 @@ jobs: ...@@ -34,7 +40,7 @@ jobs:
run: echo ${{ env.BRANCH_NAME }} run: echo ${{ env.BRANCH_NAME }}
- name: Register robotpkg - name: Register robotpkg
run: | run: |
sudo sh -c "echo \"deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg\" >> /etc/apt/sources.list " sudo sh -c "echo \"deb [arch=amd64] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg\" >> /etc/apt/sources.list "
sudo apt-key adv --fetch-keys http://robotpkg.openrobots.org/packages/debian/robotpkg.key sudo apt-key adv --fetch-keys http://robotpkg.openrobots.org/packages/debian/robotpkg.key
- name: Set and install dependencies - name: Set and install dependencies
...@@ -71,9 +77,11 @@ jobs: ...@@ -71,9 +77,11 @@ jobs:
export PYTHONPATH=${PYTHONPATH}:/opt/openrobots/lib/python$PYTHON3_DOT_VERSION/site-packages export PYTHONPATH=${PYTHONPATH}:/opt/openrobots/lib/python$PYTHON3_DOT_VERSION/site-packages
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openrobots/lib:/usr/local/lib:/usr/lib:/usr/lib/x86_64-linux-gnu export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/openrobots/lib:/usr/local/lib:/usr/lib:/usr/lib/x86_64-linux-gnu
export MAKEFLAGS="-j1" export MAKEFLAGS="-j1"
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
mkdir build mkdir build
cd build cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_WITH_COLLISION_SUPPORT=ON -DBUILD_ADVANCED_TESTING=ON -DBUILD_WITH_CASADI_SUPPORT=ON -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_WITH_OPENMP_SUPPORT=ON cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_WITH_COLLISION_SUPPORT=ON -DBUILD_ADVANCED_TESTING=ON -DBUILD_WITH_CASADI_SUPPORT=ON -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_WITH_OPENMP_SUPPORT=ON -DINSTALL_DOCUMENTATION=ON
make make
make build_tests make build_tests
export CTEST_OUTPUT_ON_FAILURE=1 export CTEST_OUTPUT_ON_FAILURE=1
...@@ -103,14 +111,14 @@ jobs: ...@@ -103,14 +111,14 @@ jobs:
export PINOCCHIO_GIT_REPOSITORY="file://"$GITHUB_WORKSPACE export PINOCCHIO_GIT_REPOSITORY="file://"$GITHUB_WORKSPACE
#export PINOCCHIO_GIT_REPOSITORY=$(git remote get-url origin) #export PINOCCHIO_GIT_REPOSITORY=$(git remote get-url origin)
export PINOCCHIO_GIT_TAG="test-external-"$(git rev-parse --short HEAD) export PINOCCHIO_GIT_TAG="test-external-"$(git rev-parse --short HEAD)
git tag $PINOCCHIO_GIT_TAG git tag $PINOCCHIO_GIT_TAG
mkdir build mkdir build
cd build cd build
cmake .. cmake ..
make make
./run_rnea ./run_rnea
./load_urdf ./load_urdf
- name: Uninstall project - name: Uninstall project
run: | run: |
......
...@@ -15,6 +15,12 @@ jobs: ...@@ -15,6 +15,12 @@ jobs:
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.os }}-${{ matrix.type }}
max-size: 1G
- name: Checkout submodules - name: Checkout submodules
run: | run: |
git submodule update --init git submodule update --init
...@@ -32,17 +38,19 @@ jobs: ...@@ -32,17 +38,19 @@ jobs:
conda activate pinocchio conda activate pinocchio
conda install cmake -c main conda install cmake -c main
conda install llvm-openmp libcxx=11 -c conda-forge conda install llvm-openmp libcxx=11 -c conda-forge
- name: Build Pinocchio - name: Build Pinocchio
shell: bash -l {0} shell: bash -l {0}
run: | run: |
conda activate pinocchio conda activate pinocchio
echo $CONDA_PREFIX echo $CONDA_PREFIX
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
mkdir build mkdir build
cd build cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_COLLISION_SUPPORT=ON -DBUILD_ADVANCED_TESTING=ON -DBUILD_WITH_CASADI_SUPPORT=OFF -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_WITH_OPENMP_SUPPORT=ON cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=Release -DBUILD_WITH_COLLISION_SUPPORT=ON -DBUILD_ADVANCED_TESTING=ON -DBUILD_WITH_CASADI_SUPPORT=OFF -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_WITH_OPENMP_SUPPORT=ON -DINSTALL_DOCUMENTATION=ON
make make
make build_tests make build_tests
export CTEST_OUTPUT_ON_FAILURE=1 export CTEST_OUTPUT_ON_FAILURE=1
......
...@@ -31,7 +31,7 @@ jobs: ...@@ -31,7 +31,7 @@ jobs:
- name: Install cmake and update conda - name: Install cmake and update conda
run: | run: |
conda install cmake -c main conda install cmake -c main
- name: Build Pinocchio - name: Build Pinocchio
shell: cmd /C CALL {0} shell: cmd /C CALL {0}
env: env:
...@@ -44,7 +44,7 @@ jobs: ...@@ -44,7 +44,7 @@ jobs:
set PATH=%PATH:C:\hostedtoolcache\windows\Boost\1.72.0;=% set PATH=%PATH:C:\hostedtoolcache\windows\Boost\1.72.0;=%
call "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 call "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
:: Create build directory :: Create build directory
mkdir build mkdir build
pushd build pushd build
...@@ -59,6 +59,7 @@ jobs: ...@@ -59,6 +59,7 @@ jobs:
-DBUILD_WITH_URDF_SUPPORT=ON ^ -DBUILD_WITH_URDF_SUPPORT=ON ^
-DBUILD_PYTHON_INTERFACE=ON ^ -DBUILD_PYTHON_INTERFACE=ON ^
-DBUILD_WITH_COLLISION_SUPPORT=ON ^ -DBUILD_WITH_COLLISION_SUPPORT=ON ^
-DINSTALL_DOCUMENTATION=ON ^
.. ..
:: Build :: Build
......
...@@ -34,7 +34,7 @@ jobs: ...@@ -34,7 +34,7 @@ jobs:
- name: Display the path - name: Display the path
run: echo %cd% run: echo %cd%
shell: cmd shell: cmd
- name: Build Pinocchio - name: Build Pinocchio
shell: cmd /C CALL {0} shell: cmd /C CALL {0}
env: env:
...@@ -46,7 +46,7 @@ jobs: ...@@ -46,7 +46,7 @@ jobs:
set BOOST_ROOT_1_72_0= set BOOST_ROOT_1_72_0=
call "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 call "%programfiles(x86)%\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64
:: Create build directory :: Create build directory
mkdir build mkdir build
pushd build pushd build
...@@ -62,6 +62,7 @@ jobs: ...@@ -62,6 +62,7 @@ jobs:
-DBUILD_PYTHON_INTERFACE=OFF ^ -DBUILD_PYTHON_INTERFACE=OFF ^
-DBUILD_WITH_COLLISION_SUPPORT=ON ^ -DBUILD_WITH_COLLISION_SUPPORT=ON ^
-DBUILD_TESTING=ON ^ -DBUILD_TESTING=ON ^
-DINSTALL_DOCUMENTATION=ON ^
.. ..
:: Build :: Build
......
...@@ -16,6 +16,12 @@ SET(PROJECT_USE_KEYWORD_LINK_LIBRARIES TRUE) ...@@ -16,6 +16,12 @@ SET(PROJECT_USE_KEYWORD_LINK_LIBRARIES TRUE)
SET(CXX_DISABLE_WERROR True) SET(CXX_DISABLE_WERROR True)
SET(CMAKE_VERBOSE_MAKEFILE True) SET(CMAKE_VERBOSE_MAKEFILE True)
# ----------------------------------------------------
# --- OPTIONS ---------------------------------------
# Need to be set before including base.cmake
# ----------------------------------------------------
OPTION(INSTALL_DOCUMENTATION "Generate and install the documentation" OFF)
# Check if the submodule cmake have been initialized # Check if the submodule cmake have been initialized
IF(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/cmake/base.cmake") IF(NOT EXISTS "${CMAKE_CURRENT_LIST_DIR}/cmake/base.cmake")
MESSAGE(FATAL_ERROR "\nPlease run the following command first:\ngit submodule update --init\n") MESSAGE(FATAL_ERROR "\nPlease run the following command first:\ngit submodule update --init\n")
......
# #
# Copyright (c) 2015-2021 CNRS INRIA # Copyright (c) 2015-2021 CNRS INRIA
# Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France. # Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
# #
...@@ -21,14 +21,14 @@ ENDMACRO(SYMLINK_AND_INSTALL_HEADERS HEADERS SUBPATH) ...@@ -21,14 +21,14 @@ ENDMACRO(SYMLINK_AND_INSTALL_HEADERS HEADERS SUBPATH)
FUNCTION(REMOVE_PATH_FROM_LIST list_name path_name dest_list) FUNCTION(REMOVE_PATH_FROM_LIST list_name path_name dest_list)
SET(list_name_) SET(list_name_)
FOREACH(header ${list_name}) FOREACH(header ${list_name})
STRING(REGEX REPLACE "${path_name}" "" header ${header}) STRING(REGEX REPLACE "${path_name}" "" header ${header})
LIST(APPEND list_name_ ${header}) LIST(APPEND list_name_ ${header})
ENDFOREACH(header ${list_name_}) ENDFOREACH(header ${list_name_})
SET(${dest_list} ${list_name_} PARENT_SCOPE) SET(${dest_list} ${list_name_} PARENT_SCOPE)
ENDFUNCTION(REMOVE_PATH_FROM_LIST) ENDFUNCTION(REMOVE_PATH_FROM_LIST)
FUNCTION(LIST_FILTER list regular_expression dest_list) FUNCTION(LIST_FILTER list regular_expression dest_list)
FOREACH(elt ${list}) FOREACH(elt ${list})
IF(${elt} MATCHES ${regular_expression}) IF(${elt} MATCHES ${regular_expression})
LIST(REMOVE_ITEM list ${elt}) LIST(REMOVE_ITEM list ${elt})
ENDIF() ENDIF()
...@@ -41,12 +41,12 @@ SET(PYWRAP ${PROJECT_NAME}_pywrap) ...@@ -41,12 +41,12 @@ SET(PYWRAP ${PROJECT_NAME}_pywrap)
SET(PYWRAP ${PYWRAP} PARENT_SCOPE) SET(PYWRAP ${PYWRAP} PARENT_SCOPE)
FILE(GLOB_RECURSE ${PROJECT_NAME}_PYTHON_HEADERS FILE(GLOB_RECURSE ${PROJECT_NAME}_PYTHON_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/*.hpp ${CMAKE_CURRENT_SOURCE_DIR}/*.hpp
) )
FILE(GLOB_RECURSE ${PROJECT_NAME}_PYTHON_SOURCES FILE(GLOB_RECURSE ${PROJECT_NAME}_PYTHON_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp
) )
REMOVE_PATH_FROM_LIST("${${PROJECT_NAME}_PYTHON_HEADERS}" "${CMAKE_CURRENT_SOURCE_DIR}/" ${PROJECT_NAME}_PYTHON_HEADERS) REMOVE_PATH_FROM_LIST("${${PROJECT_NAME}_PYTHON_HEADERS}" "${CMAKE_CURRENT_SOURCE_DIR}/" ${PROJECT_NAME}_PYTHON_HEADERS)
REMOVE_PATH_FROM_LIST("${${PROJECT_NAME}_PYTHON_SOURCES}" "${CMAKE_CURRENT_SOURCE_DIR}/" ${PROJECT_NAME}_PYTHON_SOURCES) REMOVE_PATH_FROM_LIST("${${PROJECT_NAME}_PYTHON_SOURCES}" "${CMAKE_CURRENT_SOURCE_DIR}/" ${PROJECT_NAME}_PYTHON_SOURCES)
...@@ -126,7 +126,7 @@ SET(${PYWRAP}_SOURCES ${${PROJECT_NAME}_PYTHON_SOURCES}) ...@@ -126,7 +126,7 @@ SET(${PYWRAP}_SOURCES ${${PROJECT_NAME}_PYTHON_SOURCES})
SET(${PYWRAP}_HEADERS ${${PROJECT_NAME}_PYTHON_HEADERS}) SET(${PYWRAP}_HEADERS ${${PROJECT_NAME}_PYTHON_HEADERS})
IF(BUILD_PYTHON_INTERFACE) IF(BUILD_PYTHON_INTERFACE)
INCLUDE_DIRECTORIES(SYSTEM ${PYTHON_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(SYSTEM ${PYTHON_INCLUDE_DIRS})
ADD_CUSTOM_TARGET(python) ADD_CUSTOM_TARGET(python)
SET_TARGET_PROPERTIES(python PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD True) SET_TARGET_PROPERTIES(python PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD True)
...@@ -141,7 +141,7 @@ IF(BUILD_PYTHON_INTERFACE) ...@@ -141,7 +141,7 @@ IF(BUILD_PYTHON_INTERFACE)
ENDIF(LINK_PYTHON_INTERFACE_TO_OPENM) ENDIF(LINK_PYTHON_INTERFACE_TO_OPENM)
ENDIF(BUILD_WITH_OPENMP_SUPPORT) ENDIF(BUILD_WITH_OPENMP_SUPPORT)
ADD_DEPENDENCIES(python ${PYWRAP}) ADD_DEPENDENCIES(python ${PYWRAP})
SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES PREFIX "") # Remove lib prefix for the target SET_TARGET_PROPERTIES(${PYWRAP} PROPERTIES PREFIX "") # Remove lib prefix for the target
# Do not report: # Do not report:
...@@ -175,7 +175,7 @@ IF(BUILD_PYTHON_INTERFACE) ...@@ -175,7 +175,7 @@ IF(BUILD_PYTHON_INTERFACE)
ENDIF() ENDIF()
SET_TARGET_PROPERTIES(${PYWRAP} SET_TARGET_PROPERTIES(${PYWRAP}
PROPERTIES PROPERTIES
PREFIX "" PREFIX ""
SUFFIX ${PYTHON_EXT_SUFFIX} SUFFIX ${PYTHON_EXT_SUFFIX}
OUTPUT_NAME "${PYWRAP}" OUTPUT_NAME "${PYWRAP}"
...@@ -187,12 +187,12 @@ IF(BUILD_PYTHON_INTERFACE) ...@@ -187,12 +187,12 @@ IF(BUILD_PYTHON_INTERFACE)
ENDIF() ENDIF()
INSTALL( INSTALL(
TARGETS ${PYWRAP} TARGETS ${PYWRAP}
EXPORT ${TARGETS_EXPORT_NAME} EXPORT ${TARGETS_EXPORT_NAME}
DESTINATION ${${PYWRAP}_INSTALL_DIR} DESTINATION ${${PYWRAP}_INSTALL_DIR}
) )
# --- INSTALL SCRIPTS # --- INSTALL SCRIPTS
SET(PYTHON_FILES SET(PYTHON_FILES
__init__.py __init__.py
deprecated.py deprecated.py
...@@ -265,13 +265,12 @@ IF(BUILD_PYTHON_INTERFACE) ...@@ -265,13 +265,12 @@ IF(BUILD_PYTHON_INTERFACE)
SET(DOXYGEN_GENERATE_HTML YES) SET(DOXYGEN_GENERATE_HTML YES)
SET(DOXYGEN_GENERATE_LATEX NO) SET(DOXYGEN_GENERATE_LATEX NO)
SET(DOXYGEN_PROJECT_NAME "Pinocchio PyBind11 helpers.") SET(DOXYGEN_PROJECT_NAME "Pinocchio PyBind11 helpers.")
message("DOXYGEN_GENERATE_HTML: ${DOXYGEN_GENERATE_HTML}") CMAKE_POLICY(PUSH)
cmake_policy(PUSH) CMAKE_POLICY(SET CMP0054 NEW)
cmake_policy(SET CMP0054 NEW) DOXYGEN_ADD_DOCS(doc_pybind11
doxygen_add_docs(doc_pybind11
pybind11.hpp pybind11-all.hpp pybind11.hpp pybind11-all.hpp
USE_STAMP_FILE USE_STAMP_FILE
COMMENT "Generating documentation of the PyBind11 helpers.") COMMENT "Generating documentation of the PyBind11 helpers.")
cmake_policy(POP) CMAKE_POLICY(POP)
ENDIF() ENDIF()
ENDIF(BUILD_PYTHON_INTERFACE) ENDIF(BUILD_PYTHON_INTERFACE)
...@@ -196,8 +196,6 @@ py::object default_arg(T t) { ...@@ -196,8 +196,6 @@ py::object default_arg(T t) {
static pybind11::handle cast(native_type src, \ static pybind11::handle cast(native_type src, \
pybind11::return_value_policy /*policy*/, \ pybind11::return_value_policy /*policy*/, \
pybind11::handle /*parent*/) { \ pybind11::handle /*parent*/) { \
typename boost::python::manage_new_object::apply<native_type*>::type \
converter; \
return boost::python::api::object(src).ptr(); \ return boost::python::api::object(src).ptr(); \
} \ } \
}; \ }; \
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include <boost/test/unit_test.hpp> #include <boost/test/unit_test.hpp>
#include <boost/utility/binary.hpp> #include <boost/utility/binary.hpp>
#include <boost/test/floating_point_comparison.hpp> #include <boost/test/tools/floating_point_comparison.hpp>
BOOST_AUTO_TEST_SUITE ( BOOST_TEST_MODULE ) BOOST_AUTO_TEST_SUITE ( BOOST_TEST_MODULE )
......
...@@ -8,16 +8,29 @@ if(CMAKE_VERSION VERSION_GREATER 3.11) ...@@ -8,16 +8,29 @@ if(CMAKE_VERSION VERSION_GREATER 3.11)
FetchContent_Populate(pybind11) FetchContent_Populate(pybind11)
add_subdirectory(${pybind11_SOURCE_DIR} ${pybind11_BINARY_DIR}) add_subdirectory(${pybind11_SOURCE_DIR} ${pybind11_BINARY_DIR})
pybind11_add_module(cpp2pybind11 cpp2pybind11.cpp) #pybind11_add_module(cpp2pybind11 cpp2pybind11.cpp) # BUG: might not work out of the box on OSX with conda: https://github.com/pybind/pybind11/issues/3081
target_link_libraries(cpp2pybind11 PRIVATE pinocchio_pywrap) add_library(cpp2pybind11 MODULE cpp2pybind11.cpp)
target_link_libraries(cpp2pybind11 PRIVATE pinocchio_pywrap pybind11::module)
SET_TARGET_PROPERTIES(cpp2pybind11
PROPERTIES
PREFIX ""
SUFFIX ${PYTHON_EXT_SUFFIX}
)
IF(BUILD_WITH_OPENMP_SUPPORT AND NOT LINK_PYTHON_INTERFACE_TO_OPENMP)
TARGET_LINK_LIBRARIES(cpp2pybind11 PRIVATE OpenMP::OpenMP_CXX)
ENDIF()
if(CMAKE_CXX_STANDARD LESS 14) if(CMAKE_CXX_STANDARD LESS 14)
message(STATUS "CXX_STANDARD for cpp2pybind11 set changed from ${CMAKE_CXX_STANDARD} to 14") message(STATUS "CXX_STANDARD for cpp2pybind11 changed from ${CMAKE_CXX_STANDARD} to 14")
set_target_properties(cpp2pybind11 PROPERTIES CXX_STANDARD 14) set_target_properties(cpp2pybind11 PROPERTIES CXX_STANDARD 14)
endif() endif()
if(WIN32) if(WIN32)
target_compile_definitions(cpp2pybind11 PRIVATE -DNOMINMAX) target_compile_definitions(cpp2pybind11 PRIVATE -DNOMINMAX)
endif(WIN32) endif(WIN32)
add_python_unit_test("test-py-cpp2pybind11" "unittest/python/pybind11/test-cpp2pybind11.py" "bindings/python" "unittest/python/pybind11")
endif() endif()
endif() endif()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment