Skip to content

Commit

Permalink
Merge pull request #1156 from cmastalli/topic/ci-codegen
Browse files Browse the repository at this point in the history
Enabled conda jobs with CppADCodeGen
  • Loading branch information
cmastalli committed Aug 11, 2023
2 parents 0107696 + 3dd9393 commit 0eae0de
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 14 deletions.
41 changes: 34 additions & 7 deletions .github/workflows/conda-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ on: [push, pull_request]

jobs:
crocoddyl-conda:
name: (${{ matrix.os }}, ${{ matrix.build_type }})
name: (${{ matrix.os }}, clang, multi-threading, ipopt, ${{ matrix.build_type }})
runs-on: ${{ matrix.os }}
env:
CCACHE_DIR: ${{ matrix.CCACHE_DIR }}

strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
# os: ["ubuntu-latest", "macos-latest"]
os: ["macos-latest"]
build_type: [Release, Debug]
compiler: [clang]

include:
- os: ubuntu-latest
CCACHE_DIR: /home/runner/.ccache
# - os: ubuntu-latest
# CCACHE_DIR: /home/runner/.ccache
- os: macos-latest
CCACHE_DIR: /Users/runner/.ccache

Expand All @@ -37,14 +39,24 @@ jobs:
auto-update-conda: true
environment-file: .github/workflows/conda/conda-env.yml

- name: Install dependencies and update conda
- name: Install conda dependencies
shell: bash -l {0}
run: |
conda activate crocoddyl
conda install cmake ccache -c conda-forge
conda install llvm-openmp libcxx -c conda-forge
conda list
- name: Install example-robot-data
shell: bash -l {0}
run: |
conda activate crocoddyl
mkdir third-party && cd third-party
git clone --recursive https://github.com/Gepetto/example-robot-data.git
cd example-robot-data && mkdir build && cd build
cmake .. -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX
make install
- name: Install compilers for macOS
shell: bash -l {0}
if: contains(matrix.os, 'macos-latest')
Expand All @@ -55,7 +67,7 @@ jobs:
shell: bash -l {0}
if: contains(matrix.build_type, 'Release')
run: |
echo "codegen_support=OFF" >> "$GITHUB_ENV"
echo "codegen_support=ON" >> "$GITHUB_ENV"
- name: Disable CppADCodeGen compilation
shell: bash -l {0}
Expand All @@ -72,10 +84,25 @@ jobs:
mkdir build
cd build
cmake .. -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_WITH_CODEGEN_SUPPORT=${{ env.codegen_support }} -DPYTHON_EXECUTABLE=$(which python3) -DBUILD_WITH_MULTITHREADS=ON -DINSTALL_DOCUMENTATION=ON -DOpenMP_ROOT=$CONDA_PREFIX
cmake .. \
-DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DBUILD_WITH_CODEGEN_SUPPORT=${{ env.codegen_support }} -DPYTHON_EXECUTABLE=$(which python3) \
-DBUILD_WITH_MULTITHREADS=ON -DINSTALL_DOCUMENTATION=ON -DOpenMP_ROOT=$CONDA_PREFIX
make
- name: Run unit tests
shell: bash -l {0}
run: |
conda activate crocoddyl
cd build
export CTEST_OUTPUT_ON_FAILURE=1
make test
- name: Install Crocoddyl
shell: bash -l {0}
run: |
cd build
make install
- name: Uninstall Crocoddyl
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/conda/conda-env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ dependencies:
- urdfdom
- cppad
- cppadcodegen
- example-robot-data
- pinocchio
- ipopt
8 changes: 4 additions & 4 deletions .github/workflows/ros1-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
strategy:
matrix:
env:
- {name: "CI (noetic)", ROS_DISTRO: noetic}
- {name: "CI (noetic, clang)", ROS_DISTRO: noetic, ADDITIONAL_DEBS: clang, CC: clang, CXX: clang++}
- {name: "CI (noetic, clang, multi-threading)", ROS_DISTRO: noetic, ADDITIONAL_DEBS: "clang libomp-dev", CC: clang, CXX: clang++, CMAKE_ARGS: "-DBUILD_WITH_MULTITHREADS=ON -DBUILD_WITH_NTHREADS=2"}
- {name: "CI (noetic, clang, Debug)", ROS_DISTRO: noetic, ADDITIONAL_DEBS: clang, CC: clang, CXX: clang++, CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug"}
- {name: "(noetic)", ROS_DISTRO: noetic}
- {name: "(noetic, clang)", ROS_DISTRO: noetic, ADDITIONAL_DEBS: clang, CC: clang, CXX: clang++}
- {name: "(noetic, clang, multi-threading)", ROS_DISTRO: noetic, ADDITIONAL_DEBS: "clang libomp-dev", CC: clang, CXX: clang++, CMAKE_ARGS: "-DBUILD_WITH_MULTITHREADS=ON -DBUILD_WITH_NTHREADS=2"}
- {name: "(noetic, clang, Debug)", ROS_DISTRO: noetic, ADDITIONAL_DEBS: clang, CC: clang, CXX: clang++, CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug"}
# Format check
#- {name: "Format check", ROS_DISTRO: noetic, CLANG_FORMAT_CHECK: file, CLANG_FORMAT_VERSION: "6.0", BEFORE_RUN_CLANG_FORMAT_CHECK: "wget https://raw.githubusercontent.com/Gepetto/linters/master/.clang-format-6.0 -O /tmp/clang_format_check/crocoddyl/.clang-format", ADDITIONAL_DEBS: wget}
name: ${{ matrix.env.name }}
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/ros2-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ jobs:
strategy:
matrix:
env:
- {ROS_DISTRO: humble}
- {name: "(humble, Release)", ROS_DISTRO: humble}
# - {name: "humble, multi-threading", ROS_DISTRO: humble, ADDITIONAL_DEBS: "libomp-dev", CMAKE_ARGS: "-DBUILD_WITH_MULTITHREADS=ON -DBUILD_WITH_NTHREADS=2"}
# - {name: "humble, Debug", ROS_DISTRO: noetic, CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug"}
- {ROS_DISTRO: rolling}
- {name: "(rolling, Release)", ROS_DISTRO: rolling}
# - {name: "rolling, multi-threading", ROS_DISTRO: rolling, ADDITIONAL_DEBS: "libomp-dev", CMAKE_ARGS: "-DBUILD_WITH_MULTITHREADS=ON -DBUILD_WITH_NTHREADS=2"}
# - {name: "rolling, Debug", ROS_DISTRO: rolling, CMAKE_ARGS: "-DCMAKE_BUILD_TYPE=Debug"}
name: ${{ matrix.env.name }}
env:
CCACHE_DIR: /github/home/.ccache # Enable ccache
UPSTREAM_WORKSPACE: dependencies.rosinstall # to build example-robot-data from source as it's not released via the ROS buildfarm
Expand Down

0 comments on commit 0eae0de

Please sign in to comment.