diff --git a/.github/workflows/ros2-lyrical.yaml b/.github/workflows/ros2-lyrical.yaml new file mode 100644 index 000000000..9f997af2b --- /dev/null +++ b/.github/workflows/ros2-lyrical.yaml @@ -0,0 +1,36 @@ +name: ros2-lyrical + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + industrial_ci: + strategy: + matrix: + env: + # TARGET_CMAKE_ARGS emulates the ROS build farm (bloom/debhelper), + # which configures with -DCMAKE_INSTALL_LIBDIR=lib/. + # AFTER_SCRIPT asserts that the library is still installed to + # $prefix/lib, as required by ament tooling (see issue #1175). + - ROS_DISTRO: lyrical + ROS_REPO: main + TARGET_CMAKE_ARGS: -DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu + AFTER_SCRIPT: >- + lib=$(find "$BASEDIR/target_ws/install" -name libbehaviortree_cpp.so); + echo "libbehaviortree_cpp.so installed at: ${lib:-NOT FOUND}"; + [[ "$lib" == */install/behaviortree_cpp/lib/libbehaviortree_cpp.so ]] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: 'ros-industrial/industrial_ci@master' + env: ${{matrix.env}} + with: + package-name: behaviortree_cpp diff --git a/cmake/ament_build.cmake b/cmake/ament_build.cmake index 0bcfa64eb..6e74556e3 100644 --- a/cmake/ament_build.cmake +++ b/cmake/ament_build.cmake @@ -15,6 +15,16 @@ set( BTCPP_EXTRA_LIBRARIES ament_export_dependencies(ament_index_cpp) +# The ROS build farm (bloom/debhelper) configures with +# -DCMAKE_INSTALL_LIBDIR=lib/, but ament tooling +# (ament_export_libraries lookup, LD_LIBRARY_PATH environment hooks) +# only supports libraries installed to $prefix/lib. These plain set() +# calls intentionally shadow the GNUInstallDirs-based cache variables +# defined in the top-level CMakeLists.txt (see issue #1175). +set(BTCPP_LIB_DESTINATION lib) +set(BTCPP_INCLUDE_DESTINATION include) +set(BTCPP_BIN_DESTINATION bin) + mark_as_advanced( BTCPP_EXTRA_LIBRARIES BTCPP_EXTRA_INCLUDE_DIRS