Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Docker for Travis #34016

Merged
merged 1 commit into from
Jun 3, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
language: generic
sudo: required
dist: trusty
services:
- docker

# LLVM takes awhile to check out and otherwise we'll manage the submodules in
# our configure script, so disable auto submodule management.
git:
submodules: false

before_install:
- echo 0 | sudo tee /proc/sys/net/ipv6/conf/lo/disable_ipv6
- echo 'deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main' | sudo tee -a /etc/apt/sources.list
- echo 'deb-src http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main' | sudo tee -a /etc/apt/sources.list
- sudo apt-get update
- sudo apt-get --force-yes install curl make g++ python2.7 git zlib1g-dev libedit-dev llvm-3.7-tools
- docker build -t rust -f src/etc/Dockerfile src/etc

script:
- ./configure --llvm-root=/usr/lib/llvm-3.7
- make tidy && make check-notidy -j4
- docker run -v `pwd`:/build rust
sh -c "
./configure --llvm-root=/usr/lib/llvm-3.7 &&
make tidy &&
make check-notidy -j4
"

# Real testing happens on http://buildbot.rust-lang.org/
#
Expand Down
25 changes: 25 additions & 0 deletions src/etc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ubuntu:xenial

# curl
# Download stage0, see src/bootstrap/bootstrap.py
# g++
# Compile LLVM binding in src/rustllvm
# git
# Get commit hash and commit date in version string
# make
# Run build scripts in mk
# libedit-dev zlib1g-dev
# LLVM dependencies as packaged in Ubuntu
# (They are optional, but Ubuntu package enables them)
# llvm-3.7-dev (installed by llvm-3.7-tools)
# LLVM
# llvm-3.7-tools
# FileCheck is used to run tests in src/test/codegen

RUN apt-get update && apt-get -y install \
curl g++ git make \
libedit-dev zlib1g-dev \
llvm-3.7-tools

RUN mkdir /build
WORKDIR /build