Skip to content

Commit

Permalink
Release/v1.5.1 (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
pzhu-flexiv authored Dec 6, 2024
1 parent 8780065 commit cd79902
Show file tree
Hide file tree
Showing 23 changed files with 232 additions and 231 deletions.
160 changes: 20 additions & 140 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CMake

on:
push:
branches: [main, v1.x]
branches: [main, v0.x]
pull_request:
branches: [main, v1.x]
branches: [main, v0.x]
workflow_dispatch:

env:
Expand All @@ -13,153 +13,33 @@ env:

jobs:
build-ubuntu-22:
# Use GitHub-hosted Ubuntu 22.04 runner
# GitHub-hosted Ubuntu 22.04 runner
runs-on: ubuntu-22.04

# Use shared steps
steps:
- uses: actions/checkout@v2

- name: Build and install dependencies
# Build and install all dependencies to RDK installation directory.
run: |
cd ${{github.workspace}}
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install $(nproc)
- name: Build and install library
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
run: |
cd ${{github.workspace}}
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make install
- name: Build examples
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
run: |
cd ${{github.workspace}}/example
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(nproc)
- name: Build tests
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
run: |
cd ${{github.workspace}}/test
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(nproc)
- uses: actions/checkout@v3
- uses: ./.github/workflows/shared_steps

build-ubuntu-20:
# Use GitHub-hosted Ubuntu 20.04 runner
# GitHub-hosted Ubuntu 20.04 runner
runs-on: ubuntu-20.04

# Use shared steps
steps:
- uses: actions/checkout@v2

- name: Build and install dependencies
# Build and install all dependencies to RDK installation directory.
run: |
cd ${{github.workspace}}
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install $(nproc)
- name: Build and install library
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
run: |
cd ${{github.workspace}}
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make install
- name: Build examples
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
run: |
cd ${{github.workspace}}/example
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(nproc)
- name: Build tests
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
run: |
cd ${{github.workspace}}/test
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(nproc)
build-macos-12:
# Use self-hosted macOS 12 runner with arm64 processor
runs-on: [self-hosted, macos-12, ARM64]
- uses: actions/checkout@v3
- uses: ./.github/workflows/shared_steps

build-macos-14:
# GitHub-hosted macOS 14 runner with M1 chip
runs-on: macos-14
# Use shared steps
steps:
- uses: actions/checkout@v2

- name: Build and install dependencies
# Build and install all dependencies to RDK installation directory.
run: |
cd ${{github.workspace}}
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install $(sysctl -n hw.ncpu)
- name: Build and install library
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
run: |
cd ${{github.workspace}}
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make install
- name: Build examples
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
run: |
cd ${{github.workspace}}/example
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(sysctl -n hw.ncpu)
- name: Build tests
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
run: |
cd ${{github.workspace}}/test
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
make -j$(sysctl -n hw.ncpu)
- uses: actions/checkout@v3
- uses: ./.github/workflows/shared_steps

build-windows-2022:
# Use GitHub-hosted Windows 2022 runner
# GitHub-hosted Windows 2022 runner
runs-on: windows-2022

# Use shared steps
steps:
- uses: actions/checkout@v2

- name: Build and install dependencies
# Build and install all dependencies to RDK installation directory.
run: |
cd ${{github.workspace}}
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install $(nproc)
- name: Build and install library
# Configure CMake, then build and install the flexiv_rdk INTERFACE library to RDK installation directory.
run: |
cd ${{github.workspace}}
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
cmake --build . --target install --config Release
- name: Build examples
# Find and link to the flexiv_rdk INTERFACE library, then build all examples.
run: |
cd ${{github.workspace}}/example
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
cmake --build . --config Release -j $(nproc)
- name: Build tests
# Find and link to the flexiv_rdk INTERFACE library, then build all tests.
run: |
cd ${{github.workspace}}/test
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
cmake --build . --config Release -j $(nproc)
- uses: actions/checkout@v3
- uses: ./.github/workflows/shared_steps
41 changes: 41 additions & 0 deletions .github/workflows/shared_steps/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Shared Build Steps"
runs:
using: "composite"
# Note: working directory will be reset to the repo root for each new step
steps:
# Build and install all dependencies to RDK installation directory.
- name: Build and install dependencies
shell: bash
run: |
pwd
cd thirdparty
bash build_and_install_dependencies.sh ~/rdk_install 4
# Configure CMake, then build and install flexiv_rdk library to RDK installation directory.
- name: Build and install library
shell: bash
run: |
pwd
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
cmake --build . --target install --config Release
# Find and link to flexiv_rdk library, then build all example programs.
- name: Build examples
shell: bash
run: |
pwd
cd example
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
cmake --build . --config Release -j 4
# Find and link to flexiv_rdk library, then build all test programs.
- name: Build tests
shell: bash
run: |
pwd
cd test
mkdir -p build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install
cmake --build . --config Release -j 4
9 changes: 1 addition & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16.3)
# ===================================================================
# PROJECT SETUP
# ===================================================================
project(flexiv_rdk VERSION 1.5.0)
project(flexiv_rdk VERSION 1.5.1)

# Configure build type
if(NOT CMAKE_BUILD_TYPE)
Expand Down Expand Up @@ -72,12 +72,6 @@ if(spdlog_FOUND)
message(STATUS "Found spdlog: ${spdlog_DIR}")
endif()

