travis - does adding cflags help? want to keep minimal invasion into gflags installation.
[platform/upstream/caffe.git] / .travis.yml
1 language: cpp
2
3 # Cache Ubuntu apt packages.
4 cache: apt
5
6 compiler:
7   - gcc
8 # Disable clang build: doesn't seem to work on Linux.
9 # (@jeffdonahue: Travis buildbot's failure behavior is similar to what I see
10 # building on Linux.)
11 #   - clang
12
13 before_install:
14   - echo $LANG
15   - echo $LC_ALL
16   - sudo apt-get -y update
17   - sudo apt-get -y install wget git curl python-dev libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev protobuf-compiler libatlas-dev libatlas-base-dev bc
18   - export CFLAGS="-fPIC"
19   - export CXXFLAGS="-fPIC"
20
21 install:
22   - 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 && cmake .. && make && sudo make install && popd
23   - 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
24   - cd /tmp/glog-0.3.3 && ./configure && make && sudo make install && cd -
25   - 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
26   - sudo apt-get -y update && sudo apt-get -y install cuda
27   - 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
28   - cd /tmp/mdb-mdb/libraries/liblmdb/ && make && sudo make install && cd -
29
30 before_script:
31   - mv Makefile.config.example Makefile.config
32   - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
33   - export NUM_THREADS=4
34
35 script:
36   # CPU-GPU: build only.
37   - export CPU_ONLY=0
38   - make --keep-going --jobs=$NUM_THREADS all
39   - make clean
40   # CPU-only: comprehensive.
41   - export CPU_ONLY=1
42   - make --keep-going --jobs=$NUM_THREADS all test warn lint
43   - make runtest
44   - make --jobs=$NUM_THREADS all
45   - make --jobs=$NUM_THREADS test
46   - make --jobs=$NUM_THREADS warn
47   - make --jobs=$NUM_THREADS lint
48
49 notifications:
50 # Emails are sent to the committer's git-configured email address by default,
51 # but only if they have access to the repository.  To enable Travis on your
52 # public fork of Caffe, just go to travis-ci.org and flip the switch on for
53 # your Caffe fork.  To configure your git email address, use:
54 #     git config --global user.email me@example.com
55   email:
56     on_success: always
57     on_failure: always
58
59 # IRC notifications disabled by default.
60 # Uncomment next 5 lines to send notifications to chat.freenode.net#caffe
61 #   irc:
62 #     channels:
63 #       - "chat.freenode.net#caffe"
64 #     template:
65 #       - "%{repository}/%{branch} (%{commit} - %{author}): %{message}"