summaryrefslogtreecommitdiff
path: root/.travis.yml
diff options
context:
space:
mode:
authorJeff Donahue <jeff.donahue@gmail.com>2014-08-17 03:11:59 -0700
committerJeff Donahue <jeff.donahue@gmail.com>2014-08-17 06:44:53 -0700
commita909f916e2e9e89674498459f83b0e851a5d1e15 (patch)
treec93f588575592055968d6256229a61983bee8b67 /.travis.yml
parentdb66a0c343597611c89e5dd00c605d159c9810c9 (diff)
downloadcaffe-a909f916e2e9e89674498459f83b0e851a5d1e15.tar.gz
caffe-a909f916e2e9e89674498459f83b0e851a5d1e15.tar.bz2
caffe-a909f916e2e9e89674498459f83b0e851a5d1e15.zip
Travis build matrix to do parallel builds for make and CMake; CUDA-less
and CUDA-ful. Move bits of functionality into scripts under scripts/travis for readability. Only generate CUDA compute_50 for perfomance.
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml72
1 files changed, 15 insertions, 57 deletions
diff --git a/.travis.yml b/.travis.yml
index ed021b61..46dfc117 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,76 +1,34 @@
+# Use a build matrix to do two builds in parallel:
+# one using CMake, and one using make.
+env:
+ matrix:
+ - WITH_CUDA=false WITH_CMAKE=false
+ - WITH_CUDA=false WITH_CMAKE=true
+ - WITH_CUDA=true WITH_CMAKE=false
+ - WITH_CUDA=true WITH_CMAKE=true
+
language: cpp
# Cache Ubuntu apt packages.
cache: apt
-compiler:
- - gcc
-# Disable clang build: doesn't seem to work on Linux.
-# (@jeffdonahue: Travis buildbot's failure behavior is similar to what I see
-# building on Linux.)
-# - clang
+compiler: gcc
before_install:
- - echo $LANG
- - echo $LC_ALL
- export NUM_THREADS=4
- alias make="make --jobs=$NUM_THREADS"
- - sudo add-apt-repository ppa:ubuntu-sdk-team/ppa -y
- - sudo apt-get -y update
- - sudo apt-get -y install wget git curl python-dev python-numpy libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-dev libboost-system-dev libboost-python-dev libhdf5-serial-dev protobuf-compiler libatlas-dev libatlas-base-dev bc cmake
+ - export SCRIPTS=./scripts/travis
+ - set -e # fail when a script fails
install:
- - wget https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz -O /tmp/glog-0.3.3.tar.gz && tar -C /tmp -xzvf /tmp/glog-0.3.3.tar.gz && rm /tmp/glog-0.3.3.tar.gz
- - cd /tmp/glog-0.3.3 && ./configure && make && sudo make install && cd -
- - wget https://github.com/schuhschuh/gflags/archive/master.zip -O /tmp/gflags-master.zip && pushd /tmp/ && unzip gflags-master.zip && cd gflags-master && mkdir build && cd build && export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1 && sudo make install && popd
- - curl http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_6.0-37_amd64.deb -o /tmp/cuda_install.deb && sudo dpkg -i /tmp/cuda_install.deb && rm /tmp/cuda_install.deb
- - sudo apt-get -y update
- # Install the minimal CUDA subpackages required to test Caffe build.
- # For a full CUDA installation, add 'cuda' to the list of packages.
- - sudo apt-get -y install cuda-core-6-0 cuda-extra-libs-6-0
- # Create CUDA symlink at /usr/local/cuda
- # (This would normally be created by the CUDA installer, but we create it
- # manually since we did a partial installation.)
- - sudo ln -s /usr/local/cuda-6.0 /usr/local/cuda
- - curl https://gitorious.org/mdb/mdb/archive/7f038d0f15bec57b4c07aa3f31cd5564c88a1897.tar.gz -o /tmp/mdb.tar.gz && tar -C /tmp -xzvf /tmp/mdb.tar.gz && rm /tmp/mdb.tar.gz
- - cd /tmp/mdb-mdb/libraries/liblmdb/ && make && sudo make install && cd -
+ - source $SCRIPTS/travis_install.sh
before_script:
- - mv Makefile.config.example Makefile.config
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
+ - if ! $WITH_CMAKE; then source $SCRIPTS/travis_setup_makefile_config.sh; fi
script:
- # CMake build
- - mkdir build
- - cd build
- ## CPU-GPU: build only
- - cmake -DBUILD_PYTHON=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release ..
- - make --keep-going
- - make clean && rm -rf *
- ## CPU-only: comprehensive
- - cmake -DBUILD_PYTHON=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DCPU_ONLY=ON ..
- - make --keep-going
- - make runtest
- - make lint
- - make clean
- ## Cleanup CMake build
- - cd ..
- - rm -rf build
-
- # Make build
- ## CPU-GPU: build only
- - export CPU_ONLY=0
- - make --keep-going all
- - make clean
- ## CPU-only: comprehensive
- - export CPU_ONLY=1
- - make --keep-going all test warn lint
- - make runtest
- - make all
- - make test
- - make warn
- - make lint
- - make pycaffe
+ - if $WITH_CUDA; then source $SCRIPTS/travis_build.sh; else source $SCRIPTS/travis_build_and_test.sh; fi
notifications:
# Emails are sent to the committer's git-configured email address by default,