1

I'm new to continuous integration. I'm interested in systems that would be able to test if the changes that I made to a code break the compilation of the code on a list of different build types.

Properties of code (Which I will call CodeA): 1.) Has dependencies to numerical libraries like SUNDIALS and PETSC 2.) Has dependencies on two other codes (CodeB CodeC) which themselves have dependencies to things like HDF5, MPI, etc.

Is it feasible to use the CI feature of GitLab to set up a system that would be able to build CodeA (linked with CodeB and CodeC) on Linux machines with different system flavors (Ubuntu, OpenSuSe, RHEL, Fedora, etc)?

Most of the examples that I've found of using GitLab for CI have been things like testing to see if HelloWold.cpp compiles if lines are changed on it. Just simple builds with very little external dependency management/integration.

BDL
  • 21,052
  • 22
  • 49
  • 55
wandadars
  • 1,113
  • 4
  • 19
  • 37
  • 1
    Here's a pointer regarding cross-project dependencies https://stackoverflow.com/questions/43311196/how-to-link-a-deployment-script-repo-from-an-application-repo-in-gitlab-cd/43311371#43311371 – Jawad Apr 24 '17 at 20:08
  • What about the case when CodeB and CodeC are not in the form of git repositories? – wandadars Apr 24 '17 at 20:25
  • 1
    Are you talking about tar/zip archives publicly available on a web server? Or something else? – Jawad Apr 24 '17 at 20:47
  • I would have tar files of CodeB and CodeC, but they are not publically available on a web server. They are not publically listed because of proprietary/security concerns. From what I've read, I would need a local machine here running a GitLab runner in order to have control of the Linux builds that I want to test CodeA on. The machine is on an internal network where we scp the files around. Is this information helpful? – wandadars Apr 24 '17 at 20:59
  • 2
    Yeah, that's helpful and I think what you want to achieve is definitely doable. – Jawad Apr 24 '17 at 21:07
  • You can use Docker images from Docker Hub with GitLab CI, so you could use this [Ubuntu image](https://hub.docker.com/_/ubuntu/) or this [Debian image](https://hub.docker.com/_/debian/) to test/build your code on those respective Linux distros. – Connor Shea May 05 '17 at 20:55

1 Answers1

1

So it sounds like you've got a few really great questions in here. I'll break them apart as I see them and you let me know if this fully answers your question.

  1. How can I build in different flavors of linux?
    • The approach I would take would be to to use docker files as Connor Shea mentioned in the comment. This allows you to continue using generic build agents in your CI system but test across multiple platforms.
    • Another option would be to look at how you're distributing your application and see if you could use a snap package. That would allow you to not have to worry about the environment you're deploying to.
  2. How do I deal with dependencies?
    • This is where it's really useful to consider and artifact repository. Both jfrog's artifactory and sonatype's nexus work wonders here. This will allow you to hook up your build pipeline for any app or library and push an artifact that the others can consume. These can be locked down with a set of credentials that you supply to your build.

I hope this helped.

  • The issue that I ran into was a possible difficulty with obtaining Docker images for the different distros. It seems that images for only a few are available to the public. I'm not sure if there are more available to paying Docker customers. – wandadars May 31 '17 at 19:16
  • You can go the route of creating your own base image. https://docs.docker.com/engine/userguide/eng-image/baseimages/ – funkymonkeymonk Oct 10 '17 at 20:42