Skip to content

Commit

Permalink
Fix Windows and Mac OS Github Actions (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnwason authored Jul 29, 2024
1 parent b45af24 commit b321b52
Show file tree
Hide file tree
Showing 26 changed files with 118 additions and 37 deletions.
34 changes: 23 additions & 11 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

env:
VCPKG_PKGS: >-
boost-dll boost-program-options
boost-dll boost-program-options boost-stacktrace
boost-serialization boost-filesystem boost-format
tinyxml2 console-bridge assimp
urdfdom octomap orocos-kdl pcl
Expand All @@ -31,7 +31,19 @@ env:
jobs:
build-macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
config:
- runner: macos-12
vcpkg_triplet: x64-osx-dynamic-release
arch: x64
homebrew_root: /usr/local
- runner: macos-14
vcpkg_triplet: arm64-osx-dynamic-release
arch: arm64
homebrew_root: /opt/homebrew
runs-on: ${{ matrix.config.runner }}
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -48,10 +60,10 @@ jobs:
with:
pkgs: >-
${{ env.VCPKG_PKGS }}
triplet: x64-osx-dynamic-release
triplet: ${{ matrix.config.vcpkg_triplet }}
extra-args: --clean-after-build --overlay-triplets=${{ github.workspace }}/ws/src/tesseract_planning/.github/workflows/vcpkg_triplets
token: ${{ github.token }}
cache-key: osx-x64-vcpkg
cache-key: osx-${{ matrix.config.arch }}-vcpkg
revision: master
github-binarycache: true
- name: pip3
Expand All @@ -63,8 +75,8 @@ jobs:
- name: colcon build
working-directory: ws
run: |
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/vcpkg/installed/x64-osx-dynamic-release/lib
export CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/vcpkg/installed/x64-osx-dynamic-release
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/vcpkg/installed/${{ matrix.config.vcpkg_triplet }}/lib
export CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/vcpkg/installed/${{ matrix.config.vcpkg_triplet }}
colcon build --merge-install \
--packages-ignore tesseract_examples trajopt_ifopt trajopt_sqp ifopt vhacd tesseract_python \
Expand All @@ -75,17 +87,17 @@ jobs:
-DBUILD_SHARED_LIBS=ON -DTESSERACT_ENABLE_EXAMPLES=OFF -DTESSERACT_BUILD_TRAJOPT_IFOPT=OFF \
-DVCPKG_APPLOCAL_DEPS=OFF -DTESSERACT_ENABLE_TESTING=ON \
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \
-DOpenMP_CXX_INCLUDE_DIR=/usr/local/opt/libomp/include \
-DOpenMP_C_INCLUDE_DIR=/usr/local/opt/libomp/include \
-DOpenMP_CXX_INCLUDE_DIR=${{ matrix.config.homebrew_root }}/opt/libomp/include \
-DOpenMP_C_INCLUDE_DIR=${{ matrix.config.homebrew_root }}/opt/libomp/include \
-DOpenMP_CXX_LIB_NAMES=libomp -DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp" \
-DOpenMP_C_LIB_NAMES=libomp -DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp" \
-DOpenMP_libomp_LIBRARY=/usr/local/opt/libomp/lib/libomp.dylib \
-DOpenMP_libomp_LIBRARY=${{ matrix.config.homebrew_root }}/opt/libomp/lib/libomp.dylib
-Dtcmalloc_minimal_LIBRARY=${{ github.workspace }}/vcpkg/installed/x64-osx-dynamic-release/lib/libtcmalloc_minimal.dylib
- name: colcon test
working-directory: ws
run: |
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/vcpkg/installed/x64-osx-dynamic-release/lib
export CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/vcpkg/installed/x64-osx-dynamic-release
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/vcpkg/installed/${{ matrix.config.vcpkg_triplet }}/lib
export CMAKE_PREFIX_PATH=$GITHUB_WORKSPACE/vcpkg/installed/${{ matrix.config.vcpkg_triplet }}
colcon test --merge-install \
--packages-ignore tesseract_examples trajopt_ifopt trajopt_sqp ifopt vhacd tesseract_python \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE arm64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES arm64)

set(VCPKG_BUILD_TYPE release)
set(VCPKG_OSX_DEPLOYMENT_TARGET 14.0)
7 changes: 4 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
pkgs: >-
fcl bullet3[multithreading,double-precision,rtti] octomap
console-bridge eigen3 yaml-cpp benchmark tinyxml2 assimp orocos-kdl pcl
lapack-reference boost-dll boost-filesystem boost-serialization boost-format
lapack-reference boost-dll boost-filesystem boost-serialization boost-format boost-stacktrace
boost-program-options boost-graph urdfdom ccd[double-precision] gtest
ompl taskflow jsoncpp flann benchmark
triplet: x64-windows-release
Expand All @@ -57,6 +57,7 @@ jobs:
with:
ccache-prefix: ${{ matrix.distro }}
vcs-file: .github/workflows/windows_dependencies.repos
upstream-args: --cmake-args -G "Ninja" -DVCPKG_TARGET_TRIPLET=x64-windows-release -DCMAKE_BUILD_TYPE=Release -DBUILD_IPOPT=OFF -DBUILD_SNOPT=OFF
upstream-args: --cmake-args -G "Ninja" -DVCPKG_TARGET_TRIPLET=x64-windows-release -DCMAKE_BUILD_TYPE=Release -DBUILD_IPOPT=OFF -DBUILD_SNOPT=OFF -DTESSERACT_BUILD_TRAJOPT_IFOPT=OFF -DVCPKG_APPLOCAL_DEPS=OFF
target-path: target_ws/src
target-args: --cmake-args -G "Ninja" -DVCPKG_TARGET_TRIPLET=x64-windows-release -DCMAKE_BUILD_TYPE=Release -DTESSERACT_ENABLE_TESTING=ON
target-args: --packages-ignore tesseract_examples --cmake-args -G "Ninja" -DVCPKG_TARGET_TRIPLET=x64-windows-release -DCMAKE_BUILD_TYPE=Release -DTESSERACT_ENABLE_TESTING=ON -DTESSERACT_BUILD_TRAJOPT_IFOPT=OFF -DVCPKG_APPLOCAL_DEPS=OFF
run-tests-args: --packages-ignore tesseract_examples
15 changes: 13 additions & 2 deletions tesseract_task_composer/core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Need to create export header so static class variables can be exported on windows build
include(GenerateExportHeader)

add_library(
${PROJECT_NAME}
src/task_composer_data_storage.cpp
Expand All @@ -13,6 +16,7 @@ add_library(
src/task_composer_plugin_factory.cpp
src/task_composer_server.cpp
src/task_composer_task.cpp)

target_link_libraries(
${PROJECT_NAME}
PUBLIC console_bridge::console_bridge
Expand All @@ -35,8 +39,9 @@ target_code_coverage(
ALL
EXCLUDE ${COVERAGE_EXCLUDE}
ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
target_include_directories(${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")
target_include_directories(
${PROJECT_NAME} PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/../>" "$<INSTALL_INTERFACE:include>")

add_library(
${PROJECT_NAME}_nodes
Expand All @@ -47,6 +52,9 @@ add_library(
src/nodes/start_task.cpp
src/nodes/sync_task.cpp
src/test_suite/test_task.cpp)

generate_export_header(${PROJECT_NAME}_nodes)

target_link_libraries(
${PROJECT_NAME}_nodes
PUBLIC ${PROJECT_NAME}
Expand Down Expand Up @@ -97,6 +105,9 @@ install(
PATTERN "*.h"
PATTERN "*.hpp")

install(FILES ${PROJECT_BINARY_DIR}/core/tesseract_task_composer_nodes_export.h
DESTINATION include/${PROJECT_NAME}/core/ COMPONENT core)

# Plugin should not be export only installed
install(
TARGETS ${PROJECT_NAME}_factories
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>
#include <tesseract_task_composer/core/tesseract_task_composer_nodes_export.h>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/core/task_composer_task.h>

namespace tesseract_planning
{
class TaskComposerPluginFactory;
class HasDataStorageEntryTask : public TaskComposerTask
class TESSERACT_TASK_COMPOSER_NODES_EXPORT HasDataStorageEntryTask : public TaskComposerTask
{
public:
// Requried
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/core/task_composer_keys.h>
#include <tesseract_task_composer/core/task_composer_node_ports.h>
#include <tesseract_task_composer/core/task_composer_node_info.h>

namespace YAML
{
Expand All @@ -48,7 +49,6 @@ class Node;

namespace tesseract_planning
{
class TaskComposerNodeInfo;
class TaskComposerDataStorage;

enum class TaskComposerNodeType
Expand Down
10 changes: 9 additions & 1 deletion tesseract_task_composer/planning/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Need to create export header so static class variables can be exported on windows build
include(GenerateExportHeader)

find_package(tesseract_command_language REQUIRED)
find_package(
tesseract_motion_planners REQUIRED
Expand Down Expand Up @@ -138,7 +141,9 @@ target_code_coverage(
ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
target_include_directories(
${PROJECT_NAME}_planning_nodes PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")
"$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/../>" "$<INSTALL_INTERFACE:include>")

generate_export_header(${PROJECT_NAME}_planning_nodes)

# Create factories target
add_library(${PROJECT_NAME}_planning_factories ${FACTORIES_SOURCE_FILES})
Expand Down Expand Up @@ -171,6 +176,9 @@ install(
PATTERN "*.hpp"
PATTERN ".svn" EXCLUDE)

install(FILES ${PROJECT_BINARY_DIR}/planning/tesseract_task_composer_planning_nodes_export.h
DESTINATION include/${PROJECT_NAME}/planning/ COMPONENT planning)

# Plugin should not be export only installed
install(
TARGETS ${PROJECT_NAME}_planning_factories
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <vector>
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>
#include <tesseract_task_composer/planning/tesseract_task_composer_planning_nodes_export.h>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/core/task_composer_task.h>
Expand All @@ -41,7 +42,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
namespace tesseract_planning
{
class TaskComposerPluginFactory;
class ContinuousContactCheckTask : public TaskComposerTask
class TESSERACT_TASK_COMPOSER_PLANNING_NODES_EXPORT ContinuousContactCheckTask : public TaskComposerTask
{
public:
// Requried
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <vector>
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>
#include <tesseract_task_composer/planning/tesseract_task_composer_planning_nodes_export.h>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/core/task_composer_task.h>
Expand All @@ -41,7 +42,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
namespace tesseract_planning
{
class TaskComposerPluginFactory;
class DiscreteContactCheckTask : public TaskComposerTask
class TESSERACT_TASK_COMPOSER_PLANNING_NODES_EXPORT DiscreteContactCheckTask : public TaskComposerTask
{
public:
// Requried
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>
#include <tesseract_task_composer/planning/tesseract_task_composer_planning_nodes_export.h>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/core/task_composer_task.h>
Expand All @@ -42,7 +43,7 @@ class TaskComposerPluginFactory;
* @brief This task modifies the input instructions in order to push waypoints that are outside of their
* limits back within them.
*/
class FixStateBoundsTask : public TaskComposerTask
class TESSERACT_TASK_COMPOSER_PLANNING_NODES_EXPORT FixStateBoundsTask : public TaskComposerTask
{
public:
// Requried
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>
#include <tesseract_task_composer/planning/tesseract_task_composer_planning_nodes_export.h>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/core/task_composer_task.h>
Expand All @@ -50,7 +51,7 @@ struct FixStateCollisionProfile;
*
* First it uses TrajOpt to correct the waypoint. If that fails, it reverts to random sampling
*/
class FixStateCollisionTask : public TaskComposerTask
class TESSERACT_TASK_COMPOSER_PLANNING_NODES_EXPORT FixStateCollisionTask : public TaskComposerTask
{
public:
// Requried
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>
#include <tesseract_task_composer/planning/tesseract_task_composer_planning_nodes_export.h>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/core/task_composer_task.h>
Expand All @@ -51,7 +52,7 @@ class TaskComposerPluginFactory;
* input_keys[0]: The original input to motion planning
* input_keys[1]: The output of the first motion plan which failed collision checking
*/
class FormatAsInputTask : public TaskComposerTask
class TESSERACT_TASK_COMPOSER_PLANNING_NODES_EXPORT FormatAsInputTask : public TaskComposerTask
{
public:
// Requried
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>
#include <tesseract_task_composer/planning/tesseract_task_composer_planning_nodes_export.h>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/core/task_composer_task.h>

namespace tesseract_planning
{
class TaskComposerPluginFactory;
class FormatAsResultTask : public TaskComposerTask
class TESSERACT_TASK_COMPOSER_PLANNING_NODES_EXPORT FormatAsResultTask : public TaskComposerTask
{
public:
// Requried
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>
#include <tesseract_task_composer/planning/tesseract_task_composer_planning_nodes_export.h>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/core/task_composer_task.h>
Expand All @@ -39,7 +40,7 @@ TESSERACT_COMMON_IGNORE_WARNINGS_POP
namespace tesseract_planning
{
class TaskComposerPluginFactory;
class IterativeSplineParameterizationTask : public TaskComposerTask
class TESSERACT_TASK_COMPOSER_PLANNING_NODES_EXPORT IterativeSplineParameterizationTask : public TaskComposerTask
{
public:
// Requried
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>
#include <tesseract_task_composer/planning/tesseract_task_composer_planning_nodes_export.h>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/core/task_composer_task.h>

namespace tesseract_planning
{
class TaskComposerPluginFactory;
class MinLengthTask : public TaskComposerTask
class TESSERACT_TASK_COMPOSER_PLANNING_NODES_EXPORT MinLengthTask : public TaskComposerTask
{
public:
// Requried
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>
#include <tesseract_task_composer/planning/tesseract_task_composer_planning_nodes_export.h>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/core/task_composer_task.h>

namespace tesseract_planning
{
class TaskComposerPluginFactory;
class ProcessPlanningInputTask : public TaskComposerTask
class TESSERACT_TASK_COMPOSER_PLANNING_NODES_EXPORT ProcessPlanningInputTask : public TaskComposerTask
{
public:
// Requried
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#include <boost/serialization/access.hpp>
#include <boost/serialization/export.hpp>
#include <tesseract_task_composer/planning/tesseract_task_composer_planning_nodes_export.h>
TESSERACT_COMMON_IGNORE_WARNINGS_POP

#include <tesseract_task_composer/core/task_composer_task.h>
Expand All @@ -39,7 +40,7 @@ class TaskComposerPluginFactory;
* @brief This task simply returns a value specified in the composite profile. This can be used to switch execution
* based on the profile
*/
class ProfileSwitchTask : public TaskComposerTask
class TESSERACT_TASK_COMPOSER_PLANNING_NODES_EXPORT ProfileSwitchTask : public TaskComposerTask
{
public:
// Requried
Expand Down
Loading

0 comments on commit b321b52

Please sign in to comment.