From 0ee61e7278bcd329798a2d4390a66ec1e03c131c Mon Sep 17 00:00:00 2001 From: Silvio Traversaro Date: Mon, 23 Sep 2024 15:11:44 +0200 Subject: [PATCH] Use conda-forge's catch2 in CI to avoid build failures, set OMP_NUM_THREADS=1 and updated catch2's used by FetchContent to 3.7.1 (#884) --- .github/workflows/conda-forge-ci.yml | 11 ++++++++--- cmake/AddBipedalLocomotionUnitTest.cmake | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/conda-forge-ci.yml b/.github/workflows/conda-forge-ci.yml index d76615ae02..5fcf5cb468 100644 --- a/.github/workflows/conda-forge-ci.yml +++ b/.github/workflows/conda-forge-ci.yml @@ -10,6 +10,11 @@ on: # Execute a "nightly" build at 2 AM UTC - cron: '0 2 * * *' +# Workaround for https://github.com/conda-forge/mumps-feedstock/issues/125 +# and https://github.com/conda-forge/mumps-feedstock/pull/126#issuecomment-2355357834 +env: + OMP_NUM_THREADS: 1 + jobs: build: name: '[${{ matrix.os }}@${{ matrix.build_type }}@conda]' @@ -41,7 +46,7 @@ jobs: liblie-group-controllers eigen qhull "casadi>=3.5.5" cppad spdlog \ nlohmann_json manif manifpy pybind11 numpy pytest scipy opencv pcl \ tomlplusplus libunicycle-footstep-planner "icub-models>=1.23.4" \ - ros-humble-rclcpp onnxruntime-cpp libbayes-filters-lib cmake-package-check + ros-humble-rclcpp onnxruntime-cpp libbayes-filters-lib cmake-package-check catch2 - name: Linux-only Dependencies [Linux] if: contains(matrix.os, 'ubuntu') @@ -79,7 +84,7 @@ jobs: mkdir -p build cd build cmake -GNinja -DBUILD_TESTING:BOOL=ON -DFRAMEWORK_COMPILE_IK:BOOL=OFF -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX \ - -DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .. + -DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=ON -DUSE_SYSTEM_Catch2:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .. - name: Build [Linux&macOS] if: contains(matrix.os, 'macos') || contains(matrix.os, 'ubuntu') @@ -101,7 +106,7 @@ jobs: run: | mkdir -p build cd build - cmake -GNinja -DBUILD_TESTING:BOOL=ON -DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=ON -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .. + cmake -GNinja -DBUILD_TESTING:BOOL=ON -DFRAMEWORK_COMPILE_PYTHON_BINDINGS:BOOL=ON -DUSE_SYSTEM_Catch2:BOOL=ON -DCMAKE_INSTALL_PREFIX=%CONDA_PREFIX%\Library -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} .. - name: Build [Windows] if: contains(matrix.os, 'windows') diff --git a/cmake/AddBipedalLocomotionUnitTest.cmake b/cmake/AddBipedalLocomotionUnitTest.cmake index c36bdd7714..dced9f6385 100644 --- a/cmake/AddBipedalLocomotionUnitTest.cmake +++ b/cmake/AddBipedalLocomotionUnitTest.cmake @@ -16,7 +16,7 @@ if (BUILD_TESTING) include(FetchContent) FetchContent_Declare(Catch2 GIT_REPOSITORY https://github.com/catchorg/Catch2.git - GIT_TAG v3.0.1) + GIT_TAG v3.7.1) FetchContent_GetProperties(Catch2) if(NOT Catch2_POPULATED)