简体   繁体   中英

Continuous Integration System for Delphi

Are there any CI-Systems for Delphi like Hudson for Java? Does Hudson has any Delphi integrations?

We use Hudson :), which works just fine with Delphi.

Here's a complete setup for one of my projects:

<?xml version='1.0' encoding='UTF-8'?>
<project>
  <actions/>
  <description></description>
  <keepDependencies>false</keepDependencies>
  <properties/>
  <scm class="hudson.scm.CVSSCM">
    <cvsroot>:sspi:cvsonly:foo@bar:/baz</cvsroot>
    <module>SIP</module>
    <canUseUpdate>false</canUseUpdate>
    <flatten>true</flatten>
    <isTag>false</isTag>
    <excludedRegions></excludedRegions>
  </scm>
  <canRoam>true</canRoam>
  <disabled>false</disabled>
  <triggers class="vector"/>
  <builders>
    <hudson.tasks.BatchFile>
      <command>&quot;C:\Program Files\Nant\bin\nant&quot; -buildfile:etc\sip.build build-d7 test</command>
    </hudson.tasks.BatchFile>
  </builders>
  <publishers>
    <hudson.tasks.BuildTrigger>
      <childProjects>quux, foozle, wibble</childProjects>
      <threshold>
        <name>SUCCESS</name>
        <ordinal>0</ordinal>
        <color>BLUE</color>
      </threshold>
    </hudson.tasks.BuildTrigger>
  </publishers>
  <buildWrappers/>
</project>

sip.build's delphi-7 target builds the project's test suite (DUnit's TextTestRunner) and so the output of the job is simply the count of failed/error tests thanks to:

var
  R: TTestResult;

begin
  R := TextTestRunner.RunRegisteredTests;
  ExitCode := R.ErrorCount + R.FailureCount;
end;

FinalBuilder Server

now replaced with : Continua CI

我们使用CruiseControl.NET ,它与 Delphi 完美配合。

It seems Embarcadero itself uses Hudson. See the comment from Nick Hodges, Development Manager at Embarcadero. http://blogs.embarcadero.com/nickhodges/2010/03/10/39369#comment-29952

Hudson is great, it is also available as MSI setup . Users of older Delphi versions (pre MSBuild), can create build scripts with the popular Apache Ant and NAnt build script environments. Simple command line (batch script) builds are possible too of course.

One of the highlights of this installer is that it comes with a JRE, to be fully self-contained. This is because Windows users don't normally know what to do with the *.war file, and they generally don't like going to the command prompt and running Java command manually.

So it is easy to try without going through too many installers and command lines first.

And after installation make sure to visit the plug in page in the administration app, there are many extensions available which are also useful for Delphi developers. A plugin overview is online here .

Hudson tools for Delphi: there is also a Code Coverage tool for Delphi with Hudson support here .

TeamCity is another very nice CI system. It is a commercial product, but offers a free license for up to 20 users and 20 build configurations on 3 build agents.

Bamboo is a CI system for any language. It is available from Atlassian. Its price starts at $10 - this includes all features and unlimited users, but limited to 10 plans, running builds only on the server where it is installed. It can use Amazon Elastic Compute Cloud instances as remote agents.

Automated Build Studio from SmartBear. With Automated Build Studio Server, it introduced CI some time before FinalBuilder.

We use jenkins . Jenkins has a RAD Studio plugin to integrate the compilation of Delphi projects into jobs. It's not mandatory to use it (plugin), we use command-line tools and MSBuild to compile the projects.

Theproject DUnItX (to create unit testing) integrates seamlessly with Jenkins.

Here you can find some articles about the integration of Jenkins and Delphi. Introduction, installation,... Are in Spanish but you can translate without problems and with included images and code are quite simple.

1- Integración continua con Delphi (GIT) (INTRODUCTION)
2- Integración continua con Delphi (Jenkins) – Instalación (INSTALLATION)
3- Integración continua con Delphi (Jenkins) – Primer proyecto (FIRST PROJECT)
4- Integración continua con Delphi (Jenkins) – Pipelines (USE OF PIPELINES)

将我们的Parabuild添加到要检查的工具列表中——它几乎构建了任何可以从命令行构建的东西——包括 Delphi,它提供了与 Perforce 和其他版本控制系统(如 Git 和 Bazaar)的集成。

We use Jenkins CI system with Owly CI tool as the build system and dependency handler.

Take a look on this tutorial

Initial setup takes less than 5 minutes

Hudson is simple to use, with some web-based assistants, as Delphi projects are built with MSBuild.

If you need more customization and 3rd party tools integration (integrate metrics tools for example) then CruiseControl.NET is the ideal solution.

Have a look to my CC.NET Dashboard page for DelphiCodeToDoc (and you can have a look to the configuration file also). I'm doing checkout + compilation of gui and command line version and unit test + unit test execution and report + ftp upload build delivery .

Just to throw my support for CruiseControl.NET, as Delphi 2007 and above are based around MSBuild, then there should be no problem with builds via CC.NET. There is a patch somewhere for DUNit, so that it outputs the results to an XML file, and this can then be integrated into the builds results charts.

errrm, can you define what you are actually looking for?

You use the phrase continuous integration , but do you just mean continuous build to make sure it compiles and likes, or do you actually mean continuous integration in the sense that you also run regression tests?

I would be curios as to how you do that (Auto-it?).

Not that it really matters too much, because the wonderful Hudson (which is decidedly not just for java) has numerous plug-ins, but will also allow you to execute a DOS batch script - any script that you care to write, to build, to test, to report results, etc.

Another option (although not free, $10 for limited # of users) is Atlassian Bamboo . And JetBrains TeamCity is another that is free (with limited # of users). I've tried both with Delphi 2009/2010, and they work quite well. Both allowed integration with Perforce among other SCM's.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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