ros-tooling / action-ros-ci

Github Action to build and test ROS 2 packages using colcon
Apache License 2.0
145 stars 53 forks source link

Binary Job with GH actions? #271

Closed Karsten1987 closed 4 years ago

Karsten1987 commented 4 years ago

How can I use the current GH actions to run a binary job? If have the following configuration:

name: Integration build rmw_iceoryx

on:
  push:
    branches:
      - foxy
  pull_request:
  schedule:
    - cron: '0 3 * * *'

jobs:
  build:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
          os: [ubuntu-20.04]
    steps:
      - name: Setup ROS
        uses: ros-tooling/setup-ros@0.0.23
        with:
          required-ros-distributions: foxy
      - name: Install Iceoryx Dependencies
        run: sudo apt-get update && sudo apt-get install -y cmake libacl1-dev libncurses5-dev pkg-config
      - name: Build & Test
        uses: ros-tooling/action-ros-ci@0.0.17
        with:
          package-name: rmw_iceoryx_cpp iceoryx_ros2_bridge
          vcs-repo-file-url: |
            https://gist.githubusercontent.com/Karsten1987/1723f219bb5aa5b81355c7eb1477f867/raw/9dc4d877f6fd0f862070516febdbddea28723b5c/iceoryx.repos

I can see that the desktop variant (foxy) is installed correctly, still yet the actual compilation fails due to - what looks to me - not sourcing the installed desktop variant beforehand:

  --- stderr: rmw_iceoryx_cpp
  CMake Error at CMakeLists.txt:27 (find_package):
    By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project
    has asked CMake to find a package configuration file provided by
    "ament_cmake", but CMake did not find one.

    Could not find a package configuration file provided by "ament_cmake" with
    any of the following names:

      ament_cmakeConfig.cmake
      ament_cmake-config.cmake

    Add the installation prefix of "ament_cmake" to CMAKE_PREFIX_PATH or set
    "ament_cmake_DIR" to a directory containing one of the above files.  If
    "ament_cmake" provides a separate development package or SDK, be sure it
    has been installed.

What's the correct way of doing so and practically building an overlay workspace based on a binary distribution?

more info: https://github.com/ros2/rmw_iceoryx/pull/36

Karsten1987 commented 4 years ago

@jacobperron pointed me to the answer.

Sorry for the noise.

ralph-lange commented 4 years ago

I stumbled across the same problem. source-ros-binary-installation should definitely be mentioned prominently in the README.md.

emersonknapp commented 4 years ago

Thanks for this input - we've just put through this PR https://github.com/ros-tooling/action-ros-ci/pull/278 that makes it required to specify a target ROS distribution, and removes the confusingly-named source-ros-binary-installation argument. Additionally I've just opened https://github.com/ros-tooling/action-ros-ci/pull/284 to update the README to mention it. With those changes do you think the situation is clearer? Any other feedback welcome.

ralph-lange commented 4 years ago

Yes, the new inputs in https://github.com/ros-tooling/action-ros-ci/pull/278/ make it much clearer. Please note my comment on https://github.com/ros-tooling/action-ros-ci/pull/284/.