|
| 1 | +# Use a build matrix to do two builds in parallel: |
| 2 | +# one using CMake, and one using make. |
| 3 | +env: |
| 4 | + matrix: |
| 5 | + - WITH_CUDA=false WITH_CMAKE=false |
| 6 | + - WITH_CUDA=false WITH_CMAKE=true |
| 7 | + - WITH_CUDA=true WITH_CMAKE=false |
| 8 | + - WITH_CUDA=true WITH_CMAKE=true |
| 9 | + |
1 | 10 | language: cpp |
2 | 11 |
|
3 | 12 | # Cache Ubuntu apt packages. |
4 | 13 | cache: apt |
5 | 14 |
|
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 |
| 15 | +compiler: gcc |
12 | 16 |
|
13 | 17 | 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 python-numpy libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev protobuf-compiler libatlas-dev libatlas-base-dev bc |
| 18 | + - export NUM_THREADS=4 |
| 19 | + - export SCRIPTS=./scripts/travis |
18 | 20 |
|
19 | 21 | install: |
20 | | - - 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 |
21 | | - - cd /tmp/glog-0.3.3 && ./configure && make && sudo make install && cd - |
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 && export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1 && sudo make install && popd |
23 | | - - 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 |
24 | | - - sudo apt-get -y update |
25 | | - # Install the minimal CUDA subpackages required to test Caffe build. |
26 | | - # For a full CUDA installation, add 'cuda' to the list of packages. |
27 | | - - sudo apt-get -y install cuda-core-6-0 cuda-extra-libs-6-0 |
28 | | - # Create CUDA symlink at /usr/local/cuda |
29 | | - # (This would normally be created by the CUDA installer, but we create it |
30 | | - # manually since we did a partial installation.) |
31 | | - - sudo ln -s /usr/local/cuda-6.0 /usr/local/cuda |
32 | | - - 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 |
33 | | - - cd /tmp/mdb-mdb/libraries/liblmdb/ && make && sudo make install && cd - |
| 22 | + - sudo -E $SCRIPTS/travis_install.sh |
34 | 23 |
|
35 | 24 | before_script: |
36 | | - - mv Makefile.config.example Makefile.config |
37 | 25 | - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib |
38 | | - - export NUM_THREADS=4 |
| 26 | + - if ! $WITH_CMAKE; then $SCRIPTS/travis_setup_makefile_config.sh; fi |
39 | 27 |
|
40 | | -script: |
41 | | - # CPU-GPU: build only. |
42 | | - - export CPU_ONLY=0 |
43 | | - - make --keep-going --jobs=$NUM_THREADS all |
44 | | - - make clean |
45 | | - # CPU-only: comprehensive. |
46 | | - - export CPU_ONLY=1 |
47 | | - - make --keep-going --jobs=$NUM_THREADS all test warn lint |
48 | | - - make runtest |
49 | | - - make --jobs=$NUM_THREADS all |
50 | | - - make --jobs=$NUM_THREADS test |
51 | | - - make --jobs=$NUM_THREADS warn |
52 | | - - make --jobs=$NUM_THREADS lint |
53 | | - - make --jobs=$NUM_THREADS pycaffe |
| 28 | +script: $SCRIPTS/travis_build_and_test.sh |
54 | 29 |
|
55 | 30 | notifications: |
56 | 31 | # Emails are sent to the committer's git-configured email address by default, |
|
0 commit comments