Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find a list of 'os' and 'dist' options for Travis-CI / Multi OS Build Matrix

Per the Travis-CI documentation you can run tests on different operating systems and distributions amongst them.

A the time of writing, a Google search doesn't turn up a list of all the possible os and dist options. All one has to go from is the following example which provides the following under the build matrix sub heading:

There are many options available and using the matrix.include key is essential to include any specific entries. For example, this matrix would route builds to the Trusty beta build environment and to an OS X image using Xcode 7.2:

matrix: include: - os: linux dist: trusty sudo: required - os: osx osx_image: xcode7.2

Yet there's no guidance on what options are available for the os, dist, or osx_image keys. Does anyone know where to find these values?

like image 275
user3751385 Avatar asked Jun 06 '16 01:06

user3751385


1 Answers

If you take a look at The Build Environment, the "Virtualization environments" section contains a table listing the different operating systems Travis CI currently supports. Currently (2016-08-15) that includes:

  • Ubuntu 12.04 LTS Server Edition 64 bit (without sudo)
  • Ubuntu 12.04 LTS Server Edition 64 bit (with sudo)
  • OS X Mavericks
  • Ubuntu 14.04 LTS Server Edition 64 bit (with sudo)

As it also states, the Ubuntu 12.04 LTS Server image is the default, so you can only switch to one other Linux distribution, namely trusty. Given that the dist property only have one possible value, I guess the need to "list all possible values" is limited.

However, for OS X, the above is not the end of the story. The documentation about the OS X environment lets us know that the osx_image property can have a range of different values that will change both the version of Xcode as well as the version of OS X:

  • OS X 10.11
    • osx_image: xcode8 (Xcode 8 beta 4)
    • osx_image: xcode7.3 (Xcode 7.3.1)
    • osx_image: xcode7.2 (Xcode 7.2.1)
  • OS X 10.10
    • osx_image: xcode7.1 (Xcode 7.1.1 GM)
    • osx_image: xcode7 (Xcode 7)
    • osx_image: xcode6.4 (Xcode 6.4)
    • osx_image: beta-xcode6.3 (Xcode 6.3)
  • OS X 10.9
    • osx_image: beta-xcode6.2 (Xcode 6.2)
    • osx_image: beta-xcode6.1 (Default, Xcode 6.1)

What's interesting about this is that beta-xcode6.1 is listed as the default image for OS X, which has an ancient version of Xcode and OS X and additionally seems to be in beta (whatever that means). It might thus be a good idea to explicitly configure one or more osx_image versions in the matrix if you're going to build for OS X.

Update: As of October 2017, the default is OS X 10.11 with Xcode 7.3.1, and the latest available is OS X 10.12 with Xcode 9.

like image 98
Asbjørn Ulsberg Avatar answered Sep 21 '22 05:09

Asbjørn Ulsberg