summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: ed021b61fda7f4e893772fd94df0e90735b2547b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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

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

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 -

before_script:
  - mv Makefile.config.example Makefile.config
  - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

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

notifications:
# Emails are sent to the committer's git-configured email address by default,
# but only if they have access to the repository.  To enable Travis on your
# public fork of Caffe, just go to travis-ci.org and flip the switch on for
# your Caffe fork.  To configure your git email address, use:
#     git config --global user.email me@example.com
  email:
    on_success: always
    on_failure: always

# IRC notifications disabled by default.
# Uncomment next 5 lines to send notifications to chat.freenode.net#caffe
#   irc:
#     channels:
#       - "chat.freenode.net#caffe"
#     template:
#       - "%{repository}/%{branch} (%{commit} - %{author}): %{message}"