Skip to content

Commit

Permalink
Merge pull request numpy#6165 from moreati/travis_enhancements
Browse files Browse the repository at this point in the history
BLD: Speed up Travis builds by 10-15 minutes, move to container-based architecture
  • Loading branch information
juliantaylor committed Aug 5, 2015
2 parents 3e314b9 + 4d84ac1 commit e108e99
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 11 deletions.
37 changes: 34 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
# After changing this file, check it on:
# http://lint.travis-ci.org/
language: python

# Run jobs on container-based infrastructure, can be overridden per job
sudo: false

# Travis whitelists the installable packages, additions can be requested
# https://github.com/travis-ci/apt-package-whitelist
addons:
apt:
packages: &common_packages
- gfortran
- libatlas-dev
- libatlas-base-dev
# Speedup builds, particularly when USE_CHROOT=1
- eatmydata

cache:
directories:
- $HOME/.cache/pip

python:
- 2.6
- 2.7
Expand All @@ -11,8 +30,21 @@ matrix:
include:
- python: 3.3
env: USE_CHROOT=1 ARCH=i386 DIST=trusty PYTHON=3.4
sudo: true
addons:
apt:
packages:
- *common_packages
- debootstrap
- python: 3.2
env: USE_DEBUG=1
addons:
apt:
packages:
- *common_packages
- python3-dbg
- python3-dev
- python3-nose
- python: 2.7
env: NPY_SEPARATE_COMPILATION=0 PYTHON_OO=1
- python: 3.4
Expand All @@ -32,13 +64,12 @@ before_install:
# We therefore control our own environment, avoid travis' numpy
- virtualenv --python=python venv
- source venv/bin/activate
- pip install nose
# pip install coverage
- python -V
- pip install --upgrade pip setuptools
- pip install nose
# pip install coverage
# Speed up install by not compiling Cython
- pip install --install-option="--no-cython-compile" Cython
- sudo apt-get install -qq libatlas-dev libatlas-base-dev gfortran
- popd

script:
Expand Down
9 changes: 1 addition & 8 deletions tools/travis-test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -ex

# travis boxes give you 1.5 cpus
# Travis legacy boxes give you 1.5 CPUs, container-based boxes give you 2 CPUs
export NPY_NUM_BUILD_JOBS=2

# setup env
Expand Down Expand Up @@ -47,12 +47,7 @@ setup_chroot()
# CC="gcc -m32" LDSHARED="gcc -m32 -shared" LDFLAGS="-m32 -shared" linux32 python setup.py build
# when travis updates to ubuntu 14.04
DIR=$1
# speeds up setup as we don't have eatmydata during bootstrap
sudo mkdir -p $DIR
sudo mount -t tmpfs -o size=4G tmpfs $DIR
set -u
sudo apt-get update
sudo apt-get -qq -y --force-yes install debootstrap eatmydata
sudo debootstrap --variant=buildd --include=fakeroot,build-essential --arch=$ARCH --foreign $DIST $DIR
sudo chroot $DIR ./debootstrap/debootstrap --second-stage
sudo rsync -a $TRAVIS_BUILD_DIR $DIR/
Expand Down Expand Up @@ -117,8 +112,6 @@ PYTHON=${PYTHON:-python}
PIP=${PIP:-pip}

if [ -n "$USE_DEBUG" ]; then
sudo apt-get update
sudo apt-get install -qq -y --force-yes python3-dbg python3-dev python3-nose
PYTHON=python3-dbg
fi

Expand Down

0 comments on commit e108e99

Please sign in to comment.