C++ 的持续集成服务器- 库依赖关系怎么样?
我目前正在研究一个持续集成服务器的良好设置,该服务器将为多个 Linux 发行版构建各种 C++ 应用程序。
我的主要问题是这里的其他用户如何处理 Linux 发行版之间系统库的差异?
虽然构建直接依赖项(例如 UI 库)和应用程序可能相对容易,但如果每次都必须与应用程序一起构建“间接”依赖项(例如 glibc),那么它们看起来会很痛苦。因此,我正在考虑将实际的构建执行移动到每个发行版的单独虚拟机中,例如使用 rlogin 来运行命令。我的目标是防止构建机器库版本与目标发行版中部署的版本之间的二进制不兼容。
这里有没有人有这样的过程的经验,并且可以判断上述听起来是否可行?
I am currently researching a good setup for a continuous integration server which would build various C++ applications for several Linux distributions.
My primary question is how other users here have handled the differences in system libraries between Linux distributions?
While it might be relatively easy to build direct dependencies such as UI libraries along with an application, "indirect" dependencies such as glibc look like a big pain if they had to be built alongside the application every time. I am therefore thinking of moving the actual build execution into a separate virtual machine for each distribution, e.g. using rlogin to run the commands. My goal is to prevent binary incompatibilities between build-machine library versions and those deployed in the target distributions.
Does anyone here have any experience with such a process and could tell if the above sounds like a feasible approach?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我们使用Jenkins(连续集成)和CMake >(构建系统)用于此目的。 Jenkins 与 Buildbot 类似,即它也有 buildmaster 和 buildslaves。目前我已经设置了 8 个从站来为 4 个不同的平台(FC8、FC10、FC12 和 Windows 7)构建。我们构建调试和发布二进制文件,因此我为每个平台和构建类型专用了一个从站。
至于Qt&等第三方库Boost,我在每个平台上编译它们并将它们签入单独的存储库中。
@esavard:我们使用 CMake 2.8 进行交叉编译,我没有使用过 minigw,但快速的 google 搜索表明这是可能的。这是 Windows 交叉编译教程的链接在 Linux 上使用 CMake 和 miniGW。
我没有使用过 Buildbot,也无法评论它的功能,但我认为我应该提到我们目前正在使用的替代方案。
希望这有帮助。
We use Jenkins (Contiguous Integration) and CMake (build system) for this purpose. Jenkins is similar to Buildbot, i.e. it also has buildmaster and buildslaves. Currently I have setup 8 slaves to build for 4 different platforms (FC8, FC10, FC12 and Windows 7). We build both debug and release binaries, so I dedicated one slave for each platform and build type.
As for the third party libraries like Qt & Boost, I compiled them on each platform and checked them into a separate repository.
@esavard: We use CMake 2.8 to do cross compilation, I have not used minigw but a quick google search indicates that it is possible. Here is a link to a tutorial to cross compile for Windows on Linux using CMake and miniGW.
I have not used Buildbot and cannot comment on its features but thought I should mention an alternative that we are currently using.
Hope this helps.
Buildbot 具有 构建大师和构建奴隶。
构建管理员负责显示 Web GUI、发送电子邮件、触发构建和其他内务处理。构建从机等待构建主机并在收到命令时执行构建。
我们已经设置了 buildbot 来在许多不同的平台上构建,其中一些是虚拟机,并且它对我们来说运行良好。
Buildbot has the notion of buildmasters and buildslaves.
A buildmaster takes care of displaying the web GUI, sending email, triggering builds, and other housekeeping. The buildslaves wait on the buildmaster and when commanded perform builds.
We have buildbot set up to build on a number of different platforms, some of them VMs, and it's working well for us.
当然,buildbot 和许多虚拟机就是解决这个问题的方法。我们有 VMWare ESX 服务器托管许多构建从属服务器,它们可以在一夜之间编译我们的应用程序。然后,应用程序在另一台虚拟机(不是构建从机,只是安装了默认操作系统)上进行测试,以验证它是否正常工作以及所有依赖项是否已打包。
我想做的一件好事是使测试运行时阶段成为一个自动化步骤,但我还没有时间这样做。
Certainly buildbot and many virtual machines is the way to go with this. We have VMWare ESX server hosting many build slaves which overnight compile our application. The application is then tested on another virtual machine (not the build slave and just having a default OS install) to verify that it works and all dependency's are packaged.
The nice thing I would like to do is make the testing run time phase an automated step but I haven't been given the time to do that yet.