Skip to content
Advertisement

Using Multiple Operating Systems with Ruby and Shell in a Matrix with Travis CI

I’m attempting to create a CI test that executes a test using multiple Ruby versions using rvm on Linux, but I want to execute another test on Windows using the bash shell.

I’ve tried a few configurations, but they do not allow me to create or use multiple ruby versions if I have an additional OS and language in the matrix.

As an example, if I use the following configuration, I’ll get 3 different line items for Linux with different Ruby versions:

JavaScript

Ruby RVM Travis CI

If I add a matrix and include different OS’s and languages, I just get 2 line items in the matrix — one for Linux (ruby) and one for Windows (shell). The Windows OS works fine, but Linux only executes the first ruby version in the rvm list.

JavaScript

Ruby/Windows Travis CI

I’d like to have 3 build jobs with different ruby versions listed for Linux, but just one shell build job on Windows. Is it possible to use rvm within a matrix with multiple OS’s and languages with Travis CI?

Advertisement

Answer

You have to define one include block for every build job:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement