Skip to content

Commit

Permalink
CI update: added valgrind
Browse files Browse the repository at this point in the history
  • Loading branch information
randaz81 committed Mar 8, 2023
1 parent 420465c commit 2e9607b
Showing 1 changed file with 85 additions and 0 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/conda-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,88 @@ jobs:
cd build
ctest --output-on-failure -C ${{ matrix.build_type }}
build-valgrind:
name: 'valgrind [ubuntu-latest@Debug@humble@conda]'
runs-on: ubuntu-latest
strategy:
matrix:
build_type: [Debug]
ros_distro: [humble]
os: [ubuntu-latest]
fail-fast: false

steps:
- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
miniforge-version: latest

- name: Dependencies
shell: bash -l {0}
run: |
# Compilation related dependencies
mamba install cmake compilers make ninja pkg-config
# Actual dependencies
sudo apt-get install -qq -y libc6-dbg
mamba install -c conda-forge -c robostack-staging ycm-cmake-modules eigen valgrind ace ros-${{ matrix.ros_distro }}-ros-base ros-${{ matrix.ros_distro }}-test-msgs
- name: Download YARP [Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
run: |
cd ${GITHUB_WORKSPACE}
git clone https://github.com/robotology/yarp
- name: Dependencies from source [Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
cd ${GITHUB_WORKSPACE}
cd yarp
mkdir build
cd build
cmake -GNinja -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .. \
-DYARP_COMPILE_TESTS:BOOL=ON \
-DYARP_COMPILE_ALL_FAKE_DEVICES:BOOL=ON \
-DYARP_VALGRIND_TESTS:BOOL=ON
cmake --build . --config ${{ matrix.build_type }}
cmake --install . --config ${{ matrix.build_type }}
echo "YARP_DATA_DIRS=${CONDA_PREFIX}/share/yarp::${YARP_DATA_DIRS}" >> $GITHUB_ENV
- name: Configure [Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
mkdir -p build
cd build
# Python3_EXECUTABLE is set as a workaround for https://github.com/ros2/python_cmake_module/issues/6
cmake -GNinja -DBUILD_TESTING:BOOL=ON \
-DYARP_ROS2_USE_SYSTEM_map2d_nws_ros2_msgs:BOOL=OFF \
-DPython3_EXECUTABLE:PATH=$CONDA_PREFIX/bin/python3 \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DYARP_VALGRIND_TESTS:BOOL=ON \
-DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} .. \
-DYARP_COMPILE_TESTS:BOOL=ON
- name: Build [Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
cd build
cmake --build . --config ${{ matrix.build_type }}
- name: Install [Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
cd build
cmake --install . --config ${{ matrix.build_type }}
- name: Test [Linux&macOS]
if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu')
shell: bash -l {0}
run: |
cd build
ctest --output-on-failure -C ${{ matrix.build_type }}

0 comments on commit 2e9607b

Please sign in to comment.