-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
149 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
name: Mac OSX | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- 'dev**' | ||
pull_request: | ||
paths: | ||
- 'trajopt**' | ||
- '.github/workflows/mac.yml' | ||
- '**.repos' | ||
schedule: | ||
- cron: '0 5 * * *' | ||
release: | ||
types: | ||
- released | ||
|
||
env: | ||
VCPKG_PKGS: >- | ||
boost-dll boost-program-options boost-stacktrace | ||
boost-serialization boost-filesystem boost-format | ||
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: | ||
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: | ||
path: ws/src/trajopt | ||
- 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: Setup cmake | ||
uses: jwlawson/actions-setup-cmake@v2 | ||
with: | ||
cmake-version: '3.28.x' | ||
- name: vcpkg build | ||
uses: johnwason/vcpkg-action@v6 | ||
with: | ||
pkgs: >- | ||
${{ env.VCPKG_PKGS }} | ||
triplet: ${{ matrix.config.vcpkg_triplet }} | ||
extra-args: --clean-after-build --overlay-triplets=${{ github.workspace }}/ws/src/trajopt/.github/workflows/vcpkg_triplets | ||
token: ${{ github.token }} | ||
cache-key: osx-${{ matrix.config.arch }}-vcpkg | ||
revision: master | ||
github-binarycache: true | ||
- 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 trajopt/.github/workflows/windows_dependencies.repos | ||
- name: colcon build | ||
working-directory: ws | ||
run: | | ||
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 \ | ||
--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 \ | ||
-DVCPKG_APPLOCAL_DEPS=OFF -DTRAJOPT_ENABLE_TESTING=ON \ | ||
-DCMAKE_OSX_DEPLOYMENT_TARGET=12.0 \ | ||
-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=${{ matrix.config.homebrew_root }}/opt/libomp/lib/libomp.dylib | ||
- name: colcon test | ||
working-directory: ws | ||
run: | | ||
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 \ | ||
--event-handlers console_cohesion+ | ||
9 changes: 9 additions & 0 deletions
9
.github/workflows/vcpkg_triplets/arm64-osx-dynamic-release.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
9 changes: 9 additions & 0 deletions
9
.github/workflows/vcpkg_triplets/x64-osx-dynamic-release.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,31 @@ | ||
file(READ CMakeLists.txt ROOT_FILE) | ||
string( | ||
REPLACE "MESSAGE(FATAL_ERROR \"Compiling qpOASES as a shared library in Windows is not supported.\")" | ||
"set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)\ninclude(GNUInstallDirs)" | ||
"set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)\nENDIF()\ninclude(GNUInstallDirs)\nIF(0)\n" | ||
ROOT_FILE2 | ||
${ROOT_FILE}) | ||
string( | ||
REPLACE "SET(CMAKE_INSTALL_BINDIR \${CMAKE_INSTALL_LIBDIR})" | ||
REGEX | ||
REPLACE "SET\\(CMAKE_INSTALL[^\r\n]*\\)" | ||
"" | ||
ROOT_FILE3 | ||
${ROOT_FILE2}) | ||
file(WRITE CMakeLists.txt ${ROOT_FILE3}) | ||
string( | ||
REGEX | ||
REPLACE "set\\([^\r\n]*RPATH[^\r\n]*\\)" | ||
"" | ||
ROOT_FILE4 | ||
${ROOT_FILE3}) | ||
string( | ||
REGEX | ||
REPLACE "SET\\([^\r\n]*OUTPUT_PATH[^\r\n]*\\)" | ||
"" | ||
ROOT_FILE5 | ||
${ROOT_FILE4}) | ||
string( | ||
REPLACE "cmake_minimum_required(VERSION 2.6)" | ||
"cmake_minimum_required(VERSION 3.10.0)" | ||
ROOT_FILE6 | ||
${ROOT_FILE5}) | ||
|
||
file(WRITE CMakeLists.txt ${ROOT_FILE6}) |