Travis CI is an awesome free-of-charge continuous integration service. Go and check it, if you haven’t tried it yet. What I appreciate in particular is a broad range of supported programming languages. Should you happen to have a project based on more than a single language though, then you might wonder if and how the builds would work.

When checking the docs you soon find out  that each of the supported languages is described in isolation. Indeed, when it comes to the build configuration, one of the very first steps is an explicit choice of a single language:

[bash]
language: java
[/bash]


The project I was looking to integrate with Travis CI was a hybrid powered by gradle and gulp and comprising Java, Scala and JavaScript. How could I possibly overcome that single-language limitation? Surprisingly enough, a request for multiple simultaneous languages has been around for a long time. I couldn’t understand why it was never added. Luckily, this conversation on github pointed me to the right direction. Turns out the only thing to worry about are project dependencies (obvious, huh?). It didn’t take long before I was thrilled to see my first successful build.

After only a few failed build attempts I had the final version of my build script ready:

[code]
language: java
before_install:
– npm install gulp gulp-mocha gulp-util chai
– sudo apt-get update
– sudo apt-get install scala
script: “gradle build”
[/code]

As you can see I simply made sure all of the dependencies were fetched ahead of the actual build. 

The actual build output – it’s easy to see how closely it matches the config
 


It might take a while for all the downloads to complete, but the overall build time was still impressive.

The project (a demo of basic algorithms and data structures) is available on github. And so is a link to the build page.




Tomas Zezula

Hello! I'm a technology enthusiast with a knack for solving problems and a passion for making complex concepts accessible. My journey spans across software development, project management, and technical writing. I specialise in transforming rough sketches of ideas to fully launched products, all the while breaking down complex processes into understandable language. I believe a well-designed software development process is key to driving business growth. My focus as a leader and technical writer aims to bridge the tech-business divide, ensuring that intricate concepts are available and understandable to all. As a consultant, I'm eager to bring my versatile skills and extensive experience to help businesses navigate their software integration needs. Whether you're seeking bespoke software solutions, well-coordinated product launches, or easily digestible tech content, I'm here to make it happen. Ready to turn your vision into reality? Let's connect and explore the possibilities together.