Build Environment Overview
What This Guide Covers #
This guide provides an overview on the different environments in which Travis CI can run your builds, and why you might want to pick one over another.
Virtualization environments #
Each build runs in one of the following virtual environments.
A fast boot time environment in which
sudo commands are not available. Running Linux Ubuntu Trusty 14.04
OS X #
An OS X environment for Objective-C and other OS X specific projects
Virtualisation Environment vs Operating System #
The following table summarizes the differences across virtual environments and operating systems:
|Ubuntu Precise||Ubuntu Trusty||Ubuntu Trusty||OS X|
|Status||Current||Default as of August 2017||Current||Current|
|Infrastructure||Virtual machine on GCE||Container on EC2 or Packet||Virtual machine on GCE||Virtual machine|
|Approx boot time||20-50s||1-6s||20-50s||60-90s|
|File system||EXT4||devicemapper on XFS||EXT4||HFS+|
|Operating system||Ubuntu 12.04||Ubuntu 14.04||Ubuntu 14.04||OS X|
|Memory||7.5 GB||4 GB max||7.5 GB||4 GB|
|IPv4 network||IPv4 is available||IPv4 is available||IPv4 is available||IPv4 is available|
|IPv6 network||IPv6 is not available||IPv6 is available on loopback||IPv6 is not available||IPv6 is not available|
|Available disk space||approx 22GB||approx 9GB||approx 18GB||approx 41GB|
Note that the following keywords in your .travis.yml file will silently route your builds to our sudo-enabled infrastructure (even if you specify
Available disk space is approximate and depends on the base image and language selection of your project. The best way to find out what is available on your specific image is to run
df -has part of your build script.
What infrastructure is my environment running on? #
Usually, knowing the virtualization environment characteristics from the table above is sufficient.
But, if you do need more detail, you have one of these two questions:
- you want to see what infrastructure a finished build ran on.
- you want to determine what infrastructure a particular
.travis.ymlconfiguration will run on.
For a finished build #
To see what infrastructure a finished build ran on, look at the hostname at the top of the build log:
if it contains:
ec2, as in the previous example → the build ran in a container-based environment on Amazon EC2.
packet→ the build ran in a container-based environment on Packet.
gce→ the build ran in a sudo-enabled environment on Google Compute Engine.
wjb→ the build ran on macOS.
For a particular .travis.yml configuration #
Many different parts of your
.travis.yml affect what infrastructure your build runs on. The following list describes some of the main settings that determine build routing:
Any of the following settings related to sudo or docker route your build to a sudo-enabled linux (Ubuntu Trusty) environment on Google Cloud Engine.
- any other
sudocommand in your build script
- any other
dockercommand in your build script
os: osx, setting a version of Xcode using
osx_image:, or using a macOS specific language such as
language: objective-croutes your build to macOS infrastructure.
If none of the previous keys are present in your
.travis.yml, the default is a container-based linux (Ubunty Trusty) environment on Amazon EC2 or Packet.
Deprecated Virtualization Environments #
Historically, Travis CI has provided the following virtualization environments.