summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJeff Donahue <jeff.donahue@gmail.com>2014-09-08 11:11:41 +0200
committerJeff Donahue <jeff.donahue@gmail.com>2014-09-11 17:13:28 +0200
commit4ce6e43140819588d2e47c22ca13c05a8030f57d (patch)
tree8e9395db858cbc7bb7cbf82c8b2fb84ff88f80ab /scripts
parent15538f87992747bea2713801ef4abec5d0f4f50b (diff)
downloadcaffeonacl-4ce6e43140819588d2e47c22ca13c05a8030f57d.tar.gz
caffeonacl-4ce6e43140819588d2e47c22ca13c05a8030f57d.tar.bz2
caffeonacl-4ce6e43140819588d2e47c22ca13c05a8030f57d.zip
restore "red X" build failures in Travis
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/travis/travis_build.sh18
-rwxr-xr-xscripts/travis/travis_build_and_test.sh35
-rwxr-xr-xscripts/travis/travis_install.sh84
-rwxr-xr-xscripts/travis/travis_setup_makefile_config.sh2
4 files changed, 70 insertions, 69 deletions
diff --git a/scripts/travis/travis_build.sh b/scripts/travis/travis_build.sh
deleted file mode 100755
index 06b4e24b..00000000
--- a/scripts/travis/travis_build.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/bash
-# Script called by Travis to do a full build of Caffe,
-# including CUDA functionality.
-
-if $WITH_CMAKE; then
- mkdir build
- cd build
- cmake -DBUILD_PYTHON=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release ..
- make --keep-going
- cd -
-else
- export CPU_ONLY=0
- make --keep-going all test pycaffe warn
- make all
- make test
- make pycaffe
- make warn
-fi
diff --git a/scripts/travis/travis_build_and_test.sh b/scripts/travis/travis_build_and_test.sh
index 6b7c85e9..dec4d097 100755
--- a/scripts/travis/travis_build_and_test.sh
+++ b/scripts/travis/travis_build_and_test.sh
@@ -1,22 +1,33 @@
#!/bin/bash
# Script called by Travis to do a CPU-only build of and test Caffe.
+set -e
+MAKE="make --jobs=$NUM_THREADS --keep-going"
+
if $WITH_CMAKE; then
mkdir build
cd build
cmake -DBUILD_PYTHON=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DCPU_ONLY=ON ..
- make --keep-going
- make runtest
- make lint
- make clean
+ $MAKE
+ if ! $WITH_CUDA; then
+ $MAKE runtest
+ $MAKE lint
+ fi
+ $MAKE clean
cd -
else
- export CPU_ONLY=1
- make --keep-going all test pycaffe warn lint
- make runtest
- make all
- make test
- make pycaffe
- make warn
- make lint
+ if ! $WITH_CUDA; then
+ export CPU_ONLY=1
+ fi
+ $MAKE all test pycaffe warn lint || true
+ if ! $WITH_CUDA; then
+ $MAKE runtest
+ fi
+ $MAKE all
+ $MAKE test
+ $MAKE pycaffe
+ $MAKE warn
+ if ! $WITH_CUDA; then
+ $MAKE lint
+ fi
fi
diff --git a/scripts/travis/travis_install.sh b/scripts/travis/travis_install.sh
index ef84e5dd..15cafbe9 100755
--- a/scripts/travis/travis_install.sh
+++ b/scripts/travis/travis_install.sh
@@ -1,8 +1,13 @@
#!/bin/bash
+# This script must be run with sudo.
+
+set -e
+
+MAKE="make --jobs=$NUM_THREADS"
# Install apt packages where the Ubuntu 12.04 default works for Caffe
-sudo apt-get -y update
-sudo apt-get install \
+apt-get -y update
+apt-get install \
wget git curl \
python-dev python-numpy \
libleveldb-dev libsnappy-dev libopencv-dev \
@@ -16,64 +21,65 @@ sudo apt-get install \
# if needed. By default, Aptitude in Ubuntu 12.04 installs CMake 2.8.7, but
# Caffe requires a minimum CMake version of 2.8.8.
if $WITH_CMAKE; then
- sudo add-apt-repository -y ppa:ubuntu-sdk-team/ppa
- sudo apt-get -y update
- sudo apt-get -y install cmake || (echo "CMake install failed"; exit 1)
+ add-apt-repository -y ppa:ubuntu-sdk-team/ppa
+ apt-get -y update
+ apt-get -y install cmake
fi
# Install glog
GLOG_URL=https://google-glog.googlecode.com/files/glog-0.3.3.tar.gz
GLOG_FILE=/tmp/glog-0.3.3.tar.gz
pushd .
-wget $GLOG_URL -O $GLOG_FILE && \
- tar -C /tmp -xzvf $GLOG_FILE && \
- rm $GLOG_FILE && \
- cd /tmp/glog-0.3.3 && \
- ./configure && make && sudo make install || \
- (echo "glog install failed"; exit 1)
+wget $GLOG_URL -O $GLOG_FILE
+tar -C /tmp -xzvf $GLOG_FILE
+rm $GLOG_FILE
+cd /tmp/glog-0.3.3
+./configure
+$MAKE
+$MAKE install
popd
# Install gflags
GFLAGS_URL=https://github.com/schuhschuh/gflags/archive/master.zip
GFLAGS_FILE=/tmp/gflags-master.zip
pushd .
-wget $GFLAGS_URL -O $GFLAGS_FILE && \
- cd /tmp/ && unzip gflags-master.zip && \
- cd gflags-master && \
- mkdir build && \
- cd build && \
- export CXXFLAGS="-fPIC" && \
- cmake .. && make VERBOSE=1 && sudo make install || \
- (echo "gflags install failed"; exit 1)
+wget $GFLAGS_URL -O $GFLAGS_FILE
+cd /tmp/
+unzip gflags-master.zip
+cd gflags-master
+mkdir build
+cd build
+export CXXFLAGS="-fPIC"
+cmake ..
+$MAKE VERBOSE=1
+$MAKE install
popd
# Install CUDA, if needed
-CUDA_URL=http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_6.0-37_amd64.deb
-CUDA_FILE=/tmp/cuda_install.deb
if $WITH_CUDA; then
- curl $CUDA_URL -o $CUDA_FILE && \
- sudo dpkg -i $CUDA_FILE ||
- (echo "CUDA install failed"; exit 1)
- rm -f $CUDA_FILE
- 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 ||
- (echo "CUDA symlink creation failed"; exit 1)
+ CUDA_URL=http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_6.0-37_amd64.deb
+ CUDA_FILE=/tmp/cuda_install.deb
+ curl $CUDA_URL -o $CUDA_FILE
+ dpkg -i $CUDA_FILE
+ rm -f $CUDA_FILE
+ 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.
+ 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.)
+ ln -s /usr/local/cuda-6.0 /usr/local/cuda
fi
# Install LMDB
LMDB_URL=ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/openldap-2.4.39.tgz
LMDB_FILE=/tmp/openldap.tgz
pushd .
-curl $LMDB_URL -o $LMDB_FILE && \
- tar -C /tmp -xzvf $LMDB_FILE && \
- cd /tmp/openldap*/libraries/liblmdb/ && \
- make && sudo make install || \
- (echo "LMDB install failed"; exit 1)
+curl $LMDB_URL -o $LMDB_FILE
+tar -C /tmp -xzvf $LMDB_FILE
+cd /tmp/openldap*/libraries/liblmdb/
+$MAKE
+$MAKE install
popd
rm -f $LMDB_FILE
diff --git a/scripts/travis/travis_setup_makefile_config.sh b/scripts/travis/travis_setup_makefile_config.sh
index fa86e92a..a309bb3d 100755
--- a/scripts/travis/travis_setup_makefile_config.sh
+++ b/scripts/travis/travis_setup_makefile_config.sh
@@ -1,5 +1,7 @@
#!/bin/bash
+set -e
+
mv Makefile.config.example Makefile.config
if $WITH_CUDA; then