# Fast-CDR
find_package(fastcdr 1.0.24 REQUIRED)
if(fastcdr_FOUND)
message(STATUS "Found fastcdr: ${fastcdr_DIR}")
endif()

# Fast-DDS (Fast-RTPS)
find_package(fastrtps 2.6.7 REQUIRED)
if(fastrtps_FOUND)
Expand Down Expand Up @@ -105,7 +99,6 @@ target_link_libraries(${PROJECT_NAME} INTERFACE
Eigen3::Eigen
spdlog::spdlog
fastrtps
fastcdr
)

# Use moderate compiler warning option
Expand Down
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Flexiv RDK (Robotic Development Kit), a key component of the Flexiv Robotic Soft

## Compatibility Overview

| **Supported OS** | **Supported processor** | **Supported language** | **Required compiler kit** |
| -------------------------- | ----------------------- | ---------------------- | ------------------------- |
| Linux (Ubuntu 20.04/22.04) | x86_64, arm64 | C++, Python | build-essential |
| macOS 12 and above | arm64 | C++, Python | Xcode Command Line Tools |
| Windows 10/11 | x86_64 | C++, Python | MSVC v14.2+ |
| **Supported OS** | **Supported processor** | **Supported language** | **Required compiler kit** |
| ------------------------------ | ----------------------- | ---------------------- | ------------------------- |
| Linux (Ubuntu 20.04 and above) | x86_64, arm64 | C++, Python | build-essential |
| macOS 12 and above | arm64 | C++, Python | Xcode Command Line Tools |
| Windows 10 and above | x86_64 | C++, Python | MSVC v14.2+ |

## Quick Start

The **C++ and Python** RDK libraries are packed into a unified modern CMake project named ``flexiv_rdk``, which can be configured and installed via CMake on all supported OS.
The **C++ and Python** RDK libraries are packed into a unified modern CMake project named ``flexiv_rdk``, which can be configured and installed using CMake on all supported OS.

### Note

Expand All @@ -38,20 +38,22 @@ The **C++ and Python** RDK libraries are packed into a unified modern CMake proj
cd flexiv_rdk/thirdparty
bash build_and_install_dependencies.sh ~/rdk_install

4. In a new Terminal, use CMake to configure the ``flexiv_rdk`` project:
NOTE: Internet connection is required for this step.

4. In a new Terminal, configure ``flexiv_rdk`` library as a CMake project:

cd flexiv_rdk
mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=~/rdk_install -DINSTALL_PYTHON_RDK=ON

NOTE: ``-D`` followed by ``CMAKE_INSTALL_PREFIX`` sets the CMake variable that specifies the path of the installation directory. ``-D`` followed by ``INSTALL_PYTHON_RDK=ON`` enables the installation of Python RDK besides C++ RDK. The configuration process can also be done using CMake GUI.
NOTE: ``-D`` followed by ``CMAKE_INSTALL_PREFIX`` sets the CMake variable that specifies the path of the installation directory. ``-D`` followed by ``INSTALL_PYTHON_RDK=ON`` enables the installation of the Python library alongside the C++ library. Alternatively, this configuration step can be done using CMake GUI.

5. Install C++ and Python RDK:
5. Install ``flexiv_rdk`` libraries (C++ and Python):

cd flexiv_rdk/build
cmake --build . --target install --config Release

C++ RDK is installed to the path specified by ``CMAKE_INSTALL_PREFIX``, which may or may not be globally discoverable by CMake. Python RDK is installed to the user site packages path, which is globally discoverable by Python interpreter.
The C++ library will be installed to ``CMAKE_INSTALL_PREFIX`` path, which may or may not be globally discoverable by CMake. The Python library is installed to the user site packages path, which is globally discoverable by the Python interpreter.

### Install on macOS

Expand All @@ -73,9 +75,9 @@ The **C++ and Python** RDK libraries are packed into a unified modern CMake proj
3. Install bash emulator: Download and install [Git for Windows](https://git-scm.com/download/win/), which comes with a bash emulator Git Bash.
4. Within the bash emulator, the rest are identical to steps 2 and below in [Install on Linux](#install-on-linux).

### Link to C++ RDK from a user program
### Link to installed library from a user program

After C++ RDK is installed, it can be found as a CMake library and linked to by other CMake projects. Use the provided examples project for instance::
After the C++ RDK library is installed, it can be found as a CMake target and linked to from other CMake projects. Using the provided examples project for instance::

cd flexiv_rdk/example
mkdir build && cd build
Expand Down
1 change: 0 additions & 1 deletion cmake/flexiv_rdk-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ find_dependency(Threads REQUIRED)
find_dependency(Eigen3 REQUIRED)
find_dependency(spdlog REQUIRED)
find_dependency(fastrtps 2.6.7 REQUIRED)
find_dependency(fastcdr 1.0.24 REQUIRED)

# Add targets file
include("${CMAKE_CURRENT_LIST_DIR}/@[email protected]")
2 changes: 1 addition & 1 deletion doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "Flexiv RDK APIs"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 1.5
PROJECT_NUMBER = 1.5.1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
Loading

0 comments on commit cd79902

Please sign in to comment.