diff --git a/.travis.yml b/.travis.yml index fcea38c8f47..1f780471b3b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,21 @@ 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 - sudo apt-get -y update - 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 + 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 - @@ -19,22 +23,20 @@ install: - sudo apt-get -y update && sudo apt-get -y install 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/cuda/lib64:/usr/local/lib - export NUM_THREADS=4 + script: - - make -j $NUM_THREADS all test warn lint + - make --keep-going --jobs=$NUM_THREADS all test warn lint - make runtestnogpu - - make -j $NUM_THREADS all - - make -j $NUM_THREADS test - - make -j $NUM_THREADS warn - - make -j $NUM_THREADS lint -branches: - only: - - master - - dev - - travisci + - make --jobs=$NUM_THREADS all + - make --jobs=$NUM_THREADS test + - make --jobs=$NUM_THREADS warn + - make --jobs=$NUM_THREADS lint + 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 @@ -44,6 +46,7 @@ notifications: 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: diff --git a/Makefile b/Makefile index ad3c1bb41c0..00f67c978dc 100644 --- a/Makefile +++ b/Makefile @@ -215,6 +215,11 @@ ifeq ($(OSX), 1) endif endif +# Custom compiler +ifdef CUSTOM_CXX + CXX := $(CUSTOM_CXX) +endif + # Debugging ifeq ($(DEBUG), 1) COMMON_FLAGS := -DDEBUG -g -O0 diff --git a/Makefile.config.example b/Makefile.config.example index 81effb481f3..17c90016f75 100644 --- a/Makefile.config.example +++ b/Makefile.config.example @@ -3,7 +3,7 @@ # To customize your choice of compiler, uncomment and set the following. # N.B. the default for Linux is g++ and the default for OSX is clang++ -# CXX := g++ +# CUSTOM_CXX := g++ # CUDA directory contains bin/ and lib/ directories that we need. CUDA_DIR := /usr/local/cuda