C++ 的持续集成服务器- 库依赖关系怎么样?

发布于 2024-09-30 12:02:57 字数 320 浏览 1 评论 0原文

我目前正在研究一个持续集成服务器的良好设置,该服务器将为多个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

秋意浓 2024-10-07 12:02:57

我们使用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.

2024-10-07 12:02:57

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.

绝影如岚 2024-10-07 12:02:57

当然,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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文