From 1069692477f2b8ef997006edf967d4b5233544e3 Mon Sep 17 00:00:00 2001 From: mrceki <105711013+mrceki@users.noreply.github.com> Date: Thu, 2 Mar 2023 08:36:05 +0300 Subject: [PATCH] hotfix --- moveit_task_constructor/.gitignore | 3 + moveit_task_constructor/.gitmodules | 5 + .../.vscode/c_cpp_properties.json | 37 - moveit_task_constructor/.vscode/settings.json | 7 - .../capabilities/package.xml | 2 +- .../python/python_tools/geometry_msg_types.h | 27 - .../moveit/python/python_tools/ros_init.h | 31 - .../moveit/python/python_tools/ros_types.h | 94 -- .../core/python/bindings/src/core.h | 3 - .../core/python/bindings/src/python_tools.cpp | 53 - .../core/python/bindings/src/ros_init.cpp | 68 -- .../core/python/bindings/src/ros_types.cpp | 61 - .../core/python/bindings/src/stages.cpp | 1 + .../core/python/pybind11/.github/CODEOWNERS | 9 - .../python/pybind11/.github/CONTRIBUTING.md | 387 ------- .../.github/ISSUE_TEMPLATE/bug-report.yml | 45 - .../.github/ISSUE_TEMPLATE/config.yml | 8 - .../python/pybind11/.github/dependabot.yml | 16 - .../core/python/pybind11/.github/labeler.yml | 8 - .../pybind11/.github/labeler_merged.yml | 3 - .../pybind11/.github/pull_request_template.md | 19 - .../python/pybind11/.github/workflows/ci.yml | 966 ---------------- .../pybind11/.github/workflows/ci_sh_def.yml | 1002 ----------------- .../.github/workflows/ci_sh_def.yml.patch | 185 --- .../pybind11/.github/workflows/configure.yml | 85 -- .../pybind11/.github/workflows/format.yml | 49 - .../pybind11/.github/workflows/labeler.yml | 16 - .../python/pybind11/.github/workflows/pip.yml | 109 -- .../pybind11/.github/workflows/upstream.yml | 112 -- .../src/moveit/python_tools/__init__.py | 1 - moveit_task_constructor/demo/CHANGELOG.rst | 23 + .../demo/config/panda_config.yaml | 5 +- .../pick_place_task.h | 2 - .../demo/scripts/alternatives.py | 4 +- .../demo/scripts/cartesian.py | 4 +- .../demo/scripts/compute_ik.py | 7 +- .../demo/scripts/generate_pose.py | 6 +- .../demo/scripts/merger.py | 4 +- .../demo/scripts/modify_planning_scene.py | 2 +- .../demo/scripts/pickplace.py | 26 +- .../demo/scripts/properties.py | 4 +- .../demo/src/pick_place_task.cpp | 20 +- moveit_task_constructor/msgs/CHANGELOG.rst | 14 + moveit_task_constructor/msgs/package.xml | 2 +- 44 files changed, 89 insertions(+), 3446 deletions(-) create mode 100644 moveit_task_constructor/.gitignore create mode 100644 moveit_task_constructor/.gitmodules delete mode 100644 moveit_task_constructor/.vscode/c_cpp_properties.json delete mode 100644 moveit_task_constructor/.vscode/settings.json delete mode 100644 moveit_task_constructor/core/include/moveit/python/python_tools/geometry_msg_types.h delete mode 100644 moveit_task_constructor/core/include/moveit/python/python_tools/ros_init.h delete mode 100644 moveit_task_constructor/core/include/moveit/python/python_tools/ros_types.h delete mode 100644 moveit_task_constructor/core/python/bindings/src/python_tools.cpp delete mode 100644 moveit_task_constructor/core/python/bindings/src/ros_init.cpp delete mode 100644 moveit_task_constructor/core/python/bindings/src/ros_types.cpp delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/CODEOWNERS delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/CONTRIBUTING.md delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/ISSUE_TEMPLATE/config.yml delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/dependabot.yml delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/labeler.yml delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/labeler_merged.yml delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/pull_request_template.md delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/workflows/ci.yml delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/workflows/ci_sh_def.yml delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/workflows/ci_sh_def.yml.patch delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/workflows/configure.yml delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/workflows/format.yml delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/workflows/labeler.yml delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/workflows/pip.yml delete mode 100644 moveit_task_constructor/core/python/pybind11/.github/workflows/upstream.yml delete mode 100644 moveit_task_constructor/core/python/src/moveit/python_tools/__init__.py create mode 100644 moveit_task_constructor/demo/CHANGELOG.rst create mode 100644 moveit_task_constructor/msgs/CHANGELOG.rst diff --git a/moveit_task_constructor/.gitignore b/moveit_task_constructor/.gitignore new file mode 100644 index 0000000..5d9904d --- /dev/null +++ b/moveit_task_constructor/.gitignore @@ -0,0 +1,3 @@ +*.swp +*.pyc +__pycache__/ diff --git a/moveit_task_constructor/.gitmodules b/moveit_task_constructor/.gitmodules new file mode 100644 index 0000000..9339bbb --- /dev/null +++ b/moveit_task_constructor/.gitmodules @@ -0,0 +1,5 @@ +[submodule "core/python/pybind11"] + path = core/python/pybind11 + url = https://github.com/pybind/pybind11 + branch = smart_holder + shallow = true diff --git a/moveit_task_constructor/.vscode/c_cpp_properties.json b/moveit_task_constructor/.vscode/c_cpp_properties.json deleted file mode 100644 index 831e1ad..0000000 --- a/moveit_task_constructor/.vscode/c_cpp_properties.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "configurations": [ - { - "browse": { - "databaseFilename": "${default}", - "limitSymbolsToIncludedHeaders": false - }, - "includePath": [ - "/home/cenk/catkin_ws/devel/include/**", - "/opt/ros/noetic/include/**", - "/home/cenk/catkin_ws/src/air_hardware_interface/include/**", - "/home/cenk/catkin_ws/src/air_moveit_config/include/**", - "/home/cenk/catkin_ws/src/moveit_task_constructor/core/include/**", - "/home/cenk/catkin_ws/src/moveit_task_constructor/demo/include/**", - "/home/cenk/catkin_ws/src/octomap_mapping/octomap_server/include/**", - "/home/cenk/catkin_ws/src/qbdevice-ros/qb_device_control/include/**", - "/home/cenk/catkin_ws/src/qbdevice-ros/qb_device_driver/include/**", - "/home/cenk/catkin_ws/src/qbdevice-ros/qb_device_gazebo/include/**", - "/home/cenk/catkin_ws/src/qbdevice-ros/qb_device_hardware_interface/include/**", - "/home/cenk/catkin_ws/src/qbdevice-ros/qb_device_msgs/include/**", - "/home/cenk/catkin_ws/src/qbdevice-ros/qb_device_srvs/include/**", - "/home/cenk/catkin_ws/src/qbdevice-ros/qb_device_utils/include/**", - "/home/cenk/catkin_ws/src/qbhand-ros/qb_hand_gazebo/include/**", - "/home/cenk/catkin_ws/src/qbhand-ros/qb_hand_hardware_interface/include/**", - "/home/cenk/catkin_ws/src/realsense-ros/realsense2_camera/include/**", - "/home/cenk/catkin_ws/src/moveit_task_constructor/rviz_marker_tools/include/**", - "/usr/include/**" - ], - "name": "ROS", - "intelliSenseMode": "gcc-x64", - "compilerPath": "/usr/bin/gcc", - "cStandard": "gnu11", - "cppStandard": "c++14" - } - ], - "version": 4 -} \ No newline at end of file diff --git a/moveit_task_constructor/.vscode/settings.json b/moveit_task_constructor/.vscode/settings.json deleted file mode 100644 index 940069b..0000000 --- a/moveit_task_constructor/.vscode/settings.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "ros.distro": "noetic", - "python.autoComplete.extraPaths": [ - "/home/cenk/catkin_ws/devel/lib/python3/dist-packages", - "/opt/ros/noetic/lib/python3/dist-packages" - ] -} \ No newline at end of file diff --git a/moveit_task_constructor/capabilities/package.xml b/moveit_task_constructor/capabilities/package.xml index 7ae112f..7db2754 100644 --- a/moveit_task_constructor/capabilities/package.xml +++ b/moveit_task_constructor/capabilities/package.xml @@ -1,6 +1,6 @@ moveit_task_constructor_capabilities - 0.0.0 + 0.1.2 MoveGroupCapabilites to interact with MoveIt diff --git a/moveit_task_constructor/core/include/moveit/python/python_tools/geometry_msg_types.h b/moveit_task_constructor/core/include/moveit/python/python_tools/geometry_msg_types.h deleted file mode 100644 index 711738d..0000000 --- a/moveit_task_constructor/core/include/moveit/python/python_tools/geometry_msg_types.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -#include "ros_types.h" -#include - -/** Convienency type casters, also allowing to initialize Stamped geometry msgs from a string */ - -namespace pybind11 { -namespace detail { - -template <> -struct type_caster : type_caster_ros_msg -{ - // Python -> C++ - bool load(handle src, bool convert) { - type_caster str_caster; - if (convert && str_caster.load(src, false)) { // string creates identity pose with given frame - value.header.frame_id = static_cast(str_caster); - value.pose.orientation.w = 1.0; - return true; - } - return type_caster_ros_msg::load(src, convert); - } -}; - -} // namespace detail -} // namespace pybind11 diff --git a/moveit_task_constructor/core/include/moveit/python/python_tools/ros_init.h b/moveit_task_constructor/core/include/moveit/python/python_tools/ros_init.h deleted file mode 100644 index 5bc0505..0000000 --- a/moveit_task_constructor/core/include/moveit/python/python_tools/ros_init.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#include -#include -#include - -namespace moveit { -namespace python { - -/// singleton class to initialize ROS C++ (once) from Python -class InitProxy -{ -public: - static void init(const std::string& node_name = "moveit_python_wrapper", - const std::map& remappings = std::map(), - uint32_t options = 0); - static void shutdown(); - - ~InitProxy(); - -private: - InitProxy(const std::string& node_name, const std::map& remappings, uint32_t options); - - static boost::mutex lock_; - static std::unique_ptr singleton_instance_; - -private: - std::unique_ptr spinner; -}; -} // namespace python -} // namespace moveit diff --git a/moveit_task_constructor/core/include/moveit/python/python_tools/ros_types.h b/moveit_task_constructor/core/include/moveit/python/python_tools/ros_types.h deleted file mode 100644 index 437e4fe..0000000 --- a/moveit_task_constructor/core/include/moveit/python/python_tools/ros_types.h +++ /dev/null @@ -1,94 +0,0 @@ -#pragma once - -#include -#include -#include - -/** Provide pybind11 type converters for ROS types */ - -namespace moveit { -namespace python { - -PYBIND11_EXPORT pybind11::object createMessage(const std::string& ros_msg_name); -PYBIND11_EXPORT bool convertible(const pybind11::handle& h, const char* ros_msg_name); - -} // namespace python -} // namespace moveit - -namespace pybind11 { -namespace detail { - -/// Convert ros::Duration / ros::WallDuration into a float -template -struct DurationCaster -{ - // C++ -> Python - static handle cast(T&& src, return_value_policy /* policy */, handle /* parent */) { - return PyFloat_FromDouble(src.toSec()); - } - - // Python -> C++ - bool load(handle src, bool convert) { - if (hasattr(src, "to_sec")) { - value = T(src.attr("to_sec")().cast()); - } else if (convert) { - value = T(src.cast()); - } else - return false; - return true; - } - - PYBIND11_TYPE_CASTER(T, _("Duration")); -}; - -template <> -struct type_caster : DurationCaster -{}; - -template <> -struct type_caster : DurationCaster -{}; - -/// Convert ROS message types (C++ <-> python) -template ::value>> -struct type_caster_ros_msg -{ - // C++ -> Python - static handle cast(const T& src, return_value_policy /* policy */, handle /* parent */) { - // serialize src into (python) buffer - std::size_t size = ros::serialization::serializationLength(src); - object pbuffer = reinterpret_steal(PyBytes_FromStringAndSize(nullptr, size)); - ros::serialization::OStream stream(reinterpret_cast(PyBytes_AsString(pbuffer.ptr())), size); - ros::serialization::serialize(stream, src); - // deserialize python type from buffer - object msg = moveit::python::createMessage(ros::message_traits::DataType::value()); - msg.attr("deserialize")(pbuffer); - return msg.release(); - } - - // Python -> C++ - bool load(handle src, bool /*convert*/) { - if (!moveit::python::convertible(src, ros::message_traits::DataType::value())) - return false; - // serialize src into (python) buffer - object pstream = module::import("io").attr("BytesIO")(); - src.attr("serialize")(pstream); - object pbuffer = pstream.attr("getvalue")(); - // deserialize C++ type from buffer - char* cbuffer = nullptr; - Py_ssize_t size; - PyBytes_AsStringAndSize(pbuffer.ptr(), &cbuffer, &size); - ros::serialization::IStream cstream(const_cast(reinterpret_cast(cbuffer)), size); - ros::serialization::deserialize(cstream, value); - return true; - } - - PYBIND11_TYPE_CASTER(T, _()); -}; - -template -struct type_caster::value>> : type_caster_ros_msg -{}; - -} // namespace detail -} // namespace pybind11 diff --git a/moveit_task_constructor/core/python/bindings/src/core.h b/moveit_task_constructor/core/python/bindings/src/core.h index f69e8bd..9be7a4d 100644 --- a/moveit_task_constructor/core/python/bindings/src/core.h +++ b/moveit_task_constructor/core/python/bindings/src/core.h @@ -109,9 +109,6 @@ class PyPropagatingEitherWay : public PyStage } // namespace task_constructor } // namespace moveit -PYBIND11_SMART_HOLDER_TYPE_CASTERS(moveit::task_constructor::Property) -PYBIND11_SMART_HOLDER_TYPE_CASTERS(moveit::task_constructor::PropertyMap) - PYBIND11_SMART_HOLDER_TYPE_CASTERS(moveit::task_constructor::solvers::PlannerInterface) PYBIND11_SMART_HOLDER_TYPE_CASTERS(moveit::task_constructor::SolutionBase) diff --git a/moveit_task_constructor/core/python/bindings/src/python_tools.cpp b/moveit_task_constructor/core/python/bindings/src/python_tools.cpp deleted file mode 100644 index d10e566..0000000 --- a/moveit_task_constructor/core/python/bindings/src/python_tools.cpp +++ /dev/null @@ -1,53 +0,0 @@ -/********************************************************************* - * Software License Agreement (BSD License) - * - * Copyright (c) 2020, Bielefeld University - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Bielefeld University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************/ - -#include -#include -#include -#include - -namespace py = pybind11; -using namespace moveit::python; - -PYBIND11_MODULE(pymoveit_python_tools, m) { - m.doc() = "MoveIt python tools"; - - m.def("roscpp_init", &InitProxy::init, "Initialize C++ ROS", py::arg("node_name") = "moveit_python_wrapper", - py::arg("remappings") = std::map(), py::arg("options") = 0); - m.def("roscpp_shutdown", &InitProxy::shutdown, "Shutdown C++ ROS"); - - py::enum_(m, "InitOption") - .value("AnonymousName", ros::init_options::AnonymousName) - .value("NoRosout", ros::init_options::NoRosout); -} diff --git a/moveit_task_constructor/core/python/bindings/src/ros_init.cpp b/moveit_task_constructor/core/python/bindings/src/ros_init.cpp deleted file mode 100644 index 30fdd38..0000000 --- a/moveit_task_constructor/core/python/bindings/src/ros_init.cpp +++ /dev/null @@ -1,68 +0,0 @@ -/********************************************************************* - * Software License Agreement (BSD License) - * - * Copyright (c) 2020, Bielefeld University - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Bielefeld University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************/ - -#include -#include - -namespace moveit { -namespace python { - -boost::mutex InitProxy::lock_; -std::unique_ptr InitProxy::singleton_instance_; - -void InitProxy::init(const std::string& node_name, const std::map& remappings, - uint32_t options) { - boost::mutex::scoped_lock slock(lock_); - if (!singleton_instance_ && !ros::isInitialized()) - singleton_instance_.reset(new InitProxy(node_name, remappings, options)); -} - -void InitProxy::shutdown() { - boost::mutex::scoped_lock slock(lock_); - singleton_instance_.reset(); -} - -InitProxy::InitProxy(const std::string& node_name, const std::map& remappings, - uint32_t options) { - ros::init(remappings, node_name, options | ros::init_options::NoSigintHandler); - spinner.reset(new ros::AsyncSpinner(1)); - spinner->start(); -} - -InitProxy::~InitProxy() { - spinner->stop(); - spinner.reset(); -} -} // namespace python -} // namespace moveit diff --git a/moveit_task_constructor/core/python/bindings/src/ros_types.cpp b/moveit_task_constructor/core/python/bindings/src/ros_types.cpp deleted file mode 100644 index ebab88a..0000000 --- a/moveit_task_constructor/core/python/bindings/src/ros_types.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/********************************************************************* - * Software License Agreement (BSD License) - * - * Copyright (c) 2020, Bielefeld University - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Bielefeld University nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - *********************************************************************/ - -#include - -namespace py = pybind11; -namespace moveit { -namespace python { - -py::object createMessage(const std::string& ros_msg_name) { - // find delimiting '/' in ros msg name - std::size_t pos = ros_msg_name.find('/'); - // import module - py::module m = py::module::import((ros_msg_name.substr(0, pos) + ".msg").c_str()); - // retrieve type instance - py::object cls = m.attr(ros_msg_name.substr(pos + 1).c_str()); - // create message instance - return cls(); -} - -bool convertible(const pybind11::handle& h, const char* ros_msg_name) { - try { - PyObject* o = h.attr("_type").ptr(); - return py::cast(o) == ros_msg_name; - } catch (const std::exception& e) { - return false; - } -} -} // namespace python -} // namespace moveit diff --git a/moveit_task_constructor/core/python/bindings/src/stages.cpp b/moveit_task_constructor/core/python/bindings/src/stages.cpp index df5cf0e..99fce89 100644 --- a/moveit_task_constructor/core/python/bindings/src/stages.cpp +++ b/moveit_task_constructor/core/python/bindings/src/stages.cpp @@ -40,6 +40,7 @@ #include #include #include +#include namespace py = pybind11; using namespace py::literals; diff --git a/moveit_task_constructor/core/python/pybind11/.github/CODEOWNERS b/moveit_task_constructor/core/python/pybind11/.github/CODEOWNERS deleted file mode 100644 index 4e2c669..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/CODEOWNERS +++ /dev/null @@ -1,9 +0,0 @@ -*.cmake @henryiii -CMakeLists.txt @henryiii -*.yml @henryiii -*.yaml @henryiii -/tools/ @henryiii -/pybind11/ @henryiii -noxfile.py @henryiii -.clang-format @henryiii -.clang-tidy @henryiii diff --git a/moveit_task_constructor/core/python/pybind11/.github/CONTRIBUTING.md b/moveit_task_constructor/core/python/pybind11/.github/CONTRIBUTING.md deleted file mode 100644 index e8294c8..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/CONTRIBUTING.md +++ /dev/null @@ -1,387 +0,0 @@ -Thank you for your interest in this project! Please refer to the following -sections on how to contribute code and bug reports. - -### Reporting bugs - -Before submitting a question or bug report, please take a moment of your time -and ensure that your issue isn't already discussed in the project documentation -provided at [pybind11.readthedocs.org][] or in the [issue tracker][]. You can -also check [gitter][] to see if it came up before. - -Assuming that you have identified a previously unknown problem or an important -question, it's essential that you submit a self-contained and minimal piece of -code that reproduces the problem. In other words: no external dependencies, -isolate the function(s) that cause breakage, submit matched and complete C++ -and Python snippets that can be easily compiled and run in isolation; or -ideally make a small PR with a failing test case that can be used as a starting -point. - -## Pull requests - -Contributions are submitted, reviewed, and accepted using GitHub pull requests. -Please refer to [this article][using pull requests] for details and adhere to -the following rules to make the process as smooth as possible: - -* Make a new branch for every feature you're working on. -* Make small and clean pull requests that are easy to review but make sure they - do add value by themselves. -* Add tests for any new functionality and run the test suite (`cmake --build - build --target pytest`) to ensure that no existing features break. -* Please run [`pre-commit`][pre-commit] to check your code matches the - project style. (Note that `gawk` is required.) Use `pre-commit run - --all-files` before committing (or use installed-mode, check pre-commit docs) - to verify your code passes before pushing to save time. -* This project has a strong focus on providing general solutions using a - minimal amount of code, thus small pull requests are greatly preferred. - -### Licensing of contributions - -pybind11 is provided under a BSD-style license that can be found in the -``LICENSE`` file. By using, distributing, or contributing to this project, you -agree to the terms and conditions of this license. - -You are under no obligation whatsoever to provide any bug fixes, patches, or -upgrades to the features, functionality or performance of the source code -("Enhancements") to anyone; however, if you choose to make your Enhancements -available either publicly, or directly to the author of this software, without -imposing a separate written license agreement for such Enhancements, then you -hereby grant the following license: a non-exclusive, royalty-free perpetual -license to install, use, modify, prepare derivative works, incorporate into -other computer software, distribute, and sublicense such enhancements or -derivative works thereof, in binary and source code form. - - -## Development of pybind11 - -### Quick setup - -To setup a quick development environment, use [`nox`](https://nox.thea.codes). -This will allow you to do some common tasks with minimal setup effort, but will -take more time to run and be less flexible than a full development environment. -If you use [`pipx run nox`](https://pipx.pypa.io), you don't even need to -install `nox`. Examples: - -```bash -# List all available sessions -nox -l - -# Run linters -nox -s lint - -# Run tests on Python 3.9 -nox -s tests-3.9 - -# Build and preview docs -nox -s docs -- serve - -# Build SDists and wheels -nox -s build -``` - -### Full setup - -To setup an ideal development environment, run the following commands on a -system with CMake 3.14+: - -```bash -python3 -m venv venv -source venv/bin/activate -pip install -r tests/requirements.txt -cmake -S . -B build -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -cmake --build build -j4 -``` - -Tips: - -* You can use `virtualenv` (from PyPI) instead of `venv` (which is Python 3 - only). -* You can select any name for your environment folder; if it contains "env" it - will be ignored by git. -* If you don’t have CMake 3.14+, just add “cmake” to the pip install command. -* You can use `-DPYBIND11_FINDPYTHON=ON` to use FindPython on CMake 3.12+ -* In classic mode, you may need to set `-DPYTHON_EXECUTABLE=/path/to/python`. - FindPython uses `-DPython_ROOT_DIR=/path/to` or - `-DPython_EXECUTABLE=/path/to/python`. - -### Configuration options - -In CMake, configuration options are given with “-D”. Options are stored in the -build directory, in the `CMakeCache.txt` file, so they are remembered for each -build directory. Two selections are special - the generator, given with `-G`, -and the compiler, which is selected based on environment variables `CXX` and -similar, or `-DCMAKE_CXX_COMPILER=`. Unlike the others, these cannot be changed -after the initial run. - -The valid options are: - -* `-DCMAKE_BUILD_TYPE`: Release, Debug, MinSizeRel, RelWithDebInfo -* `-DPYBIND11_FINDPYTHON=ON`: Use CMake 3.12+’s FindPython instead of the - classic, deprecated, custom FindPythonLibs -* `-DPYBIND11_NOPYTHON=ON`: Disable all Python searching (disables tests) -* `-DBUILD_TESTING=ON`: Enable the tests -* `-DDOWNLOAD_CATCH=ON`: Download catch to build the C++ tests -* `-DDOWNLOAD_EIGEN=ON`: Download Eigen for the NumPy tests -* `-DPYBIND11_INSTALL=ON/OFF`: Enable the install target (on by default for the - master project) -* `-DUSE_PYTHON_INSTALL_DIR=ON`: Try to install into the python dir - - -
A few standard CMake tricks: (click to expand)

