简体   繁体   English

适用于C ++ / Qt应用程序的跨平台持续集成管道

[英]Cross platform continuous integration pipeline for C++ / Qt applications

EDIT 2012.03.02: updated build tool section with some other requirements. EDIT 2012.03.02:更新了构建工具部分,其中包含一些其他要求。 Addding premake. 添加预制件。

EDIT 2012.03.05: updated build tool section. EDIT 2012.03.05:更新了构建工具部分。 Focused on CMake. 专注于CMake。 Added Ant + CMakeAnt. 添加了Ant + CMakeAnt。

I have a lot of small Visual C++ projects and I want to start using continuous integration for that. 我有很多小的Visual C ++项目,并且我想为此开始使用持续集成。 A lot of tools are involved in the process. 该过程涉及很多工具。 I start reading articles here and there and it is hard for me to see which to tool could integrate nicely with the others. 我开始在这里和那里阅读文章,我很难看到哪种工具可以与其他工具很好地集成在一起。 So I am looking for an already tested continuous integration workflow that could respect my needs: 因此,我正在寻找一个可以满足我的需求的经过测试的持续集成工作流程:

Current Context 当前背景

  • C++/Qt applications developed with Visual Studio; 用Visual Studio开发的C ++ / Qt应用程序;
  • Less than 1'000 source files; 少于1000个源文件;
  • Small dev team; 小型开发团队;
  • Small budget; 预算少;
  • Preferably open source/free software; 最好是开源/免费软件;
  • Looking for easy to use and simple tools. 寻找易于使用和简单的工具。 No need of something heavy and "powerful". 不需要沉重和“强大”的东西。
  • Finally packages software (installers ready for download) should work for windows and OSX. 最后,软件包软件(准备下载的安装程序)应该可以在Windows和OSX上使用。 Linux (most popular distributions) is a plus. Linux(最受欢迎的发行版)优先。

Tools needed 所需工具

  • Continuous Integration Server: 持续集成服务器:

    Needs to be Jenkins. 需要成为詹金斯。 I know it and I like it. 我知道,我喜欢。 I could change for another one if it is really needed. 如果确实需要,我可以换另一个。

  • Source Code Management: 源代码管理:

    GIT. GIT。

  • Documentation Generator: 文档生成器:

    Doxygen. Doxygen的。

  • Build Tool: 生成工具:

    We will need to generate solutions and configurations for all the platforms we need to support. 我们将需要为我们需要支持的所有平台生成解决方案和配置。 I have been strongly advised to use CMake for that. 强烈建议我为此使用CMake。 Ant + CMakeAnt (http://code.google.com/p/cmakeant/) seems to be a nice addition too. Ant + CMakeAnt(http://code.google.com/p/cmakeant/)似乎也是不错的选择。

  • Unit Testing Framework: 单元测试框架:

    CPPunit, C++Test, Googletest? CPPunit,C ++ Test,Googletest?

  • Installers Builder 安装程序生成器

    CPack (part of CMake seems great too). CPack(CMake的一部分似乎也很棒)。

  • Hardware: 硬件:

    Preferably, one single machine with VirtualBox or VMWare. 最好是一台带有VirtualBox或VMWare的机器。 is it only possible? 有可能吗? Would it be better to use Linux for such things? 将Linux用于此类用途会更好吗? Or would a MAC mini be sufficient? 还是MAC mini足够?

So, has anyone here already built something similar? 那么,这里有人已经建立了类似的东西吗? With which tools exactly? 究竟使用哪些工具?

Thanks for any comments and suggestions. 感谢您的任何意见和建议。

I have successfully used CMake/CTest/CPack with Jenkins, there is a CMake builder plugin available. 我已成功将CMake / CTest / CPack与Jenkins结合使用,有可用的CMake构建器插件。

I found the ctest --output-on-failure option to be useful as the output from the test is shown in the Jenkins log on failure. 我发现ctest --output-on-failure选项很有用,因为测试的输出显示在Jenkins登录失败中。

I use the Boost.Test framework for testing C++, it works fine with ctest, I run it with the -l all option to get all the logging output when something goes wrong. 我使用Boost.Test框架来测试C ++,它与ctest一起正常工作,我使用-l all选项运行它以在出现问题时获取所有日志记录输出。

You should be able to bootstrap the entire process using a bunch of scripts. 您应该能够使用一堆脚本来引导整个过程。

Write them in Perl or Python . PerlPython编写它们。 There are a million tutorials on how to bootstrap these sorts of processes. 有上百万的教程介绍如何引导这类过程。

If you're stuck on implementing a specific party of this build-process, ask a specific question about it. 如果您坚持执行此构建过程的特定参与者,请询问有关它的特定问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM