Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Mac OSX support #428

Merged
merged 7 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Mac OSX

on:
push:
branches:
- master
- 'dev**'
pull_request:
paths:
- 'tesseract**'
- '.github/workflows/mac.yml'
- '**.repos'
schedule:
- cron: '0 5 * * *'
release:
types:
- released

env:
VCPKG_PKGS: >-
boost-dll boost-program-options
boost-serialization boost-filesystem
tinyxml2 console-bridge assimp
urdfdom octomap orocos-kdl pcl
gtest benchmark flann jsoncpp
yaml-cpp eigen3
openblas
fcl ompl taskflow
bullet3[multithreading,double-precision,rtti]
ccd[double-precision] gperftools

jobs:
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
path: ws/src/tesseract_planning
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: '3.12'
- name: brew
run: |
brew install libomp cmake automake autoconf libtool gcc ninja
- name: vcpkg build
uses: johnwason/vcpkg-action@v5
with:
pkgs: >-
${{ env.VCPKG_PKGS }}
triplet: x64-osx-dynamic-release
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
revision: master
- name: pip3
run: |
python3 -m pip install numpy setuptools wheel pytest delvewheel colcon-common-extensions vcstool
- name: vcs import
working-directory: ws/src
run: vcs import --input tesseract_planning/.github/workflows/windows_dependencies.repos
- 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

colcon build --merge-install \
--packages-ignore tesseract_examples trajopt_ifopt trajopt_sqp ifopt vhacd tesseract_python \
--event-handlers console_cohesion+ \
--cmake-force-configure \
--cmake-args -GNinja -DCMAKE_BUILD_TYPE=Release \
-DINSTALL_OMPL=OFF -DINSTALL_OMPL_TAG=master -DBUILD_IPOPT=OFF -DBUILD_SNOPT=OFF \
-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_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 \
-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

colcon test --merge-install \
--packages-ignore tesseract_examples trajopt_ifopt trajopt_sqp ifopt vhacd tesseract_python \
--event-handlers console_cohesion+

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE dynamic)
set(VCPKG_LIBRARY_LINKAGE dynamic)

set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)

set(VCPKG_BUILD_TYPE release)
set(VCPKG_OSX_DEPLOYMENT_TARGET 12.0)
4 changes: 2 additions & 2 deletions tesseract_command_language/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ endif()
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

initialize_code_coverage()
initialize_code_coverage(ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
set(COVERAGE_EXCLUDE
/usr/*
/opt/*
${CMAKE_CURRENT_LIST_DIR}/test/*
/*/gtest/*)
add_code_coverage_all_targets(EXCLUDE ${COVERAGE_EXCLUDE})
add_code_coverage_all_targets(EXCLUDE ${COVERAGE_EXCLUDE} ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})

add_library(
${PROJECT_NAME}
Expand Down
4 changes: 2 additions & 2 deletions tesseract_motion_planners/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ endif()
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

initialize_code_coverage()
initialize_code_coverage(ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
set(COVERAGE_EXCLUDE
/usr/*
/opt/*
Expand All @@ -44,7 +44,7 @@ set(COVERAGE_EXCLUDE
/*/include/opw_kinematics/*
/*/include/trajopt/*
/*/include/trajopt_sco/*)
add_code_coverage_all_targets(EXCLUDE ${COVERAGE_EXCLUDE})
add_code_coverage_all_targets(EXCLUDE ${COVERAGE_EXCLUDE} ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})

# Enable Testing
if(TESSERACT_ENABLE_TESTING)
Expand Down
4 changes: 2 additions & 2 deletions tesseract_task_composer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ endif()
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

initialize_code_coverage()
initialize_code_coverage(ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
set(COVERAGE_EXCLUDE
/usr/*
/opt/*
${CMAKE_CURRENT_LIST_DIR}/test/*
/*/gtest/*)
add_code_coverage_all_targets(EXCLUDE ${COVERAGE_EXCLUDE})
add_code_coverage_all_targets(EXCLUDE ${COVERAGE_EXCLUDE} ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})

# Define compile-time default variables
if(MSVC)
Expand Down
4 changes: 2 additions & 2 deletions tesseract_time_parameterization/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ endif()
# Load variable for clang tidy args, compiler options and cxx version
tesseract_variables()

initialize_code_coverage()
initialize_code_coverage(ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})
set(COVERAGE_EXCLUDE
/usr/*
/opt/*
${CMAKE_CURRENT_LIST_DIR}/test/*
/*/gtest/*)
add_code_coverage_all_targets(EXCLUDE ${COVERAGE_EXCLUDE})
add_code_coverage_all_targets(EXCLUDE ${COVERAGE_EXCLUDE} ENABLE ${TESSERACT_ENABLE_CODE_COVERAGE})

# Enable Testing
if(TESSERACT_ENABLE_TESTING)
Expand Down
Loading