- -* Use `cmake --build build -v` to see the commands used to build the files. -* Use `cmake build -LH` to list the CMake options with help. -* Use `ccmake` if available to see a curses (terminal) gui, or `cmake-gui` for - a completely graphical interface (not present in the PyPI package). -* Use `cmake --build build -j12` to build with 12 cores (for example). -* Use `-G` and the name of a generator to use something different. `cmake - --help` lists the generators available. - - On Unix, setting `CMAKE_GENERATER=Ninja` in your environment will give - you automatic mulithreading on all your CMake projects! -* Open the `CMakeLists.txt` with QtCreator to generate for that IDE. -* You can use `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to generate the `.json` file - that some tools expect. - -

- - -To run the tests, you can "build" the check target: - -```bash -cmake --build build --target check -``` - -`--target` can be spelled `-t` in CMake 3.15+. You can also run individual -tests with these targets: - -* `pytest`: Python tests only, using the -[pytest](https://docs.pytest.org/en/stable/) framework -* `cpptest`: C++ tests only -* `test_cmake_build`: Install / subdirectory tests - -If you want to build just a subset of tests, use -`-DPYBIND11_TEST_OVERRIDE="test_callbacks;test_pickling"`. If this is -empty, all tests will be built. Tests are specified without an extension if they need both a .py and -.cpp file. - -You may also pass flags to the `pytest` target by editing `tests/pytest.ini` or -by using the `PYTEST_ADDOPTS` environment variable -(see [`pytest` docs](https://docs.pytest.org/en/2.7.3/customize.html#adding-default-options)). As an example: - -```bash -env PYTEST_ADDOPTS="--capture=no --exitfirst" \ - cmake --build build --target pytest -# Or using abbreviated flags -env PYTEST_ADDOPTS="-s -x" cmake --build build --target pytest -``` - -### Formatting - -All formatting is handled by pre-commit. - -Install with brew (macOS) or pip (any OS): - -```bash -# Any OS -python3 -m pip install pre-commit - -# OR macOS with homebrew: -brew install pre-commit -``` - -Then, you can run it on the items you've added to your staging area, or all -files: - -```bash -pre-commit run -# OR -pre-commit run --all-files -``` - -And, if you want to always use it, you can install it as a git hook (hence the -name, pre-commit): - -```bash -pre-commit install -``` - -### Clang-Format - -As of v2.6.2, pybind11 ships with a [`clang-format`][clang-format] -configuration file at the top level of the repo (the filename is -`.clang-format`). Currently, formatting is NOT applied automatically, but -manually using `clang-format` for newly developed files is highly encouraged. -To check if a file needs formatting: - -```bash -clang-format -style=file --dry-run some.cpp -``` - -The output will show things to be fixed, if any. To actually format the file: - -```bash -clang-format -style=file -i some.cpp -``` - -Note that the `-style-file` option searches the parent directories for the -`.clang-format` file, i.e. the commands above can be run in any subdirectory -of the pybind11 repo. - -### Clang-Tidy - -[`clang-tidy`][clang-tidy] performs deeper static code analyses and is -more complex to run, compared to `clang-format`, but support for `clang-tidy` -is built into the pybind11 CMake configuration. To run `clang-tidy`, the -following recipe should work. Run the `docker` command from the top-level -directory inside your pybind11 git clone. Files will be modified in place, -so you can use git to monitor the changes. - -```bash -docker run --rm -v $PWD:/mounted_pybind11 -it silkeh/clang:12 -apt-get update && apt-get install -y python3-dev python3-pytest -cmake -S /mounted_pybind11/ -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);-fix" -DDOWNLOAD_EIGEN=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=17 -cmake --build build -j 2 -- --keep-going -``` - -### Include what you use - -To run include what you use, install (`brew install include-what-you-use` on -macOS), then run: - -```bash -cmake -S . -B build-iwyu -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=$(which include-what-you-use) -cmake --build build -``` - -The report is sent to stderr; you can pipe it into a file if you wish. - -### Build recipes - -This builds with the Intel compiler (assuming it is in your path, along with a -recent CMake and Python 3): - -```bash -python3 -m venv venv -. venv/bin/activate -pip install pytest -cmake -S . -B build-intel -DCMAKE_CXX_COMPILER=$(which icpc) -DDOWNLOAD_CATCH=ON -DDOWNLOAD_EIGEN=ON -DPYBIND11_WERROR=ON -``` - -This will test the PGI compilers: - -```bash -docker run --rm -it -v $PWD:/pybind11 nvcr.io/hpc/pgi-compilers:ce -apt-get update && apt-get install -y python3-dev python3-pip python3-pytest -wget -qO- "https://cmake.org/files/v3.18/cmake-3.18.2-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local -cmake -S pybind11/ -B build -cmake --build build -``` - -### Explanation of the SDist/wheel building design - -> These details below are _only_ for packaging the Python sources from git. The -> SDists and wheels created do not have any extra requirements at all and are -> completely normal. - -The main objective of the packaging system is to create SDists (Python's source -distribution packages) and wheels (Python's binary distribution packages) that -include everything that is needed to work with pybind11, and which can be -installed without any additional dependencies. This is more complex than it -appears: in order to support CMake as a first class language even when using -the PyPI package, they must include the _generated_ CMake files (so as not to -require CMake when installing the `pybind11` package itself). They should also -provide the option to install to the "standard" location -(`/include/pybind11` and `/share/cmake/pybind11`) so they are -easy to find with CMake, but this can cause problems if you are not an -environment or using ``pyproject.toml`` requirements. This was solved by having -two packages; the "nice" pybind11 package that stores the includes and CMake -files inside the package, that you get access to via functions in the package, -and a `pybind11-global` package that can be included via `pybind11[global]` if -you want the more invasive but discoverable file locations. - -If you want to install or package the GitHub source, it is best to have Pip 10 -or newer on Windows, macOS, or Linux (manylinux1 compatible, includes most -distributions). You can then build the SDists, or run any procedure that makes -SDists internally, like making wheels or installing. - - -```bash -# Editable development install example -python3 -m pip install -e . -``` - -Since Pip itself does not have an `sdist` command (it does have `wheel` and -`install`), you may want to use the upcoming `build` package: - -```bash -python3 -m pip install build - -# Normal package -python3 -m build -s . - -# Global extra -PYBIND11_GLOBAL_SDIST=1 python3 -m build -s . -``` - -If you want to use the classic "direct" usage of `python setup.py`, you will -need CMake 3.15+ and either `make` or `ninja` preinstalled (possibly via `pip -install cmake ninja`), since directly running Python on `setup.py` cannot pick -up and install `pyproject.toml` requirements. As long as you have those two -things, though, everything works the way you would expect: - -```bash -# Normal package -python3 setup.py sdist - -# Global extra -PYBIND11_GLOBAL_SDIST=1 python3 setup.py sdist -``` - -A detailed explanation of the build procedure design for developers wanting to -work on or maintain the packaging system is as follows: - -#### 1. Building from the source directory - -When you invoke any `setup.py` command from the source directory, including -`pip wheel .` and `pip install .`, you will activate a full source build. This -is made of the following steps: - -1. If the tool is PEP 518 compliant, like Pip 10+, it will create a temporary - virtual environment and install the build requirements (mostly CMake) into - it. (if you are not on Windows, macOS, or a manylinux compliant system, you - can disable this with `--no-build-isolation` as long as you have CMake 3.15+ - installed) -2. The environment variable `PYBIND11_GLOBAL_SDIST` is checked - if it is set - and truthy, this will be make the accessory `pybind11-global` package, - instead of the normal `pybind11` package. This package is used for - installing the files directly to your environment root directory, using - `pybind11[global]`. -2. `setup.py` reads the version from `pybind11/_version.py` and verifies it - matches `includes/pybind11/detail/common.h`. -3. CMake is run with `-DCMAKE_INSTALL_PREIFX=pybind11`. Since the CMake install - procedure uses only relative paths and is identical on all platforms, these - files are valid as long as they stay in the correct relative position to the - includes. `pybind11/share/cmake/pybind11` has the CMake files, and - `pybind11/include` has the includes. The build directory is discarded. -4. Simpler files are placed in the SDist: `tools/setup_*.py.in`, - `tools/pyproject.toml` (`main` or `global`) -5. The package is created by running the setup function in the - `tools/setup_*.py`. `setup_main.py` fills in Python packages, and - `setup_global.py` fills in only the data/header slots. -6. A context manager cleans up the temporary CMake install directory (even if - an error is thrown). - -### 2. Building from SDist - -Since the SDist has the rendered template files in `tools` along with the -includes and CMake files in the correct locations, the builds are completely -trivial and simple. No extra requirements are required. You can even use Pip 9 -if you really want to. - - -[pre-commit]: https://pre-commit.com -[clang-format]: https://clang.llvm.org/docs/ClangFormat.html -[clang-tidy]: https://clang.llvm.org/extra/clang-tidy/ -[pybind11.readthedocs.org]: http://pybind11.readthedocs.org/en/latest -[issue tracker]: https://github.com/pybind/pybind11/issues -[gitter]: https://gitter.im/pybind/Lobby -[using pull requests]: https://help.github.com/articles/using-pull-requests diff --git a/moveit_task_constructor/core/python/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml b/moveit_task_constructor/core/python/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml deleted file mode 100644 index bd6a9a8..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/ISSUE_TEMPLATE/bug-report.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Bug Report -description: File an issue about a bug -title: "[BUG]: " -labels: [triage] -body: - - type: markdown - attributes: - value: | - Maintainers will only make a best effort to triage PRs. Please do your best to make the issue as easy to act on as possible, and only open if clearly a problem with pybind11 (ask first if unsure). - - type: checkboxes - id: steps - attributes: - label: Required prerequisites - description: Make sure you've completed the following steps before submitting your issue -- thank you! - options: - - label: Make sure you've read the [documentation](https://pybind11.readthedocs.io). Your issue may be addressed there. - required: true - - label: Search the [issue tracker](https://github.com/pybind/pybind11/issues) and [Discussions](https:/pybind/pybind11/discussions) to verify that this hasn't already been reported. +1 or comment there if it has. - required: true - - label: Consider asking first in the [Gitter chat room](https://gitter.im/pybind/Lobby) or in a [Discussion](https:/pybind/pybind11/discussions/new). - required: false - - - type: textarea - id: description - attributes: - label: Problem description - placeholder: >- - Provide a short description, state the expected behavior and what - actually happens. Include relevant information like what version of - pybind11 you are using, what system you are on, and any useful commands - / output. - validations: - required: true - - - type: textarea - id: code - attributes: - label: Reproducible example code - placeholder: >- - The code should be minimal, have no external dependencies, isolate the - function(s) that cause breakage. Submit matched and complete C++ and - Python snippets that can be easily compiled and run to diagnose the - issue. If possible, make a PR with a new, failing test to give us a - starting point to work on! - render: text diff --git a/moveit_task_constructor/core/python/pybind11/.github/ISSUE_TEMPLATE/config.yml b/moveit_task_constructor/core/python/pybind11/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index 27f9a80..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,8 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: Ask a question - url: https://github.com/pybind/pybind11/discussions/new - about: Please ask and answer questions here, or propose new ideas. - - name: Gitter room - url: https://gitter.im/pybind/Lobby - about: A room for discussing pybind11 with an active community diff --git a/moveit_task_constructor/core/python/pybind11/.github/dependabot.yml b/moveit_task_constructor/core/python/pybind11/.github/dependabot.yml deleted file mode 100644 index 7327336..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/dependabot.yml +++ /dev/null @@ -1,16 +0,0 @@ -version: 2 -updates: - # Maintain dependencies for GitHub Actions - - package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "daily" - ignore: - # Official actions have moving tags like v1 - # that are used, so they don't need updates here - - dependency-name: "actions/checkout" - - dependency-name: "actions/setup-python" - - dependency-name: "actions/cache" - - dependency-name: "actions/upload-artifact" - - dependency-name: "actions/download-artifact" - - dependency-name: "actions/labeler" diff --git a/moveit_task_constructor/core/python/pybind11/.github/labeler.yml b/moveit_task_constructor/core/python/pybind11/.github/labeler.yml deleted file mode 100644 index abb0d05..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/labeler.yml +++ /dev/null @@ -1,8 +0,0 @@ -docs: -- any: - - 'docs/**/*.rst' - - '!docs/changelog.rst' - - '!docs/upgrade.rst' - -ci: -- '.github/workflows/*.yml' diff --git a/moveit_task_constructor/core/python/pybind11/.github/labeler_merged.yml b/moveit_task_constructor/core/python/pybind11/.github/labeler_merged.yml deleted file mode 100644 index 2374ad4..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/labeler_merged.yml +++ /dev/null @@ -1,3 +0,0 @@ -needs changelog: -- all: - - '!docs/changelog.rst' diff --git a/moveit_task_constructor/core/python/pybind11/.github/pull_request_template.md b/moveit_task_constructor/core/python/pybind11/.github/pull_request_template.md deleted file mode 100644 index 54b7f51..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/pull_request_template.md +++ /dev/null @@ -1,19 +0,0 @@ - -## Description - - - - -## Suggested changelog entry: - - - -```rst - -``` - - diff --git a/moveit_task_constructor/core/python/pybind11/.github/workflows/ci.yml b/moveit_task_constructor/core/python/pybind11/.github/workflows/ci.yml deleted file mode 100644 index 27d9df2..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/workflows/ci.yml +++ /dev/null @@ -1,966 +0,0 @@ -name: CI - -on: - workflow_dispatch: - pull_request: - push: - branches: - - master - - stable - - smart_holder - - v* - -concurrency: - group: test-sh-avl${{ github.ref }} - cancel-in-progress: true - -env: - PIP_ONLY_BINARY: numpy - -jobs: - # This is the "main" test suite, which tests a large number of different - # versions of default compilers and Python versions in GitHub Actions. - standard: - strategy: - fail-fast: false - matrix: - runs-on: [ubuntu-latest, windows-2022, macos-latest] - python: - - '2.7' - - '3.5' - - '3.6' - - '3.9' - - '3.10' - - 'pypy-3.7-v7.3.7' - - 'pypy-3.8-v7.3.7' - - # Items in here will either be added to the build matrix (if not - # present), or add new keys to an existing matrix element if all the - # existing keys match. - # - # We support an optional key: args, for cmake args - include: - # Just add a key - - runs-on: ubuntu-latest - python: '3.6' - args: > - -DPYBIND11_FINDPYTHON=ON - -DCMAKE_CXX_FLAGS="-D_=1" - - runs-on: windows-latest - python: '3.6' - args: > - -DPYBIND11_FINDPYTHON=ON - - runs-on: macos-latest - python: 'pypy-2.7' - # Inject a couple Windows 2019 runs - - runs-on: windows-2019 - python: '3.9' - - runs-on: windows-2019 - python: '2.7' - - name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}" - runs-on: ${{ matrix.runs-on }} - - steps: - - uses: actions/checkout@v2 - - - name: Setup Python ${{ matrix.python }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - - name: Setup Boost (Linux) - # Can't use boost + define _ - if: runner.os == 'Linux' && matrix.python != '3.6' - run: sudo apt-get install libboost-dev - - - name: Setup Boost (macOS) - if: runner.os == 'macOS' - run: brew install boost - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Cache wheels - if: runner.os == 'macOS' - uses: actions/cache@v2 - with: - # This path is specific to macOS - we really only need it for PyPy NumPy wheels - # See https://github.com/actions/cache/blob/master/examples.md#python---pip - # for ways to do this more generally - path: ~/Library/Caches/pip - # Look to see if there is a cache hit for the corresponding requirements file - key: ${{ runner.os }}-pip-${{ matrix.python }}-x64-${{ hashFiles('tests/requirements.txt') }} - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - - name: Setup annotations on Linux - if: runner.os == 'Linux' - run: python -m pip install pytest-github-actions-annotate-failures - - # First build - C++11 mode and inplace - - name: Configure C++11 ${{ matrix.args }} - run: > - cmake -S . -B . - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=11 - ${{ matrix.args }} - - - name: Build C++11 - run: cmake --build . -j 2 - - - name: Python tests C++11 - run: cmake --build . --target pytest -j 2 - - - name: C++11 tests - # TODO: Figure out how to load the DLL on Python 3.8+ - if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9 || matrix.python == '3.10' || matrix.python == '3.11-dev' || matrix.python == 'pypy-3.8'))" - run: cmake --build . --target cpptest -j 2 - - - name: Interface test C++11 - run: cmake --build . --target test_cmake_build - - - name: Clean directory - run: git clean -fdx - - # Second build - C++17 mode and in a build directory - - name: Configure C++17 - run: > - cmake -S . -B build2 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - ${{ matrix.args }} - - - name: Build - run: cmake --build build2 -j 2 - - - name: Python tests - run: cmake --build build2 --target pytest - - - name: C++ tests - # TODO: Figure out how to load the DLL on Python 3.8+ - if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9 || matrix.python == '3.10' || matrix.python == '3.11-dev' || matrix.python == 'pypy-3.8'))" - run: cmake --build build2 --target cpptest - - # Third build - C++17 mode with unstable ABI - - name: Configure (unstable ABI) - run: > - cmake -S . -B build3 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - -DPYBIND11_INTERNALS_VERSION=10000000 - "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" - ${{ matrix.args }} - - - name: Build (unstable ABI) - run: cmake --build build3 -j 2 - - - name: Python tests (unstable ABI) - run: cmake --build build3 --target pytest - - - name: Interface test - run: cmake --build build2 --target test_cmake_build - - # Eventually Microsoft might have an action for setting up - # MSVC, but for now, this action works: - - name: Prepare compiler environment for Windows 🐍 2.7 - if: matrix.python == 2.7 && runner.os == 'Windows' - uses: ilammy/msvc-dev-cmd@v1.10.0 - with: - arch: x64 - - # This makes two environment variables available in the following step(s) - - name: Set Windows 🐍 2.7 environment variables - if: matrix.python == 2.7 && runner.os == 'Windows' - shell: bash - run: | - echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV - echo "MSSdk=1" >> $GITHUB_ENV - - # This makes sure the setup_helpers module can build packages using - # setuptools - - name: Setuptools helpers test - run: pytest tests/extra_setuptools - if: "!(matrix.python == '3.5' && matrix.runs-on == 'windows-2022')" - - - deadsnakes: - strategy: - fail-fast: false - matrix: - include: - # TODO: Fails on 3.10, investigate - - python-version: "3.9" - python-debug: true - valgrind: true - # - python-version: "3.11-dev" - # python-debug: false - - name: "🐍 ${{ matrix.python-version }}${{ matrix.python-debug && '-dbg' || '' }} (deadsnakes)${{ matrix.valgrind && ' • Valgrind' || '' }} • x64" - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Setup Python ${{ matrix.python-version }} (deadsnakes) - uses: deadsnakes/action@v2.1.1 - with: - python-version: ${{ matrix.python-version }} - debug: ${{ matrix.python-debug }} - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Valgrind cache - if: matrix.valgrind - uses: actions/cache@v2 - id: cache-valgrind - with: - path: valgrind - key: 3.16.1 # Valgrind version - - - name: Compile Valgrind - if: matrix.valgrind && steps.cache-valgrind.outputs.cache-hit != 'true' - run: | - VALGRIND_VERSION=3.16.1 - curl https://sourceware.org/pub/valgrind/valgrind-$VALGRIND_VERSION.tar.bz2 -o - | tar xj - mv valgrind-$VALGRIND_VERSION valgrind - cd valgrind - ./configure - make -j 2 > /dev/null - - - name: Install Valgrind - if: matrix.valgrind - working-directory: valgrind - run: | - sudo make install - sudo apt-get update - sudo apt-get install libc6-dbg # Needed by Valgrind - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - - name: Configure - env: - SETUPTOOLS_USE_DISTUTILS: stdlib - run: > - cmake -S . -B build - -DCMAKE_BUILD_TYPE=Debug - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - - - name: Build - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Run Valgrind on Python tests - if: matrix.valgrind - run: cmake --build build --target memcheck - - - # Testing on clang using the excellent silkeh clang docker images - clang: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - clang: - - 3.6 - - 3.7 - - 3.9 - - 7 - - 9 - - dev - std: - - 11 - include: - - clang: 5 - std: 14 - - clang: 10 - std: 20 - - clang: 10 - std: 17 - - name: "🐍 3 • Clang ${{ matrix.clang }} • C++${{ matrix.std }} • x64" - container: "silkeh/clang:${{ matrix.clang }}" - - steps: - - uses: actions/checkout@v2 - - - name: Add wget and python3 - run: apt-get update && apt-get install -y python3-dev python3-numpy python3-pytest libeigen3-dev - - - name: Configure - shell: bash - run: > - cmake -S . -B build - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DCMAKE_CXX_STANDARD=${{ matrix.std }} - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Interface test - run: cmake --build build --target test_cmake_build - - - # Testing NVCC; forces sources to behave like .cu files - cuda: - runs-on: ubuntu-latest - name: "🐍 3.8 • CUDA 11 • Ubuntu 20.04" - container: nvidia/cuda:11.0-devel-ubuntu20.04 - - steps: - - uses: actions/checkout@v2 - - # tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND - - name: Install 🐍 3 - run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy - - - name: Configure - run: cmake -S . -B build -DPYBIND11_CUDA_TESTS=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON - - - name: Build - run: cmake --build build -j2 --verbose - - - name: Python tests - run: cmake --build build --target pytest - - -# TODO: Internal compiler error - report to NVidia -# # Testing CentOS 8 + PGI compilers -# centos-nvhpc8: -# runs-on: ubuntu-latest -# name: "🐍 3 • CentOS8 / PGI 20.11 • x64" -# container: centos:8 -# -# steps: -# - uses: actions/checkout@v2 -# -# - name: Add Python 3 and a few requirements -# run: yum update -y && yum install -y git python3-devel python3-numpy python3-pytest make environment-modules -# -# - name: Install CMake with pip -# run: | -# python3 -m pip install --upgrade pip -# python3 -m pip install cmake --prefer-binary -# -# - name: Install NVidia HPC SDK -# run: > -# yum -y install -# https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc-20-11-20.11-1.x86_64.rpm -# https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc-2020-20.11-1.x86_64.rpm -# -# - name: Configure -# shell: bash -# run: | -# source /etc/profile.d/modules.sh -# module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/20.11 -# cmake -S . -B build -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=14 -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") -# -# - name: Build -# run: cmake --build build -j 2 --verbose -# -# - name: Python tests -# run: cmake --build build --target pytest -# -# - name: C++ tests -# run: cmake --build build --target cpptest -# -# - name: Interface test -# run: cmake --build build --target test_cmake_build - - - # Testing on CentOS 7 + PGI compilers, which seems to require more workarounds - centos-nvhpc7: - runs-on: ubuntu-latest - name: "🐍 3 • CentOS7 / PGI 20.9 • x64" - container: centos:7 - - steps: - - uses: actions/checkout@v2 - - - name: Add Python 3 and a few requirements - run: yum update -y && yum install -y epel-release && yum install -y git python3-devel make environment-modules cmake3 - - - name: Install NVidia HPC SDK - run: yum -y install https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc-20-9-20.9-1.x86_64.rpm https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc-2020-20.9-1.x86_64.rpm - - # On CentOS 7, we have to filter a few tests (compiler internal error) - # and allow deeper template recursion (not needed on CentOS 8 with a newer - # standard library). On some systems, you many need further workarounds: - # https://github.com/pybind/pybind11/pull/2475 - - name: Configure - shell: bash - run: | - source /etc/profile.d/modules.sh - module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/20.9 - cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \ - -DCMAKE_CXX_STANDARD=11 \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \ - -DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \ - -DPYBIND11_TEST_FILTER="test_smart_ptr.cpp;test_virtual_functions.cpp" - - # Building before installing Pip should produce a warning but not an error - - name: Build - run: cmake3 --build build -j 2 --verbose - - - name: Install CMake with pip - run: | - python3 -m pip install --upgrade pip - python3 -m pip install pytest - - - name: Python tests - run: cmake3 --build build --target pytest - - - name: C++ tests - run: cmake3 --build build --target cpptest - - - name: Interface test - run: cmake3 --build build --target test_cmake_build - - - # Testing on GCC using the GCC docker images (only recent images supported) - gcc: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - gcc: - - 7 - - latest - std: - - 11 - include: - - gcc: 10 - std: 20 - - name: "🐍 3 • GCC ${{ matrix.gcc }} • C++${{ matrix.std }}• x64" - container: "gcc:${{ matrix.gcc }}" - - steps: - - uses: actions/checkout@v1 - - - name: Add Python 3 - run: apt-get update; apt-get install -y python3-dev python3-numpy python3-pytest python3-pip libeigen3-dev - - - name: Update pip - run: python3 -m pip install --upgrade pip - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Configure - shell: bash - run: > - cmake -S . -B build - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DCMAKE_CXX_STANDARD=${{ matrix.std }} - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Interface test - run: cmake --build build --target test_cmake_build - - - # Testing on ICC using the oneAPI apt repo - icc: - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - - name: "🐍 3 • ICC latest • x64" - - steps: - - uses: actions/checkout@v2 - - - name: Add apt repo - run: | - sudo apt-get update - sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg - wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB - sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB - echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - - - name: Add ICC & Python 3 - run: sudo apt-get update; sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic cmake python3-dev python3-numpy python3-pytest python3-pip - - - name: Update pip - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - python3 -m pip install --upgrade pip - - - name: Install dependencies - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - python3 -m pip install -r tests/requirements.txt - - - name: Configure C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake -S . -B build-11 \ - -DPYBIND11_WERROR=ON \ - -DDOWNLOAD_CATCH=ON \ - -DDOWNLOAD_EIGEN=OFF \ - -DCMAKE_CXX_STANDARD=11 \ - -DCMAKE_CXX_COMPILER=$(which icpc) \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-11 -j 2 -v - - - name: Python tests C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - sudo service apport stop - cmake --build build-11 --target check - - - name: C++ tests C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-11 --target cpptest - - - name: Interface test C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-11 --target test_cmake_build - - - name: Configure C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake -S . -B build-17 \ - -DPYBIND11_WERROR=ON \ - -DDOWNLOAD_CATCH=ON \ - -DDOWNLOAD_EIGEN=OFF \ - -DCMAKE_CXX_STANDARD=17 \ - -DCMAKE_CXX_COMPILER=$(which icpc) \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-17 -j 2 -v - - - name: Python tests C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - sudo service apport stop - cmake --build build-17 --target check - - - name: C++ tests C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-17 --target cpptest - - - name: Interface test C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-17 --target test_cmake_build - - - # Testing on CentOS (manylinux uses a centos base, and this is an easy way - # to get GCC 4.8, which is the manylinux1 compiler). - centos: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - centos: - - centos7 # GCC 4.8 - - stream8 - - name: "🐍 3 • CentOS ${{ matrix.centos }} • x64" - container: "quay.io/centos/centos:${{ matrix.centos }}" - - steps: - - uses: actions/checkout@v2 - - - name: Add Python 3 - run: yum update -y && yum install -y python3-devel gcc-c++ make git - - - name: Update pip - run: python3 -m pip install --upgrade pip - - - name: Install dependencies - run: | - python3 -m pip install cmake -r tests/requirements.txt - - - name: Configure - shell: bash - run: > - cmake -S . -B build - -DCMAKE_BUILD_TYPE=MinSizeRel - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=11 - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Interface test - run: cmake --build build --target test_cmake_build - - - # This tests an "install" with the CMake tools - install-classic: - name: "🐍 3.5 • Debian • x86 • Install" - runs-on: ubuntu-latest - container: i386/debian:stretch - - steps: - - uses: actions/checkout@v1 - - - name: Install requirements - run: | - apt-get update - apt-get install -y git make cmake g++ libeigen3-dev python3-dev python3-pip - pip3 install "pytest==3.1.*" - - - name: Configure for install - run: > - cmake . - -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0 - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Make and install - run: make install - - - name: Copy tests to new directory - run: cp -a tests /pybind11-tests - - - name: Make a new test directory - run: mkdir /build-tests - - - name: Configure tests - run: > - cmake ../pybind11-tests - -DDOWNLOAD_CATCH=ON - -DPYBIND11_WERROR=ON - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - working-directory: /build-tests - - - name: Python tests - run: make pytest -j 2 - working-directory: /build-tests - - - # This verifies that the documentation is not horribly broken, and does a - # basic sanity check on the SDist. - doxygen: - name: "Documentation build test" - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-python@v2 - - - name: Install Doxygen - run: sudo apt-get install -y doxygen librsvg2-bin # Changed to rsvg-convert in 20.04 - - - name: Build docs - run: pipx run nox -s docs - - - name: Make SDist - run: pipx run nox -s build -- --sdist - - - run: git status --ignored - - - name: Check local include dir - run: > - ls pybind11; - python3 -c "import pybind11, pathlib; assert (a := pybind11.get_include()) == (b := str(pathlib.Path('include').resolve())), f'{a} != {b}'" - - - name: Compare Dists (headers only) - working-directory: include - run: | - python3 -m pip install --user -U ../dist/*.tar.gz - installed=$(python3 -c "import pybind11; print(pybind11.get_include() + '/pybind11')") - diff -rq $installed ./pybind11 - - win32: - strategy: - fail-fast: false - matrix: - python: - - 3.5 - - 3.6 - - 3.7 - - 3.8 - - 3.9 - - pypy-3.6 - - include: - - python: 3.9 - args: -DCMAKE_CXX_STANDARD=20 -DDOWNLOAD_EIGEN=OFF - - python: 3.8 - args: -DCMAKE_CXX_STANDARD=17 - - name: "🐍 ${{ matrix.python }} • MSVC 2019 • x86 ${{ matrix.args }}" - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - - name: Setup Python ${{ matrix.python }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - architecture: x86 - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Prepare MSVC - uses: ilammy/msvc-dev-cmd@v1.10.0 - with: - arch: x86 - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - # First build - C++11 mode and inplace - - name: Configure ${{ matrix.args }} - run: > - cmake -S . -B build - -G "Visual Studio 16 2019" -A Win32 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - ${{ matrix.args }} - - name: Build C++11 - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build -t pytest - - win32-msvc2015: - name: "🐍 ${{ matrix.python }} • MSVC 2015 • x64" - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - python: - - 2.7 - - 3.6 - - 3.7 - # todo: check/cpptest does not support 3.8+ yet - - steps: - - uses: actions/checkout@v2 - - - name: Setup 🐍 ${{ matrix.python }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Prepare MSVC - uses: ilammy/msvc-dev-cmd@v1.10.0 - with: - toolset: 14.0 - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - # First build - C++11 mode and inplace - - name: Configure - run: > - cmake -S . -B build - -G "Visual Studio 14 2015" -A x64 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - - - name: Build C++14 - run: cmake --build build -j 2 - - - name: Run all checks - run: cmake --build build -t check - - - win32-msvc2017: - name: "🐍 ${{ matrix.python }} • MSVC 2017 • x64" - runs-on: windows-2016 - strategy: - fail-fast: false - matrix: - python: - - 2.7 - - 3.5 - - 3.7 - std: - - 14 - - include: - - python: 2.7 - std: 17 - args: > - -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR" - - python: 3.7 - std: 17 - args: > - -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR" - - steps: - - uses: actions/checkout@v2 - - - name: Setup 🐍 ${{ matrix.python }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - # First build - C++11 mode and inplace - - name: Configure - run: > - cmake -S . -B build - -G "Visual Studio 15 2017" -A x64 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=${{ matrix.std }} - ${{ matrix.args }} - - - name: Build ${{ matrix.std }} - run: cmake --build build -j 2 - - - name: Run all checks - run: cmake --build build -t check - - mingw: - name: "🐍 3 • windows-latest • ${{ matrix.sys }}" - runs-on: windows-latest - defaults: - run: - shell: msys2 {0} - strategy: - fail-fast: false - matrix: - include: - - { sys: mingw64, env: x86_64 } - - { sys: mingw32, env: i686 } - steps: - - uses: msys2/setup-msys2@v2 - with: - msystem: ${{matrix.sys}} - install: >- - git - mingw-w64-${{matrix.env}}-gcc - mingw-w64-${{matrix.env}}-python-pip - mingw-w64-${{matrix.env}}-python-numpy - mingw-w64-${{matrix.env}}-python-scipy - mingw-w64-${{matrix.env}}-cmake - mingw-w64-${{matrix.env}}-make - mingw-w64-${{matrix.env}}-python-pytest - mingw-w64-${{matrix.env}}-eigen3 - mingw-w64-${{matrix.env}}-boost - mingw-w64-${{matrix.env}}-catch - - - uses: actions/checkout@v2 - - - name: Configure C++11 - # LTO leads to many undefined reference like - # `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&) - run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -S . -B build - - - name: Build C++11 - run: cmake --build build -j 2 - - - name: Python tests C++11 - run: cmake --build build --target pytest -j 2 - - - name: C++11 tests - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target cpptest -j 2 - - - name: Interface test C++11 - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target test_cmake_build - - - name: Clean directory - run: git clean -fdx - - - name: Configure C++14 - run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -S . -B build2 - - - name: Build C++14 - run: cmake --build build2 -j 2 - - - name: Python tests C++14 - run: cmake --build build2 --target pytest -j 2 - - - name: C++14 tests - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target cpptest -j 2 - - - name: Interface test C++14 - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target test_cmake_build - - - name: Clean directory - run: git clean -fdx - - - name: Configure C++17 - run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -S . -B build3 - - - name: Build C++17 - run: cmake --build build3 -j 2 - - - name: Python tests C++17 - run: cmake --build build3 --target pytest -j 2 - - - name: C++17 tests - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target cpptest -j 2 - - - name: Interface test C++17 - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target test_cmake_build diff --git a/moveit_task_constructor/core/python/pybind11/.github/workflows/ci_sh_def.yml b/moveit_task_constructor/core/python/pybind11/.github/workflows/ci_sh_def.yml deleted file mode 100644 index 05cacc9..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/workflows/ci_sh_def.yml +++ /dev/null @@ -1,1002 +0,0 @@ -# PLEASE KEEP THIS GROUP OF FILES IN SYNC AT ALL TIMES: -# ci.yml -# ci_sh_def.yml -# ci_sh_def.yml.patch -# To import changes made to ci.yml *** ESPECIALLY AFTER `git merge master` ***: -# patch -i ci_sh_def.yml.patch -o ci_sh_def.yml -# To update the patch file after making changes to ci_sh.yml: -# diff -u ci.yml ci_sh_def.yml > ci_sh_def.yml.patch -# git commit -a -m 'Tracking ci.yml changes from master.' -# -# Thanks a lot to @rhaschke for PR #2930! - -name: "CI-SH-DEF" - -on: - workflow_dispatch: - pull_request: - push: - branches: - - master - - stable - - smart_holder - - v* - -concurrency: - group: test-sh-def-${{ github.ref }} - cancel-in-progress: true - -env: - PIP_ONLY_BINARY: numpy - -jobs: - # This is the "main" test suite, which tests a large number of different - # versions of default compilers and Python versions in GitHub Actions. - standard: - strategy: - fail-fast: false - matrix: - runs-on: [ubuntu-latest, windows-2022, macos-latest] - python: - - '2.7' - - '3.5' - - '3.6' - - '3.9' - - '3.10' - - 'pypy-3.7-v7.3.7' - - 'pypy-3.8-v7.3.7' - - # Items in here will either be added to the build matrix (if not - # present), or add new keys to an existing matrix element if all the - # existing keys match. - # - # We support an optional key: args, for cmake args - include: - # Just add a key - - runs-on: ubuntu-latest - python: '3.6' - args: > - -DPYBIND11_FINDPYTHON=ON - -DCMAKE_CXX_FLAGS="-D_=1" - - runs-on: windows-latest - python: '3.6' - args: > - -DPYBIND11_FINDPYTHON=ON - - runs-on: macos-latest - python: 'pypy-2.7' - # Inject a couple Windows 2019 runs - - runs-on: windows-2019 - python: '3.9' - - runs-on: windows-2019 - python: '2.7' - - name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}" - runs-on: ${{ matrix.runs-on }} - - steps: - - uses: actions/checkout@v2 - - - name: Setup Python ${{ matrix.python }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - - name: Setup Boost (Linux) - # Can't use boost + define _ - if: runner.os == 'Linux' && matrix.python != '3.6' - run: sudo apt-get install libboost-dev - - - name: Setup Boost (macOS) - if: runner.os == 'macOS' - run: brew install boost - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Cache wheels - if: runner.os == 'macOS' - uses: actions/cache@v2 - with: - # This path is specific to macOS - we really only need it for PyPy NumPy wheels - # See https://github.com/actions/cache/blob/master/examples.md#python---pip - # for ways to do this more generally - path: ~/Library/Caches/pip - # Look to see if there is a cache hit for the corresponding requirements file - key: ${{ runner.os }}-pip-${{ matrix.python }}-x64-${{ hashFiles('tests/requirements.txt') }} - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - - name: Setup annotations on Linux - if: runner.os == 'Linux' - run: python -m pip install pytest-github-actions-annotate-failures - - # First build - C++11 mode and inplace - - name: Configure C++11 ${{ matrix.args }} - run: > - cmake -S . -B . - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=11 - -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}" - ${{ matrix.args }} - - - name: Build C++11 - run: cmake --build . -j 2 - - - name: Python tests C++11 - run: cmake --build . --target pytest -j 2 - - - name: C++11 tests - # TODO: Figure out how to load the DLL on Python 3.8+ - if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9 || matrix.python == '3.10' || matrix.python == '3.11-dev' || matrix.python == 'pypy-3.8'))" - run: cmake --build . --target cpptest -j 2 - - - name: Interface test C++11 - run: cmake --build . --target test_cmake_build - - - name: Clean directory - run: git clean -fdx - - # Second build - C++17 mode and in a build directory - - name: Configure C++17 - run: > - cmake -S . -B build2 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}" - ${{ matrix.args }} - - - name: Build - run: cmake --build build2 -j 2 - - - name: Python tests - run: cmake --build build2 --target pytest - - - name: C++ tests - # TODO: Figure out how to load the DLL on Python 3.8+ - if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9 || matrix.python == '3.10' || matrix.python == '3.11-dev' || matrix.python == 'pypy-3.8'))" - run: cmake --build build2 --target cpptest - - # Third build - C++17 mode with unstable ABI - - name: Configure (unstable ABI) - run: > - cmake -S . -B build3 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}" - -DPYBIND11_INTERNALS_VERSION=10000000 - "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" - ${{ matrix.args }} - - - name: Build (unstable ABI) - run: cmake --build build3 -j 2 - - - name: Python tests (unstable ABI) - run: cmake --build build3 --target pytest - - - name: Interface test - run: cmake --build build2 --target test_cmake_build - - # Eventually Microsoft might have an action for setting up - # MSVC, but for now, this action works: - - name: Prepare compiler environment for Windows 🐍 2.7 - if: matrix.python == 2.7 && runner.os == 'Windows' - uses: ilammy/msvc-dev-cmd@v1.10.0 - with: - arch: x64 - - # This makes two environment variables available in the following step(s) - - name: Set Windows 🐍 2.7 environment variables - if: matrix.python == 2.7 && runner.os == 'Windows' - shell: bash - run: | - echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV - echo "MSSdk=1" >> $GITHUB_ENV - - # This makes sure the setup_helpers module can build packages using - # setuptools - - name: Setuptools helpers test - run: pytest tests/extra_setuptools - if: "!(matrix.python == '3.5' && matrix.runs-on == 'windows-2022')" - - - deadsnakes: - strategy: - fail-fast: false - matrix: - include: - # TODO: Fails on 3.10, investigate - - python-version: "3.9" - python-debug: true - valgrind: true - # - python-version: "3.11-dev" - # python-debug: false - - name: "🐍 ${{ matrix.python-version }}${{ matrix.python-debug && '-dbg' || '' }} (deadsnakes)${{ matrix.valgrind && ' • Valgrind' || '' }} • x64" - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Setup Python ${{ matrix.python-version }} (deadsnakes) - uses: deadsnakes/action@v2.1.1 - with: - python-version: ${{ matrix.python-version }} - debug: ${{ matrix.python-debug }} - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Valgrind cache - if: matrix.valgrind - uses: actions/cache@v2 - id: cache-valgrind - with: - path: valgrind - key: 3.16.1 # Valgrind version - - - name: Compile Valgrind - if: matrix.valgrind && steps.cache-valgrind.outputs.cache-hit != 'true' - run: | - VALGRIND_VERSION=3.16.1 - curl https://sourceware.org/pub/valgrind/valgrind-$VALGRIND_VERSION.tar.bz2 -o - | tar xj - mv valgrind-$VALGRIND_VERSION valgrind - cd valgrind - ./configure - make -j 2 > /dev/null - - - name: Install Valgrind - if: matrix.valgrind - working-directory: valgrind - run: | - sudo make install - sudo apt-get update - sudo apt-get install libc6-dbg # Needed by Valgrind - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - - name: Configure - env: - SETUPTOOLS_USE_DISTUTILS: stdlib - run: > - cmake -S . -B build - -DCMAKE_BUILD_TYPE=Debug - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - - - name: Build - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Run Valgrind on Python tests - if: matrix.valgrind - run: cmake --build build --target memcheck - - - # Testing on clang using the excellent silkeh clang docker images - clang: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - clang: - - 3.6 - - 3.7 - - 3.9 - - 7 - - 9 - - dev - std: - - 11 - include: - - clang: 5 - std: 14 - - clang: 10 - std: 20 - - clang: 10 - std: 17 - - name: "🐍 3 • Clang ${{ matrix.clang }} • C++${{ matrix.std }} • x64" - container: "silkeh/clang:${{ matrix.clang }}" - - steps: - - uses: actions/checkout@v2 - - - name: Add wget and python3 - run: apt-get update && apt-get install -y python3-dev python3-numpy python3-pytest libeigen3-dev - - - name: Configure - shell: bash - run: > - cmake -S . -B build - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DCMAKE_CXX_STANDARD=${{ matrix.std }} - -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Interface test - run: cmake --build build --target test_cmake_build - - - # Testing NVCC; forces sources to behave like .cu files - cuda: - runs-on: ubuntu-latest - name: "🐍 3.8 • CUDA 11 • Ubuntu 20.04" - container: nvidia/cuda:11.0-devel-ubuntu20.04 - - steps: - - uses: actions/checkout@v2 - - # tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND - - name: Install 🐍 3 - run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy - - - name: Configure - run: cmake -S . -B build -DPYBIND11_CUDA_TESTS=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - - - - name: Build - run: cmake --build build -j2 --verbose - - - name: Python tests - run: cmake --build build --target pytest - - -# TODO: Internal compiler error - report to NVidia -# # Testing CentOS 8 + PGI compilers -# centos-nvhpc8: -# runs-on: ubuntu-latest -# name: "🐍 3 • CentOS8 / PGI 20.11 • x64" -# container: centos:8 -# -# steps: -# - uses: actions/checkout@v2 -# -# - name: Add Python 3 and a few requirements -# run: yum update -y && yum install -y git python3-devel python3-numpy python3-pytest make environment-modules -# -# - name: Install CMake with pip -# run: | -# python3 -m pip install --upgrade pip -# python3 -m pip install cmake --prefer-binary -# -# - name: Install NVidia HPC SDK -# run: > -# yum -y install -# https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc-20-11-20.11-1.x86_64.rpm -# https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc-2020-20.11-1.x86_64.rpm -# -# - name: Configure -# shell: bash -# run: | -# source /etc/profile.d/modules.sh -# module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/20.11 -# cmake -S . -B build -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=14 -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") -# -# - name: Build -# run: cmake --build build -j 2 --verbose -# -# - name: Python tests -# run: cmake --build build --target pytest -# -# - name: C++ tests -# run: cmake --build build --target cpptest -# -# - name: Interface test -# run: cmake --build build --target test_cmake_build - - - # Testing on CentOS 7 + PGI compilers, which seems to require more workarounds - centos-nvhpc7: - runs-on: ubuntu-latest - name: "🐍 3 • CentOS7 / PGI 20.9 • x64" - container: centos:7 - - steps: - - uses: actions/checkout@v2 - - - name: Add Python 3 and a few requirements - run: yum update -y && yum install -y epel-release && yum install -y git python3-devel make environment-modules cmake3 - - - name: Install NVidia HPC SDK - run: yum -y install https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc-20-9-20.9-1.x86_64.rpm https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc-2020-20.9-1.x86_64.rpm - - # On CentOS 7, we have to filter a few tests (compiler internal error) - # and allow deeper template recursion (not needed on CentOS 8 with a newer - # standard library). On some systems, you many need further workarounds: - # https://github.com/pybind/pybind11/pull/2475 - - name: Configure - shell: bash - run: | - source /etc/profile.d/modules.sh - module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/20.9 - cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \ - -DCMAKE_CXX_STANDARD=11 \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \ - -DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0 -DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" \ - -DPYBIND11_TEST_FILTER="test_smart_ptr.cpp;test_virtual_functions.cpp" - - # Building before installing Pip should produce a warning but not an error - - name: Build - run: cmake3 --build build -j 2 --verbose - - - name: Install CMake with pip - run: | - python3 -m pip install --upgrade pip - python3 -m pip install pytest - - - name: Python tests - run: cmake3 --build build --target pytest - - - name: C++ tests - run: cmake3 --build build --target cpptest - - - name: Interface test - run: cmake3 --build build --target test_cmake_build - - - # Testing on GCC using the GCC docker images (only recent images supported) - gcc: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - gcc: - - 7 - - latest - std: - - 11 - include: - - gcc: 10 - std: 20 - - name: "🐍 3 • GCC ${{ matrix.gcc }} • C++${{ matrix.std }}• x64" - container: "gcc:${{ matrix.gcc }}" - - steps: - - uses: actions/checkout@v1 - - - name: Add Python 3 - run: apt-get update; apt-get install -y python3-dev python3-numpy python3-pytest python3-pip libeigen3-dev - - - name: Update pip - run: python3 -m pip install --upgrade pip - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Configure - shell: bash - run: > - cmake -S . -B build - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DCMAKE_CXX_STANDARD=${{ matrix.std }} - -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Interface test - run: cmake --build build --target test_cmake_build - - - # Testing on ICC using the oneAPI apt repo - icc: - runs-on: ubuntu-20.04 - strategy: - fail-fast: false - - name: "🐍 3 • ICC latest • x64" - - steps: - - uses: actions/checkout@v2 - - - name: Add apt repo - run: | - sudo apt-get update - sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg - wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB - sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB - echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list - - - name: Add ICC & Python 3 - run: sudo apt-get update; sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic cmake python3-dev python3-numpy python3-pytest python3-pip - - - name: Update pip - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - python3 -m pip install --upgrade pip - - - name: Install dependencies - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - python3 -m pip install -r tests/requirements.txt - - - name: Configure C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake -S . -B build-11 \ - -DPYBIND11_WERROR=ON \ - -DDOWNLOAD_CATCH=ON \ - -DDOWNLOAD_EIGEN=OFF \ - -DCMAKE_CXX_STANDARD=11 \ - -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" \ - -DCMAKE_CXX_COMPILER=$(which icpc) \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-11 -j 2 -v - - - name: Python tests C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - sudo service apport stop - cmake --build build-11 --target check - - - name: C++ tests C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-11 --target cpptest - - - name: Interface test C++11 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-11 --target test_cmake_build - - - name: Configure C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake -S . -B build-17 \ - -DPYBIND11_WERROR=ON \ - -DDOWNLOAD_CATCH=ON \ - -DDOWNLOAD_EIGEN=OFF \ - -DCMAKE_CXX_STANDARD=17 \ - -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" \ - -DCMAKE_CXX_COMPILER=$(which icpc) \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-17 -j 2 -v - - - name: Python tests C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - sudo service apport stop - cmake --build build-17 --target check - - - name: C++ tests C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-17 --target cpptest - - - name: Interface test C++17 - run: | - set +e; source /opt/intel/oneapi/setvars.sh; set -e - cmake --build build-17 --target test_cmake_build - - - # Testing on CentOS (manylinux uses a centos base, and this is an easy way - # to get GCC 4.8, which is the manylinux1 compiler). - centos: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - centos: - - 7 # GCC 4.8 - - 8 - - name: "🐍 3 • CentOS ${{ matrix.centos }} • x64" - container: "centos:${{ matrix.centos }}" - - steps: - - uses: actions/checkout@v2 - - - name: Add Python 3 - run: yum update -y && yum install -y python3-devel gcc-c++ make git - - - name: Update pip - run: python3 -m pip install --upgrade pip - - - name: Install dependencies - run: | - python3 -m pip install cmake -r tests/requirements.txt - - - name: VAR_BUILD_TYPE 7 - if: matrix.centos == 7 - run: echo MinSizeRel > VAR_BUILD_TYPE - - # Using Release to avoid segfault that appeared around 2021-06-04, - # apparently when the gcc version changed from 8.3 to 8.4. - - name: VAR_BUILD_TYPE 8 - if: matrix.centos == 8 - run: echo Release > VAR_BUILD_TYPE - - # Temporally disabling EIGEN due to SSL issue in CentOS 7 - - name: Configure - shell: bash - run: > - cmake -S . -B build - -DCMAKE_BUILD_TYPE=$(cat VAR_BUILD_TYPE) - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=11 - -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build --target pytest - - - name: C++ tests - run: cmake --build build --target cpptest - - - name: Interface test - run: cmake --build build --target test_cmake_build - - - # This tests an "install" with the CMake tools - install-classic: - name: "🐍 3.5 • Debian • x86 • Install" - runs-on: ubuntu-latest - container: i386/debian:stretch - - steps: - - uses: actions/checkout@v1 - - - name: Install requirements - run: | - apt-get update - apt-get install -y git make cmake g++ libeigen3-dev python3-dev python3-pip - pip3 install "pytest==3.1.*" - - - name: Configure for install - run: > - cmake . - -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0 - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Make and install - run: make install - - - name: Copy tests to new directory - run: cp -a tests /pybind11-tests - - - name: Make a new test directory - run: mkdir /build-tests - - - name: Configure tests - run: > - cmake ../pybind11-tests - -DDOWNLOAD_CATCH=ON - -DPYBIND11_WERROR=ON - -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - working-directory: /build-tests - - - name: Python tests - run: make pytest -j 2 - working-directory: /build-tests - - - # This verifies that the documentation is not horribly broken, and does a - # basic sanity check on the SDist. - doxygen: - name: "Documentation build test" - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-python@v2 - - - name: Install Doxygen - run: sudo apt-get install -y doxygen librsvg2-bin # Changed to rsvg-convert in 20.04 - - - name: Build docs - run: pipx run nox -s docs - - - name: Make SDist - run: pipx run nox -s build -- --sdist - - - run: git status --ignored - - - name: Check local include dir - run: > - ls pybind11; - python3 -c "import pybind11, pathlib; assert (a := pybind11.get_include()) == (b := str(pathlib.Path('include').resolve())), f'{a} != {b}'" - - - name: Compare Dists (headers only) - working-directory: include - run: | - python3 -m pip install --user -U ../dist/*.tar.gz - installed=$(python3 -c "import pybind11; print(pybind11.get_include() + '/pybind11')") - diff -rq $installed ./pybind11 - - win32: - strategy: - fail-fast: false - matrix: - python: - - 3.5 - - 3.6 - - 3.7 - - 3.8 - - 3.9 - - pypy-3.6 - - include: - - python: 3.9 - args: -DCMAKE_CXX_STANDARD=20 -DDOWNLOAD_EIGEN=OFF - - python: 3.8 - args: -DCMAKE_CXX_STANDARD=17 - - name: "🐍 ${{ matrix.python }} • MSVC 2019 • x86 ${{ matrix.args }}" - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - - name: Setup Python ${{ matrix.python }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - architecture: x86 - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Prepare MSVC - uses: ilammy/msvc-dev-cmd@v1.10.0 - with: - arch: x86 - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - # First build - C++11 mode and inplace - - name: Configure ${{ matrix.args }} - run: > - cmake -S . -B build - -G "Visual Studio 16 2019" -A Win32 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - ${{ matrix.args }} - - name: Build C++11 - run: cmake --build build -j 2 - - - name: Python tests - run: cmake --build build -t pytest - - win32-msvc2015: - name: "🐍 ${{ matrix.python }} • MSVC 2015 • x64" - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - python: - - 2.7 - - 3.6 - - 3.7 - # todo: check/cpptest does not support 3.8+ yet - - steps: - - uses: actions/checkout@v2 - - - name: Setup 🐍 ${{ matrix.python }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Prepare MSVC - uses: ilammy/msvc-dev-cmd@v1.10.0 - with: - toolset: 14.0 - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - # First build - C++11 mode and inplace - - name: Configure - run: > - cmake -S . -B build - -G "Visual Studio 14 2015" -A x64 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - - - name: Build C++14 - run: cmake --build build -j 2 - - - name: Run all checks - run: cmake --build build -t check - - - win32-msvc2017: - name: "🐍 ${{ matrix.python }} • MSVC 2017 • x64" - runs-on: windows-2016 - strategy: - fail-fast: false - matrix: - python: - - 2.7 - - 3.5 - - 3.7 - std: - - 14 - - include: - - python: 2.7 - std: 17 - args: > - -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - - python: 3.7 - std: 17 - args: > - -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - - steps: - - uses: actions/checkout@v2 - - - name: Setup 🐍 ${{ matrix.python }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python }} - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - # First build - C++11 mode and inplace - - name: Configure - run: > - cmake -S . -B build - -G "Visual Studio 15 2017" -A x64 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=${{ matrix.std }} - ${{ matrix.args }} - - - name: Build ${{ matrix.std }} - run: cmake --build build -j 2 - - - name: Run all checks - run: cmake --build build -t check - - mingw: - name: "🐍 3 • windows-latest • ${{ matrix.sys }}" - runs-on: windows-latest - defaults: - run: - shell: msys2 {0} - strategy: - fail-fast: false - matrix: - include: - - { sys: mingw64, env: x86_64 } - - { sys: mingw32, env: i686 } - steps: - - uses: msys2/setup-msys2@v2 - with: - msystem: ${{matrix.sys}} - install: >- - git - mingw-w64-${{matrix.env}}-gcc - mingw-w64-${{matrix.env}}-python-pip - mingw-w64-${{matrix.env}}-python-numpy - mingw-w64-${{matrix.env}}-python-scipy - mingw-w64-${{matrix.env}}-cmake - mingw-w64-${{matrix.env}}-make - mingw-w64-${{matrix.env}}-python-pytest - mingw-w64-${{matrix.env}}-eigen3 - mingw-w64-${{matrix.env}}-boost - mingw-w64-${{matrix.env}}-catch - - - uses: actions/checkout@v2 - - - name: Configure C++11 - # LTO leads to many undefined reference like - # `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&) - run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build - - - name: Build C++11 - run: cmake --build build -j 2 - - - name: Python tests C++11 - run: cmake --build build --target pytest -j 2 - - - name: C++11 tests - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target cpptest -j 2 - - - name: Interface test C++11 - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build --target test_cmake_build - - - name: Clean directory - run: git clean -fdx - - - name: Configure C++14 - run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build2 - - - name: Build C++14 - run: cmake --build build2 -j 2 - - - name: Python tests C++14 - run: cmake --build build2 --target pytest -j 2 - - - name: C++14 tests - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target cpptest -j 2 - - - name: Interface test C++14 - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build2 --target test_cmake_build - - - name: Clean directory - run: git clean -fdx - - - name: Configure C++17 - run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build3 - - - name: Build C++17 - run: cmake --build build3 -j 2 - - - name: Python tests C++17 - run: cmake --build build3 --target pytest -j 2 - - - name: C++17 tests - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target cpptest -j 2 - - - name: Interface test C++17 - run: PYTHONHOME=/${{matrix.sys}} PYTHONPATH=/${{matrix.sys}} cmake --build build3 --target test_cmake_build diff --git a/moveit_task_constructor/core/python/pybind11/.github/workflows/ci_sh_def.yml.patch b/moveit_task_constructor/core/python/pybind11/.github/workflows/ci_sh_def.yml.patch deleted file mode 100644 index 7d71f87..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/workflows/ci_sh_def.yml.patch +++ /dev/null @@ -1,185 +0,0 @@ ---- ci.yml 2022-01-26 09:58:21.687199720 -0800 -+++ ci_sh_def.yml 2022-01-26 09:58:52.261291935 -0800 -@@ -1,4 +1,16 @@ --name: CI -+# PLEASE KEEP THIS GROUP OF FILES IN SYNC AT ALL TIMES: -+# ci.yml -+# ci_sh_def.yml -+# ci_sh_def.yml.patch -+# To import changes made to ci.yml *** ESPECIALLY AFTER `git merge master` ***: -+# patch -i ci_sh_def.yml.patch -o ci_sh_def.yml -+# To update the patch file after making changes to ci_sh.yml: -+# diff -u ci.yml ci_sh_def.yml > ci_sh_def.yml.patch -+# git commit -a -m 'Tracking ci.yml changes from master.' -+# -+# Thanks a lot to @rhaschke for PR #2930! -+ -+name: "CI-SH-DEF" - - on: - workflow_dispatch: -@@ -11,7 +23,7 @@ - - v* - - concurrency: -- group: test-sh-avl${{ github.ref }} -+ group: test-sh-def-${{ github.ref }} - cancel-in-progress: true - - env: -@@ -108,6 +120,7 @@ - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=11 -+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}" - ${{ matrix.args }} - - - name: Build C++11 -@@ -135,6 +148,7 @@ - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 -+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}" - ${{ matrix.args }} - - - name: Build -@@ -156,6 +170,7 @@ - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 -+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}" - -DPYBIND11_INTERNALS_VERSION=10000000 - "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" - ${{ matrix.args }} -@@ -259,6 +274,7 @@ - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 -+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - - - name: Build - run: cmake --build build -j 2 -@@ -313,6 +329,7 @@ - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DCMAKE_CXX_STANDARD=${{ matrix.std }} -+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build -@@ -342,7 +359,8 @@ - run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy - - - name: Configure -- run: cmake -S . -B build -DPYBIND11_CUDA_TESTS=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -+ run: cmake -S . -B build -DPYBIND11_CUDA_TESTS=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -+ - - - name: Build - run: cmake --build build -j2 --verbose -@@ -422,7 +440,7 @@ - cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \ - -DCMAKE_CXX_STANDARD=11 \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \ -- -DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \ -+ -DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0 -DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" \ - -DPYBIND11_TEST_FILTER="test_smart_ptr.cpp;test_virtual_functions.cpp" - - # Building before installing Pip should produce a warning but not an error -@@ -481,6 +499,7 @@ - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DCMAKE_CXX_STANDARD=${{ matrix.std }} -+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build -@@ -536,6 +555,7 @@ - -DDOWNLOAD_CATCH=ON \ - -DDOWNLOAD_EIGEN=OFF \ - -DCMAKE_CXX_STANDARD=11 \ -+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" \ - -DCMAKE_CXX_COMPILER=$(which icpc) \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - -@@ -568,6 +588,7 @@ - -DDOWNLOAD_CATCH=ON \ - -DDOWNLOAD_EIGEN=OFF \ - -DCMAKE_CXX_STANDARD=17 \ -+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" \ - -DCMAKE_CXX_COMPILER=$(which icpc) \ - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - -@@ -640,6 +661,7 @@ - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=11 -+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - - - name: Build -@@ -690,6 +712,7 @@ - cmake ../pybind11-tests - -DDOWNLOAD_CATCH=ON - -DPYBIND11_WERROR=ON -+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") - working-directory: /build-tests - -@@ -782,6 +805,7 @@ - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON -+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - ${{ matrix.args }} - - name: Build C++11 - run: cmake --build build -j 2 -@@ -829,6 +853,7 @@ - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON -+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - - - name: Build C++14 - run: cmake --build build -j 2 -@@ -854,11 +879,11 @@ - - python: 2.7 - std: 17 - args: > -- -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR" -+ -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - - python: 3.7 - std: 17 - args: > -- -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR" -+ -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" - - steps: - - uses: actions/checkout@v2 -@@ -926,7 +951,7 @@ - - name: Configure C++11 - # LTO leads to many undefined reference like - # `pybind11::detail::function_call::function_call(pybind11::detail::function_call&&) -- run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -S . -B build -+ run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build - - - name: Build C++11 - run: cmake --build build -j 2 -@@ -944,7 +969,7 @@ - run: git clean -fdx - - - name: Configure C++14 -- run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -S . -B build2 -+ run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build2 - - - name: Build C++14 - run: cmake --build build2 -j 2 -@@ -962,7 +987,7 @@ - run: git clean -fdx - - - name: Configure C++17 -- run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -S . -B build3 -+ run: cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" -S . -B build3 - - - name: Build C++17 - run: cmake --build build3 -j 2 diff --git a/moveit_task_constructor/core/python/pybind11/.github/workflows/configure.yml b/moveit_task_constructor/core/python/pybind11/.github/workflows/configure.yml deleted file mode 100644 index 68733f1..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/workflows/configure.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: Config - -on: - workflow_dispatch: - pull_request: - push: - branches: - - master - - stable - - smart_holder - - v* - -jobs: - # This tests various versions of CMake in various combinations, to make sure - # the configure step passes. - cmake: - strategy: - fail-fast: false - matrix: - runs-on: [ubuntu-latest, macos-latest, windows-latest] - arch: [x64] - cmake: ["3.21"] - - include: - - runs-on: ubuntu-latest - arch: x64 - cmake: 3.4 - - - runs-on: macos-latest - arch: x64 - cmake: 3.7 - - - runs-on: windows-2016 - arch: x86 - cmake: 3.8 - - - runs-on: windows-2016 - arch: x86 - cmake: 3.18 - - name: 🐍 3.7 • CMake ${{ matrix.cmake }} • ${{ matrix.runs-on }} - runs-on: ${{ matrix.runs-on }} - - steps: - - uses: actions/checkout@v2 - - - name: Setup Python 3.7 - uses: actions/setup-python@v2 - with: - python-version: 3.7 - architecture: ${{ matrix.arch }} - - - name: Prepare env - run: python -m pip install -r tests/requirements.txt - - # An action for adding a specific version of CMake: - # https://github.com/jwlawson/actions-setup-cmake - - name: Setup CMake ${{ matrix.cmake }} - uses: jwlawson/actions-setup-cmake@v1.12 - with: - cmake-version: ${{ matrix.cmake }} - - # These steps use a directory with a space in it intentionally - - name: Make build directories - run: mkdir "build dir" - - - name: Configure - working-directory: build dir - shell: bash - run: > - cmake .. - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)") - - # Only build and test if this was manually triggered in the GitHub UI - - name: Build - working-directory: build dir - if: github.event_name == 'workflow_dispatch' - run: cmake --build . --config Release - - - name: Test - working-directory: build dir - if: github.event_name == 'workflow_dispatch' - run: cmake --build . --config Release --target check diff --git a/moveit_task_constructor/core/python/pybind11/.github/workflows/format.yml b/moveit_task_constructor/core/python/pybind11/.github/workflows/format.yml deleted file mode 100644 index 6c13b94..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/workflows/format.yml +++ /dev/null @@ -1,49 +0,0 @@ -# This is a format job. Pre-commit has a first-party GitHub action, so we use -# that: https://github.com/pre-commit/action - -name: Format - -on: - workflow_dispatch: - pull_request: - push: - branches: - - master - - stable - - smart_holder - - "v*" - -jobs: - pre-commit: - name: Format - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.3 - with: - # Slow hooks are marked with manual - slow is okay here, run them too - extra_args: --hook-stage manual --all-files - - clang-tidy: - # When making changes here, please also review the "Clang-Tidy" section - # in .github/CONTRIBUTING.md and update as needed. - name: Clang-Tidy - runs-on: ubuntu-latest - container: silkeh/clang:12 - steps: - - uses: actions/checkout@v2 - - - name: Install requirements - run: apt-get update && apt-get install -y python3-dev python3-pytest - - - name: Configure - run: > - cmake -S . -B build - -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy)" - -DDOWNLOAD_EIGEN=ON - -DDOWNLOAD_CATCH=ON - -DCMAKE_CXX_STANDARD=17 - - - name: Build - run: cmake --build build -j 2 -- --keep-going diff --git a/moveit_task_constructor/core/python/pybind11/.github/workflows/labeler.yml b/moveit_task_constructor/core/python/pybind11/.github/workflows/labeler.yml deleted file mode 100644 index d2b5979..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/workflows/labeler.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: Labeler -on: - pull_request_target: - types: [closed] - -jobs: - label: - name: Labeler - runs-on: ubuntu-latest - steps: - - - uses: actions/labeler@main - if: github.event.pull_request.merged == true - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - configuration-path: .github/labeler_merged.yml diff --git a/moveit_task_constructor/core/python/pybind11/.github/workflows/pip.yml b/moveit_task_constructor/core/python/pybind11/.github/workflows/pip.yml deleted file mode 100644 index 632d215..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/workflows/pip.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: Pip - -on: - workflow_dispatch: - pull_request: - push: - branches: - - master - - stable - - smart_holder - - v* - release: - types: - - published - -env: - PIP_ONLY_BINARY: numpy - -jobs: - # This builds the sdists and wheels and makes sure the files are exactly as - # expected. Using Windows and Python 2.7, since that is often the most - # challenging matrix element. - test-packaging: - name: 🐍 2.7 • 📦 tests • windows-latest - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - - name: Setup 🐍 2.7 - uses: actions/setup-python@v2 - with: - python-version: 2.7 - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - - name: Python Packaging tests - run: pytest tests/extra_python_package/ - - - # This runs the packaging tests and also builds and saves the packages as - # artifacts. - packaging: - name: 🐍 3.8 • 📦 & 📦 tests • ubuntu-latest - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: Setup 🐍 3.8 - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt build twine - - - name: Python Packaging tests - run: pytest tests/extra_python_package/ - - - name: Build SDist and wheels - run: | - python -m build - PYBIND11_GLOBAL_SDIST=1 python -m build - - - name: Check metadata - run: twine check dist/* - - - name: Save standard package - uses: actions/upload-artifact@v2 - with: - name: standard - path: dist/pybind11-* - - - name: Save global package - uses: actions/upload-artifact@v2 - with: - name: global - path: dist/pybind11_global-* - - - - # When a GitHub release is made, upload the artifacts to PyPI - upload: - name: Upload to PyPI - runs-on: ubuntu-latest - if: github.event_name == 'release' && github.event.action == 'published' - needs: [packaging] - - steps: - - uses: actions/setup-python@v2 - - # Downloads all to directories matching the artifact names - - uses: actions/download-artifact@v2 - - - name: Publish standard package - uses: pypa/gh-action-pypi-publish@v1.5.0 - with: - password: ${{ secrets.pypi_password }} - packages_dir: standard/ - - - name: Publish global package - uses: pypa/gh-action-pypi-publish@v1.5.0 - with: - password: ${{ secrets.pypi_password_global }} - packages_dir: global/ diff --git a/moveit_task_constructor/core/python/pybind11/.github/workflows/upstream.yml b/moveit_task_constructor/core/python/pybind11/.github/workflows/upstream.yml deleted file mode 100644 index 138c9ad..0000000 --- a/moveit_task_constructor/core/python/pybind11/.github/workflows/upstream.yml +++ /dev/null @@ -1,112 +0,0 @@ - -name: Upstream - -on: - workflow_dispatch: - pull_request: - -concurrency: - group: upstream-${{ github.ref }} - cancel-in-progress: true - -env: - PIP_ONLY_BINARY: numpy - -jobs: - standard: - name: "🐍 3.11 dev • ubuntu-latest • x64" - runs-on: ubuntu-latest - if: "contains(github.event.pull_request.labels.*.name, 'python dev')" - - steps: - - uses: actions/checkout@v2 - - - name: Setup Python 3.11 - uses: actions/setup-python@v2 - with: - python-version: "3.11-dev" - - - name: Setup Boost (Linux) - if: runner.os == 'Linux' - run: sudo apt-get install libboost-dev - - - name: Update CMake - uses: jwlawson/actions-setup-cmake@v1.12 - - - name: Prepare env - run: | - python -m pip install -r tests/requirements.txt - - - name: Setup annotations on Linux - if: runner.os == 'Linux' - run: python -m pip install pytest-github-actions-annotate-failures - - # First build - C++11 mode and inplace - - name: Configure C++11 - run: > - cmake -S . -B . - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=11 - - - name: Build C++11 - run: cmake --build . -j 2 - - - name: Python tests C++11 - run: cmake --build . --target pytest -j 2 - - - name: C++11 tests - run: cmake --build . --target cpptest -j 2 - - - name: Interface test C++11 - run: cmake --build . --target test_cmake_build - - - name: Clean directory - run: git clean -fdx - - # Second build - C++17 mode and in a build directory - - name: Configure C++17 - run: > - cmake -S . -B build2 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - ${{ matrix.args }} - ${{ matrix.args2 }} - - - name: Build - run: cmake --build build2 -j 2 - - - name: Python tests - run: cmake --build build2 --target pytest - - - name: C++ tests - run: cmake --build build2 --target cpptest - - # Third build - C++17 mode with unstable ABI - - name: Configure (unstable ABI) - run: > - cmake -S . -B build3 - -DPYBIND11_WERROR=ON - -DDOWNLOAD_CATCH=ON - -DDOWNLOAD_EIGEN=ON - -DCMAKE_CXX_STANDARD=17 - -DPYBIND11_INTERNALS_VERSION=10000000 - "-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp" - ${{ matrix.args }} - - - name: Build (unstable ABI) - run: cmake --build build3 -j 2 - - - name: Python tests (unstable ABI) - run: cmake --build build3 --target pytest - - - name: Interface test - run: cmake --build build2 --target test_cmake_build - - # This makes sure the setup_helpers module can build packages using - # setuptools - - name: Setuptools helpers test - run: pytest tests/extra_setuptools diff --git a/moveit_task_constructor/core/python/src/moveit/python_tools/__init__.py b/moveit_task_constructor/core/python/src/moveit/python_tools/__init__.py deleted file mode 100644 index c6b0846..0000000 --- a/moveit_task_constructor/core/python/src/moveit/python_tools/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from pymoveit_python_tools import * diff --git a/moveit_task_constructor/demo/CHANGELOG.rst b/moveit_task_constructor/demo/CHANGELOG.rst new file mode 100644 index 0000000..3442610 --- /dev/null +++ b/moveit_task_constructor/demo/CHANGELOG.rst @@ -0,0 +1,23 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package moveit_task_constructor_demo +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +0.1.2 (2023-02-24) +------------------ +* CartesianPath: Deprecate redundant property setters (`#429 `_) +* Contributors: Robert Haschke + +0.1.1 (2023-02-15) +------------------ +* Resort to MoveIt's python tools + * Provide ComputeIK.ik_frame as full PoseStamped +* Fixed build farm issues + * Fixed missing dependency declarations +* pick_place_task: monitor last state before Connect + ... to prune solutions as much as possible +* Contributors: Robert Haschke + +0.1.0 (2023-02-02) +------------------ +* Initial release +* Contributors: Michael Görner, Robert Haschke diff --git a/moveit_task_constructor/demo/config/panda_config.yaml b/moveit_task_constructor/demo/config/panda_config.yaml index ed28fae..090cc6d 100644 --- a/moveit_task_constructor/demo/config/panda_config.yaml +++ b/moveit_task_constructor/demo/config/panda_config.yaml @@ -6,10 +6,11 @@ arm_group_name: "panda_arm" eef_name: "hand" hand_group_name: "hand" hand_frame: "panda_link8" + # Poses hand_open_pose: "open" -hand_close_pose: "closed" -arm_home_pose: "home" +hand_close_pose: "close" +arm_home_pose: "ready" # Scene frames world_frame: "world" diff --git a/moveit_task_constructor/demo/include/moveit_task_constructor_demo/pick_place_task.h b/moveit_task_constructor/demo/include/moveit_task_constructor_demo/pick_place_task.h index 5301fb6..41e9f92 100644 --- a/moveit_task_constructor/demo/include/moveit_task_constructor_demo/pick_place_task.h +++ b/moveit_task_constructor/demo/include/moveit_task_constructor_demo/pick_place_task.h @@ -58,8 +58,6 @@ #include #include -#include - #pragma once namespace moveit_task_constructor_demo { diff --git a/moveit_task_constructor/demo/scripts/alternatives.py b/moveit_task_constructor/demo/scripts/alternatives.py index e32367a..7bdfa20 100755 --- a/moveit_task_constructor/demo/scripts/alternatives.py +++ b/moveit_task_constructor/demo/scripts/alternatives.py @@ -2,10 +2,10 @@ # -*- coding: utf-8 -*- from moveit.task_constructor import core, stages -from moveit.python_tools import roscpp_init +from moveit_commander.roscpp_initializer import roscpp_initialize import time -roscpp_init("mtc_tutorial_alternatives") +roscpp_initialize("mtc_tutorial_alternatives") # Use the joint interpolation planner jointPlanner = core.JointInterpolationPlanner() diff --git a/moveit_task_constructor/demo/scripts/cartesian.py b/moveit_task_constructor/demo/scripts/cartesian.py index f54c524..bd304de 100755 --- a/moveit_task_constructor/demo/scripts/cartesian.py +++ b/moveit_task_constructor/demo/scripts/cartesian.py @@ -7,9 +7,9 @@ from math import pi import time -from moveit.python_tools import roscpp_init +from moveit_commander.roscpp_initializer import roscpp_initialize -roscpp_init("mtc_tutorial") +roscpp_initialize("mtc_tutorial") # [cartesianTut1] group = "panda_arm" diff --git a/moveit_task_constructor/demo/scripts/compute_ik.py b/moveit_task_constructor/demo/scripts/compute_ik.py index 0a8b6e8..e910991 100755 --- a/moveit_task_constructor/demo/scripts/compute_ik.py +++ b/moveit_task_constructor/demo/scripts/compute_ik.py @@ -6,9 +6,9 @@ from std_msgs.msg import Header import time -from moveit.python_tools import roscpp_init +from moveit_commander.roscpp_initializer import roscpp_initialize -roscpp_init("mtc_tutorial_compute_ik") +roscpp_initialize("mtc_tutorial_compute_ik") # Specify the planning group group = "panda_arm" @@ -40,7 +40,8 @@ # Wrap Cartesian generator into a ComputeIK stage to yield a joint pose computeIK = stages.ComputeIK("compute IK", generator) computeIK.group = group # Use the group-specific IK solver -computeIK.ik_frame = "panda_link8" # Which end-effector frame should reach the target? +# Which end-effector frame should reach the target? +computeIK.ik_frame = PoseStamped(header=Header(frame_id="panda_link8")) computeIK.max_ik_solutions = 4 # Limit the number of IK solutions # [propertyTut14] props = computeIK.properties diff --git a/moveit_task_constructor/demo/scripts/generate_pose.py b/moveit_task_constructor/demo/scripts/generate_pose.py index 2ada95f..ce8aa70 100755 --- a/moveit_task_constructor/demo/scripts/generate_pose.py +++ b/moveit_task_constructor/demo/scripts/generate_pose.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /usr/bin/env python # -*- coding: utf-8 -*- from moveit.task_constructor import core, stages @@ -9,7 +9,7 @@ roscpp_initialize("mtc_tutorial_compute_ik") # Specify the planning group -group = "air" +group = "panda_arm" # Create a task task = core.Task() @@ -33,7 +33,7 @@ # create an example pose wrt. the origin of the # panda arm link8 pose = PoseStamped() -pose.header.frame_id = "qbhand_base_link" +pose.header.frame_id = "panda_link8" # Calculate the inverse kinematics for the current robot state generatePose = stages.GeneratePose("generate pose") diff --git a/moveit_task_constructor/demo/scripts/merger.py b/moveit_task_constructor/demo/scripts/merger.py index f9a2bb0..f2d2613 100755 --- a/moveit_task_constructor/demo/scripts/merger.py +++ b/moveit_task_constructor/demo/scripts/merger.py @@ -2,10 +2,10 @@ # -*- coding: utf-8 -*- from moveit.task_constructor import core, stages -from moveit.python_tools import roscpp_init +from moveit_commander.roscpp_initializer import roscpp_initialize import time -roscpp_init("mtc_tutorial_merger") +roscpp_initialize("mtc_tutorial_merger") # use the joint interpolation planner planner = core.JointInterpolationPlanner() diff --git a/moveit_task_constructor/demo/scripts/modify_planning_scene.py b/moveit_task_constructor/demo/scripts/modify_planning_scene.py index 930ee1b..ef5385d 100755 --- a/moveit_task_constructor/demo/scripts/modify_planning_scene.py +++ b/moveit_task_constructor/demo/scripts/modify_planning_scene.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /usr/bin/env python # -*- coding: utf-8 -*- from moveit.task_constructor import core, stages diff --git a/moveit_task_constructor/demo/scripts/pickplace.py b/moveit_task_constructor/demo/scripts/pickplace.py index 5318a29..e71af60 100755 --- a/moveit_task_constructor/demo/scripts/pickplace.py +++ b/moveit_task_constructor/demo/scripts/pickplace.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python3 +#! /usr/bin/env python # -*- coding: utf-8 -*- from moveit_commander.roscpp_initializer import roscpp_initialize @@ -6,14 +6,13 @@ from moveit_commander import PlanningSceneInterface from geometry_msgs.msg import PoseStamped, TwistStamped import time -import rospy roscpp_initialize("pickplace") -rospy.loginfo("Z(); - cartesian_planner->setMaxVelocityScaling(1.0); - cartesian_planner->setMaxAccelerationScaling(1.0); + cartesian_planner->setMaxVelocityScalingFactor(1.0); + cartesian_planner->setMaxAccelerationScalingFactor(1.0); cartesian_planner->setStepSize(.01); // Set task properties @@ -179,7 +179,6 @@ bool PickPlaceTask::init() { * Current State * * * ***************************************************/ - Stage* current_state_ptr = nullptr; // Forward current_state on to grasp pose generator { auto current_state = std::make_unique("current state"); @@ -193,8 +192,6 @@ bool PickPlaceTask::init() { } return true; }); - - current_state_ptr = applicability_filter.get(); t.add(std::move(applicability_filter)); } @@ -203,10 +200,12 @@ bool PickPlaceTask::init() { * Open Hand * * * ***************************************************/ + Stage* initial_state_ptr = nullptr; { // Open Hand auto stage = std::make_unique("open hand", sampling_planner); stage->setGroup(hand_group_name_); stage->setGoal(hand_open_pose_); + initial_state_ptr = stage.get(); // remember start state for monitoring grasp pose generator t.add(std::move(stage)); } @@ -228,7 +227,7 @@ bool PickPlaceTask::init() { * Pick Object * * * ***************************************************/ - Stage* attach_object_stage = nullptr; // Forward attach_object_stage to place pose generator + Stage* pick_stage_ptr = nullptr; { auto grasp = std::make_unique("pick object"); t.properties().exposeTo(grasp->properties(), { "eef", "hand", "group", "ik_frame" }); @@ -263,7 +262,7 @@ bool PickPlaceTask::init() { stage->setPreGraspPose(hand_open_pose_); stage->setObject(object); stage->setAngleDelta(M_PI / 12); - stage->setMonitoredStage(current_state_ptr); // Hook into current state + stage->setMonitoredStage(initial_state_ptr); // hook into successful initial-phase solutions // Compute IK auto wrapper = std::make_unique("grasp pose IK", std::move(stage)); @@ -302,7 +301,6 @@ bool PickPlaceTask::init() { { auto stage = std::make_unique("attach object"); stage->attachObject(object, hand_frame_); - attach_object_stage = stage.get(); grasp->insert(std::move(stage)); } @@ -337,11 +335,13 @@ bool PickPlaceTask::init() { .... * Forbid collision (object support) * ***************************************************/ { - auto stage = std::make_unique("forbid collision (object,surface)"); + auto stage = std::make_unique("forbid collision (object,support)"); stage->allowCollisions({ object }, support_surfaces_, false); grasp->insert(std::move(stage)); } + pick_stage_ptr = grasp.get(); // remember for monitoring place pose generator + // Add grasp container to task t.add(std::move(grasp)); } @@ -403,7 +403,7 @@ bool PickPlaceTask::init() { p.pose = place_pose_; p.pose.position.z += 0.5 * object_dimensions_[0] + place_surface_offset_; stage->setPose(p); - stage->setMonitoredStage(attach_object_stage); // Hook into attach_object_stage + stage->setMonitoredStage(pick_stage_ptr); // hook into successful pick solutions // Compute IK auto wrapper = std::make_unique("place pose IK", std::move(stage)); diff --git a/moveit_task_constructor/msgs/CHANGELOG.rst b/moveit_task_constructor/msgs/CHANGELOG.rst new file mode 100644 index 0000000..fb883eb --- /dev/null +++ b/moveit_task_constructor/msgs/CHANGELOG.rst @@ -0,0 +1,14 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package moveit_task_constructor_msgs +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +0.1.2 (2023-02-24) +------------------ + +0.1.1 (2023-02-15) +------------------ + +0.1.0 (2023-02-02) +------------------ +* Initial release +* Contributors: Michael Görner, Robert Haschke diff --git a/moveit_task_constructor/msgs/package.xml b/moveit_task_constructor/msgs/package.xml index f0bf4ec..fd20053 100644 --- a/moveit_task_constructor/msgs/package.xml +++ b/moveit_task_constructor/msgs/package.xml @@ -1,6 +1,6 @@ moveit_task_constructor_msgs - 0.0.0 + 0.1.2 Messages for MoveIt Task Pipeline BSD