How I implemented a CI build of Delphi binaries using GitLab CI

Fernando Derkoski de Souza
2 min readFeb 27, 2018

--

How I discussed here we started using GitLab as our version control system and with him comes GitLab CI that can automate tests and builds.

Here are how I had setup so if a developer push a commit GitLab calls GitLab Runner (that is running in a VM with Delphi XE 7 installed) to compile and upload the binary.

I installed in a different machine a VM with Windows and Delphi XE 7 and all the components to compile our projects and the GitLab Runner (click here for more information) as well.

In the root of the project I created a .yml called .gitlab-ci.yml with this configuration:

The first block test will run every time a modification is pushed to the server, the production is only triggered when it is created a tag and both binaries will expire in 2 weeks.

For the Delphi to compile you have to configure the Release option in the Project Options to put the .exe in the bin path.

And that is it, if you have any question fell free to ask, I hope that this will help someone that is looking for a automated option for Delphi.

Oh and before I forget with GitLab CI you can do automated tests as well and block any merge that didn't pass the tests. There is so much more that the tool can do that I suggest you take a look at the documentation your self https://about.gitlab.com/features/gitlab-ci-cd/

--

--

Fernando Derkoski de Souza

I am software developer with 13+ years of experience, with a passion for technology.