Travis CI building cleanup, enable caching

The only reason the Dockerfile was introduced is because the default
machines that Travis uses are based on Ubuntu 12.04, which has some very
old incompatible dependencies with Servo. Docker allowed use to use a
new version of Ubuntu, allowing us to compile with ease. I just learned
that they are currently beta testing 14.04 support:

http://docs.travis-ci.com/user/trusty-ci-environment/

This commit updates our Travis config to remove our dependency on Docker
and just build directly on the images, reducing some complexity and also
overhead of downloading Docker images.

In addition, this commit also enables caching of the .servo and .cargo
directories on Travis in an attempt to reduce build times.

http://docs.travis-ci.com/user/caching/#Arbitrary-directories
This commit is contained in:
Corey Farwell 2015-10-15 08:54:29 -04:00
parent f8ada66919
commit dbe6da874b
2 changed files with 17 additions and 48 deletions

View file

@ -1,25 +1,27 @@
language: python
before_install:
- if [ "$DOCKER" = "1" ]; then docker build -t servo etc/ci/; fi
script:
- if [ "$DOCKER" = "0" ]; then sh -c "$CMD"; fi
- if [ "$DOCKER" = "1" ]; then docker run -tv `pwd`:/build servo sh -c "$CMD"; fi
matrix:
fast_finish: true
include:
- sudo: false
env:
- CMD="./mach test-tidy"
- DOCKER=0
script: ./mach test-tidy
cache: false
- sudo: 9000
services:
- docker
env:
- CMD="./mach build -d --verbose"
- DOCKER=1
dist: trusty
script: ./mach build -d --verbose
cache:
directories:
- .cargo
- .servo
addons:
apt:
packages:
- cmake
- freeglut3-dev
- gperf
- libosmesa6-dev
- python-virtualenv
- xorg-dev
branches:
only:

View file

@ -1,33 +0,0 @@
FROM ubuntu:vivid
# Required by mozjs to build
ENV SHELL /bin/sh
# Enable 'universe' since it is not enabled by default
RUN echo "deb http://archive.ubuntu.com/ubuntu vivid main universe" > /etc/apt/sources.list
RUN echo "deb http://archive.ubuntu.com/ubuntu vivid-updates main universe" >> /etc/apt/sources.list
# Install dependencies
RUN apt-get -y update
RUN apt-get install -y \
cmake \
curl \
freeglut3-dev \
g++ \
git \
gperf \
libbz2-dev \
libfreetype6-dev \
libgl1-mesa-dri \
libglib2.0-dev \
libglu1-mesa-dev \
libosmesa6-dev \
libssl-dev \
libxmu-dev \
libxmu6 \
python-virtualenv \
xorg-dev
# Servo will be built in /build
RUN mkdir /build
WORKDIR /build