From dbe6da874b9e419b0b80a5ce7a7739ba3766d24a Mon Sep 17 00:00:00 2001 From: Corey Farwell Date: Thu, 15 Oct 2015 08:54:29 -0400 Subject: [PATCH] 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 --- .travis.yml | 32 +++++++++++++++++--------------- etc/ci/Dockerfile | 33 --------------------------------- 2 files changed, 17 insertions(+), 48 deletions(-) delete mode 100644 etc/ci/Dockerfile diff --git a/.travis.yml b/.travis.yml index d8179c9a525..2a2e6fc9257 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/etc/ci/Dockerfile b/etc/ci/Dockerfile deleted file mode 100644 index beddf0f0f0b..00000000000 --- a/etc/ci/Dockerfile +++ /dev/null @@ -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