Update CMake minimum version #882
Workflow file for this run
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: Linux CI | |
on: [pull_request] | |
jobs: | |
build: | |
name: ${{ matrix.name }} ${{ matrix.build_type }} | |
runs-on: ${{ matrix.os }} | |
env: | |
CTEST_OUTPUT_ON_FAILURE: ON | |
CTEST_PARALLEL_LEVEL: 2 | |
CMAKE_BUILD_TYPE: ${{ matrix.build_type }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Github Actions requires a single row to be added to the build matrix. | |
# See https://help.github.com/en/articles/workflow-syntax-for-github-actions. | |
name: [ubuntu-20.04-gcc-9, ubuntu-20.04-clang-10] | |
build_type: [Debug, Release] | |
include: | |
- name: ubuntu-20.04-gcc-9 | |
os: ubuntu-20.04 | |
compiler: gcc | |
version: "9" | |
- name: ubuntu-20.04-clang-10 | |
os: ubuntu-20.04 | |
compiler: clang | |
version: "10" | |
steps: | |
- name: Setup Compiler | |
run: | | |
sudo apt-get -y clean && sudo apt-get -y update | |
if [ "${{ matrix.compiler }}" = "gcc" ]; then | |
sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib | |
echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV | |
echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV | |
else | |
sudo apt-get install -y clang-${{ matrix.version }} g++-multilib | |
echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV | |
echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV | |
fi | |
- name: Install Dependencies | |
run: | | |
# For SDFormat | |
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D2486D2DD83DB69272AFE98867170598AF249743 | |
sudo apt-get -y update | |
sudo apt-get -y install libtbb-dev libboost-all-dev libsdformat12-dev | |
# Install CppUnitLite. | |
git clone https://github.com/borglab/CppUnitLite.git | |
cd CppUnitLite && mkdir build && cd $_ | |
cmake .. && sudo make -j4 install | |
cd ../../ | |
- name: GTSAM | |
run: | | |
sudo add-apt-repository -y ppa:borglab/gtsam-develop | |
sudo apt-get -y update | |
sudo apt-get -y install libgtsam-no-tbb-dev libgtsam-no-tbb-unstable-dev | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Build Directory | |
run: mkdir build | |
- name: Configure | |
run: | | |
cmake -DGTDYNAMICS_BUILD_PYTHON=OFF -DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF .. | |
working-directory: ./build | |
- name: Build | |
run: make -j$(nproc) | |
working-directory: ./build | |
- name: Test | |
run: make -j$(nproc) check | |
working-directory: ./build | |
- name: Install | |
run: sudo make -j$(nproc) install | |
working-directory: ./build |