summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEvan Shelhamer <shelhamer@imaginarynumber.net>2015-01-22 00:29:35 -0800
committerEvan Shelhamer <shelhamer@imaginarynumber.net>2015-01-22 00:29:35 -0800
commit64b68b274ce2795cf650002cf27e26e05eff5ea1 (patch)
tree907938319344d79039a8e590f6057b96a0149e99 /scripts
parentdaa4c5bd7bf02c21e82b1522ca44b2b6049010b5 (diff)
parent3f6a85c23c8c3a016f6360baf9614b6720e5c1f4 (diff)
downloadcaffeonacl-64b68b274ce2795cf650002cf27e26e05eff5ea1.tar.gz
caffeonacl-64b68b274ce2795cf650002cf27e26e05eff5ea1.tar.bz2
caffeonacl-64b68b274ce2795cf650002cf27e26e05eff5ea1.zip
Merge pull request #1473 from longjon/pytest
Python testing
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/travis/travis_build_and_test.sh1
-rwxr-xr-xscripts/travis/travis_install.sh11
-rwxr-xr-xscripts/travis/travis_setup_makefile_config.sh14
3 files changed, 23 insertions, 3 deletions
diff --git a/scripts/travis/travis_build_and_test.sh b/scripts/travis/travis_build_and_test.sh
index dec4d097..53c6c341 100755
--- a/scripts/travis/travis_build_and_test.sh
+++ b/scripts/travis/travis_build_and_test.sh
@@ -26,6 +26,7 @@ else
$MAKE all
$MAKE test
$MAKE pycaffe
+ $MAKE pytest
$MAKE warn
if ! $WITH_CUDA; then
$MAKE lint
diff --git a/scripts/travis/travis_install.sh b/scripts/travis/travis_install.sh
index e17f253e..82f386cf 100755
--- a/scripts/travis/travis_install.sh
+++ b/scripts/travis/travis_install.sh
@@ -57,3 +57,14 @@ $MAKE
$MAKE install
popd
rm -f $LMDB_FILE
+
+# Install the Python runtime dependencies via miniconda (this is much faster
+# than using pip for everything).
+wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
+chmod +x miniconda.sh
+./miniconda.sh -b
+export PATH=/home/travis/miniconda/bin:$PATH
+conda update --yes conda
+conda install --yes numpy scipy matplotlib scikit-image pip
+pip install protobuf
+rm /home/travis/miniconda/lib/libm.*
diff --git a/scripts/travis/travis_setup_makefile_config.sh b/scripts/travis/travis_setup_makefile_config.sh
index a309bb3d..e8d85f9b 100755
--- a/scripts/travis/travis_setup_makefile_config.sh
+++ b/scripts/travis/travis_setup_makefile_config.sh
@@ -5,10 +5,18 @@ set -e
mv Makefile.config.example Makefile.config
if $WITH_CUDA; then
- # Remove default gencode set; only generate compute_50.
- sed -i 's/-gencode arch=.*\\//' Makefile.config
- sed -i 's/CUDA_ARCH :=//' Makefile.config
+ # Only generate compute_50.
GENCODE="-gencode arch=compute_50,code=sm_50"
GENCODE="$GENCODE -gencode arch=compute_50,code=compute_50"
echo "CUDA_ARCH := $GENCODE" >> Makefile.config
fi
+
+cat << 'EOF' >> Makefile.config
+ANACONDA_HOME := $(HOME)/miniconda
+PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
+ $(ANACONDA_HOME)/include/python2.7 \
+ $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include
+PYTHON_LIB := $(ANACONDA_HOME)/lib
+INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
+LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
+EOF