我使用带有管道的ROS工业CI。由于依赖于我必须从源代码构建的包,它无法构建。
通常我会克隆源 git 存储库并构建它。但是我不知道如何指定对管道的依赖关系。
git clone https://github.com/AprilRobotics/apriltag.git # Clone Apriltag library
cd april*
cmake .
sudo make install
将不胜感激的帮助
好吧,让我与您分享我的方法。我使用 GitLab CI,我想它可能很相似。
在我的存储库中,我有一个rosinstall文件,其中包含我需要从源代码构建的包。
就我而言,coscr.rosinstall看起来像
- git:
local-name: ira_laser_tools
uri: https://github.com/iralabdisco/ira_laser_tools.git
version: master
然后在我的 .gitlab-ci.yml文件中,我这样处理它:
stages:
- build
- test
image: osrf/ros:melodic-desktop-full
before_script:
- apt-get update && apt-get upgrade -y
- apt-get install -y python-rosinstall python-rosinstall-generator python-wstool build-essential
- apt-get install -y alsa-utils
- apt-get clean
- mkdir -p ~/catkin_ws/src
build:
stage: build
script:
- cd ~/catkin_ws/src
- git clone https://gitlab.com/______/cs_monster.git
- cd ~/catkin_ws
- wstool init src src/cs_monster/coscr.rosinstall
- rosdep install --from-paths src --ignore-src -r -y
- catkin_make -DCMAKE_BUILD_TYPE=Release
你可以看到我如何使用rosdep来制作这个技巧。 据我所知,它正在工作。无论哪种方式,我希望它能给你一些提示。