Fix generator compatibility (#6) #26
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
name: CMake | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
env: | |
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | |
BUILD_TYPE: Release | |
jobs: | |
build-ubuntu-22: | |
# The CMake configure and build commands are platform agnostic and should work equally | |
# well on Windows or Mac. You can convert this to a matrix build if you need | |
# cross-platform coverage. | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build and install dependencies | |
# Build and install all dependencies to flexiv_tdk installation directory. | |
run: | | |
cd ${{github.workspace}} | |
cd thirdparty | |
bash build_and_install_dependencies.sh ~/teleop_install | |
- name: Build and install library | |
# Configure CMake, then build and install the flexiv_tdk INTERFACE library to TDK installation directory. | |
run: | | |
cd ${{github.workspace}} | |
mkdir -p build && cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=~/teleop_install | |
make install | |
- name: Build examples | |
# Find and link to the flexiv_tdk INTERFACE library, then build all examples. | |
run: | | |
cd ${{github.workspace}}/example | |
mkdir -p build && cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=~/teleop_install | |
make -j$(nproc) | |
# - name: Build tests | |
# # Find and link to the flexiv_tdk INTERFACE library, then build all tests. | |
# run: | | |
# cd ${{github.workspace}}/test | |
# mkdir -p build && cd build | |
# cmake .. -DCMAKE_INSTALL_PREFIX=~/teleop_install | |
# make -j$(nproc) | |
build-ubuntu-20: | |
# Use GitHub-hosted Ubuntu 20.04 runner | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build and install dependencies | |
# Build and install all dependencies to TDK installation directory. | |
run: | | |
cd ${{github.workspace}} | |
cd thirdparty | |
bash build_and_install_dependencies.sh ~/tdk_install $(nproc) | |
- name: Build and install library | |
# Configure CMake, then build and install the flexiv_tdk INTERFACE library to TDK installation directory. | |
run: | | |
cd ${{github.workspace}} | |
mkdir -p build && cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=~/tdk_install | |
make install | |
- name: Build examples | |
# Find and link to the flexiv_tdk INTERFACE library, then build all examples. | |
run: | | |
cd ${{github.workspace}}/example | |
mkdir -p build && cd build | |
cmake .. -DCMAKE_INSTALL_PREFIX=~/tdk_install | |
make -j$(nproc) |